aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2024-01-19 17:48:10 +0100
committerGitHub <noreply@github.com>2024-01-19 17:48:10 +0100
commit5722bbf18aa2f471fc5491834c6c877b524e8795 (patch)
tree0bfe53383cc4dc38261e3e0086af199f39777801
parent610b3da211be5d7cfd27077f22b876aedaa2dc29 (diff)
downloadydb-5722bbf18aa2f471fc5491834c6c877b524e8795.tar.gz
Library update 9 (#1163)
* Right libs import scripts * Library update 9 * Add contrib/libs/cxxsupp/libcxx/include/memory_resource
-rw-r--r--build/export_generators/hardcoded-cmake/cmake/global_flags.compiler.msvc.cmake13
-rw-r--r--build/export_generators/ide-gradle/build.gradle.kts.jinja183
-rw-r--r--build/export_generators/ide-gradle/build.gradle.kts.proto.jinja92
-rw-r--r--build/export_generators/ide-gradle/generator.toml2
-rw-r--r--build/export_generators/ide-gradle/settings.gradle.kts.jinja8
-rw-r--r--build/external_resources/yexport/resources.json6
-rw-r--r--build/mapping.conf.json24
-rw-r--r--build/platform/test_tool/host.ya.make.inc20
-rw-r--r--build/platform/test_tool/host_os.ya.make.inc20
-rw-r--r--build/plugins/lib/test_const/__init__.py1
-rw-r--r--build/sysincl/emscripten.yml348
-rw-r--r--build/sysincl/stl-to-libcxx.yml52
-rw-r--r--build/ya.conf.json61
-rw-r--r--build/ymake.core.conf2
-rwxr-xr-xbuild/ymake_conf.py3
-rw-r--r--cmake/global_flags.compiler.msvc.cmake13
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/adjacent_find.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/all_of.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/any_of.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/binary_search.h7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/comp.h50
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h23
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/copy.h16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_backward.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_if.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_n.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/count.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/count_if.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/equal.h29
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/equal_range.h13
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/fill.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/fill_n.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/find.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/find_end.h16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/find_first_of.h11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/find_if.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/find_if_not.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/for_each.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/for_each_n.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/generate.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/generate_n.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/half_positive.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/in_found_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_out_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_out_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/includes.h16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/inplace_merge.h11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap.h7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap_until.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/is_partitioned.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/is_permutation.h37
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/is_sorted.h7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/is_sorted_until.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/iter_swap.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/iterator_operations.h32
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/lexicographical_compare.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/lower_bound.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/make_heap.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/make_projected.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/max.h11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/max_element.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/merge.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/min.h11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/min_element.h11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/min_max_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax_element.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/mismatch.h16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/move.h16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/move_backward.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/next_permutation.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/none_of.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h13
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort_copy.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/partition.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/partition_copy.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/partition_point.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/prev_permutation.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/push_heap.h11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_adjacent_find.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_all_of.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_any_of.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_binary_search.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_backward.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_if.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_n.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count_if.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal_range.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill_n.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_end.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_first_of.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if_not.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each_n.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate_n.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_includes.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_inplace_merge.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap_until.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_partitioned.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_permutation.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted_until.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_iterator_concept.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lexicographical_compare.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lower_bound.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_make_heap.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max_element.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_merge.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax.h11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax_element.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_mismatch.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move_backward.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_next_permutation.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_none_of.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_nth_element.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort_copy.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition.h7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_copy.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_point.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_pop_heap.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_prev_permutation.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_push_heap.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy_if.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_if.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy_if.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_if.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse_copy.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate_copy.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sample.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_search.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_search_n.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_difference.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_intersection.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_symmetric_difference.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_union.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort_heap.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_partition.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_sort.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_transform.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique_copy.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_upper_bound.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/remove.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_copy.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_copy_if.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_if.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/replace.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_copy.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_copy_if.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_if.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse_copy.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate.h20
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate_copy.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h18
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/search_n.h16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/set_difference.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/set_intersection.h11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/set_symmetric_difference.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/set_union.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/shuffle.h24
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/sort.h68
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/sort_heap.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_partition.h15
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_sort.h13
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/swap_ranges.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/transform.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/unique.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/unique_copy.h19
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_iter.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_range.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/upper_bound.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__assert8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__bit_reference165
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__bits91
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__bsd_locale_fallbacks.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__charconv/chars_format.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__charconv/from_chars_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__charconv/tables.h46
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__charconv/to_chars_base_10.h38
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__charconv/to_chars_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/convert_to_timespec.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/convert_to_tm.h68
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/day.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/duration.h44
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/file_clock.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/formatter.h443
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/hh_mm_ss.h34
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/month.h35
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/month_weekday.h24
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/monthday.h75
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/ostream.h145
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/parser_std_format_spec.h403
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/statically_widen.h52
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/steady_clock.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/system_clock.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/time_point.h34
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/weekday.h38
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/year.h41
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/year_month.h45
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/year_month_day.h74
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__chrono/year_month_weekday.h56
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__compare/compare_three_way_result.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__compare/ordering.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__compare/three_way_comparable.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/assignable.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/class_or_enum.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/equality_comparable.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/swappable.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__config158
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__config_site4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__coroutine/coroutine_handle.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__coroutine/coroutine_traits.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__coroutine/noop_coroutine_handle.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__coroutine/trivial_awaitables.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__debug27
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__debug_utils/randomize_range.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h19
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/filesystem_error.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h61
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/space_info.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/buffer.h293
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/concepts.h35
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/escaped_output_table.h1038
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/extended_grapheme_cluster_table.h1671
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h38
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_arg_store.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_args.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_context.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_error.h14
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_functions.h663
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_parse_context.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_string.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_to_n_result.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_char.h13
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_floating_point.h106
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_integer.h28
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_integral.h7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_output.h335
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h27
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h61
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/unicode.h171
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/binary_negate.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/bind.h28
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/boyer_moore_searcher.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/default_searcher.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/function.h1633
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/hash.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/invoke.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/is_transparent.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/mem_fn.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/not_fn.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/operations.h95
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/reference_wrapper.h16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/unary_negate.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__fwd/array.h26
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__fwd/get.h95
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__fwd/hash.h25
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__fwd/memory_resource.h27
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__fwd/pair.h25
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__fwd/span.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__fwd/string.h110
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__fwd/string_view.h19
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__fwd/tuple.h29
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__hash_table51
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/access.h16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/back_insert_iterator.h17
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/bounded_iter.h28
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h15
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/concepts.h16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/counted_iterator.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/distance.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/front_insert_iterator.h15
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/incrementable_traits.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/insert_iterator.h16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/iter_swap.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h23
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/move_iterator.h53
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/next.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/ostreambuf_iterator.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/prev.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/projected.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/readable_traits.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_access.h20
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h70
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h68
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__locale116
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/addressof.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/align.h25
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/allocator.h20
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/allocator_arg_t.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/allocator_destructor.h42
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/allocator_traits.h44
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/builtin_new_allocator.h70
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h24
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/concepts.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/construct_at.h17
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/destruct_n.h64
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/pointer_traits.h25
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/ranges_construct_at.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/ranges_uninitialized_algorithms.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/raw_storage_iterator.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h88
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/swap_allocator.h7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/temp_value.h56
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/temporary_buffer.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/uninitialized_algorithms.h18
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h368
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/uses_allocator_construction.h219
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/voidify.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory_resource/memory_resource.h75
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory_resource/monotonic_buffer_resource.h119
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory_resource/polymorphic_allocator.h178
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory_resource/pool_options.h38
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory_resource/synchronized_pool_resource.h94
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory_resource/unsynchronized_pool_resource.h106
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__mutex_base2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__node_handle7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__numeric/accumulate.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__numeric/adjacent_difference.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__numeric/exclusive_scan.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__numeric/gcd_lcm.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__numeric/inclusive_scan.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__numeric/inner_product.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__numeric/iota.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__numeric/midpoint.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__numeric/partial_sum.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__numeric/reduce.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__numeric/transform_exclusive_scan.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__numeric/transform_inclusive_scan.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__numeric/transform_reduce.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/bernoulli_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/binomial_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/cauchy_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/chi_squared_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/discard_block_engine.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/discrete_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/exponential_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/extreme_value_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/fisher_f_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/gamma_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/generate_canonical.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/geometric_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/independent_bits_engine.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/is_seed_sequence.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/linear_congruential_engine.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/log2.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/mersenne_twister_engine.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/negative_binomial_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/normal_distribution.h40
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/piecewise_constant_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/piecewise_linear_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/poisson_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/shuffle_order_engine.h42
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/student_t_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/subtract_with_carry_engine.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/uniform_int_distribution.h20
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/uniform_real_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/weibull_distribution.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/access.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/all.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/common_view.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/concepts.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/copyable_box.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/counted.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/data.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/drop_view.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/drop_while_view.h129
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/empty.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/empty_view.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/enable_view.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/filter_view.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/iota_view.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/istream_view.h140
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/lazy_split_view.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/non_propagating_cache.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/owning_view.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/range_adaptor.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/rbegin.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/ref_view.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/rend.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/single_view.h7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/size.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/subrange.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/take_view.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/take_while_view.h177
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/transform_view.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/view_interface.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/views.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/zip_view.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__split_buffer182
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__string/char_traits.h390
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/android/locale_bionic.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/fuchsia/xlocale.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/ibm/gettod_zos.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/ibm/locale_mgmt_zos.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/ibm/nanosleep.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/ibm/xlocale.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/musl/xlocale.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/newlib/xlocale.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/openbsd/xlocale.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/win32/limits_msvc_win32.h71
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/win32/locale_win32.h123
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__nop_locale_mgmt.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__posix_l_fallback.h34
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__strtonum_fallback.h15
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__thread/poll_with_backoff.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__thread/timed_backoff_policy.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__threading_support79
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__tree61
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__tuple570
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__tuple/apply_cv.h70
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__tuple/make_tuple_types.h84
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__tuple/sfinae_helpers.h198
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_element.h109
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_indices.h37
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_like.h44
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_size.h75
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_types.h24
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/add_lvalue_reference.h30
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/add_pointer.h28
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/add_rvalue_reference.h31
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/aligned_storage.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/alignment_of.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/apply_cv.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/can_extract_key.h56
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/common_type.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/conditional.h13
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/conjunction.h41
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/copy_cvref.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/decay.h18
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/dependent_type.h25
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/disjunction.h7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/has_virtual_destructor.h11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_allocator.h36
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_assignable.h35
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_char_like_type.h28
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_class.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_constant_evaluated.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_constructible.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_convertible.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_copy_assignable.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_copy_constructible.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_default_constructible.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_destructible.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_enum.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_floating_point.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_implicitly_default_constructible.h48
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_integral.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_literal_type.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_function_pointer.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_object_pointer.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_pointer.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_move_assignable.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_move_constructible.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_assignable.h29
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_constructible.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_copy_assignable.h11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_copy_constructible.h15
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_default_constructible.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_destructible.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_move_assignable.h11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_move_constructible.h13
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_null_pointer.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_pod.h14
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_pointer.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_reference_wrapper.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_referenceable.h18
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_standard_layout.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_swappable.h165
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivial.h7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_assignable.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_constructible.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copy_assignable.h11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copy_constructible.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copyable.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_default_constructible.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_destructible.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_move_assignable.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_move_constructible.h7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_union.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_unsigned.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/is_void.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/make_const_lvalue_ref.h26
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/make_signed.h30
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/make_unsigned.h36
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/maybe_const.h26
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/negation.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/noexcept_move_assign_container.h35
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/promote.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/rank.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_all_extents.h15
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_const.h16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_const_ref.h27
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_cv.h18
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_cvref.h14
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_extent.h15
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_pointer.h15
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_reference.h15
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_volatile.h16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/result_of.h39
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__type_traits/void_t.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/as_const.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/convert_to_integral.h72
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/exchange.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/forward.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/forward_like.h45
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/in_place.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/integer_sequence.h66
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/move.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/pair.h231
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/swap.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/transaction.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__variant/monostate.h32
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__verbose_abort2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/algorithm24
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/any98
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/array140
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/atomic112
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/barrier21
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/bit16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/bitset281
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cassert9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cctype8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cerrno9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cfenv9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cfloat9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/charconv158
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/chrono96
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cinttypes13
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/climits9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/clocale9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cmath19
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/codecvt448
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/complex81
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/complex.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/condition_variable7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/coroutine10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/csignal6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cstdarg9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cstddef35
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cstdint9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cstdio9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cstdlib9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cstring9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/ctime9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/ctype.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cwchar9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cwctype9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/deque1611
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/errno.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/exception74
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/fenv.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/filesystem236
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/float.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/format637
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/forward_list89
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/fstream42
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/functional14
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/future45
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/initializer_list14
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/inttypes.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/iomanip16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/ios67
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/iosfwd27
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/iostream2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/istream18
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/iterator18
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/latch12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/limits10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/limits.h19
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/list67
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/locale134
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/locale.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/map81
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/math.h1181
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/memory344
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/memory_resource65
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/mutex18
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/new30
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/numeric11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/optional123
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/ostream48
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/queue11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/random31
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/ranges54
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/regex59
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/semaphore32
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/set34
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/setjmp.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/shared_mutex55
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/span137
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/sstream81
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/stack11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/stdbool.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/stddef.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/stdexcept22
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/stdint.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/stdio.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/stdlib.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/streambuf6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/string1604
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/string.h72
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/string_view353
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/strstream22
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/system_error125
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/thread36
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/tuple250
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/type_traits282
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/typeindex27
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/typeinfo51
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/unordered_map67
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/unordered_set36
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/utility33
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/valarray25
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/variant346
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/vector1205
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/version21
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/wchar.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/atomic.cpp6
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/charconv.cpp4
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h20
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp3
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/format.cpp2
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/include/apple_availability.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/include/ryu/digit_table.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/ios.instantiations.cpp3
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/locale.cpp318
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/memory.cpp8
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/memory_resource.cpp479
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/memory_resource_init_helper.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/optional.cpp10
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/shared_mutex.cpp14
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/string.cpp4
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/support/runtime/stdexcept_vcruntime.ipp2
-rw-r--r--contrib/libs/cxxsupp/libcxx/ya.make37
-rw-r--r--contrib/libs/cxxsupp/libcxxmsvc/include/__iterator/iterator_traits.h2
-rw-r--r--contrib/python/google-auth/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/google-auth/py3/google/auth/_refresh_worker.py109
-rw-r--r--contrib/python/google-auth/py3/google/auth/credentials.py97
-rw-r--r--contrib/python/google-auth/py3/google/auth/external_account.py10
-rw-r--r--contrib/python/google-auth/py3/google/auth/external_account_authorized_user.py12
-rw-r--r--contrib/python/google-auth/py3/google/auth/impersonated_credentials.py5
-rw-r--r--contrib/python/google-auth/py3/google/auth/version.py2
-rw-r--r--contrib/python/google-auth/py3/google/oauth2/credentials.py17
-rw-r--r--contrib/python/google-auth/py3/google/oauth2/service_account.py10
-rw-r--r--contrib/python/google-auth/py3/tests/oauth2/test_credentials.py12
-rw-r--r--contrib/python/google-auth/py3/tests/test__refresh_worker.py156
-rw-r--r--contrib/python/google-auth/py3/tests/test_credentials.py118
-rw-r--r--contrib/python/google-auth/py3/tests/test_downscoped.py18
-rw-r--r--contrib/python/google-auth/py3/tests/test_external_account.py10
-rw-r--r--contrib/python/google-auth/py3/tests/test_external_account_authorized_user.py31
-rw-r--r--contrib/python/google-auth/py3/tests/test_impersonated_credentials.py2
-rw-r--r--contrib/python/google-auth/py3/ya.make3
-rw-r--r--contrib/python/pg8000/.dist-info/METADATA40
-rw-r--r--contrib/python/pg8000/README.rst38
-rw-r--r--contrib/python/pg8000/pg8000/converters.py154
-rw-r--r--contrib/python/pg8000/pg8000/core.py16
-rw-r--r--contrib/python/pg8000/ya.make2
-rw-r--r--contrib/python/traitlets/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/traitlets/py3/tests/_warnings.py1
-rw-r--r--contrib/python/traitlets/py3/tests/config/test_application.py10
-rw-r--r--contrib/python/traitlets/py3/tests/config/test_argcomplete.py8
-rw-r--r--contrib/python/traitlets/py3/tests/config/test_configurable.py5
-rw-r--r--contrib/python/traitlets/py3/tests/config/test_loader.py6
-rw-r--r--contrib/python/traitlets/py3/tests/test_traitlets.py19
-rw-r--r--contrib/python/traitlets/py3/tests/test_traitlets_docstring.py2
-rw-r--r--contrib/python/traitlets/py3/tests/test_traitlets_enum.py3
-rw-r--r--contrib/python/traitlets/py3/tests/utils/test_bunch.py2
-rw-r--r--contrib/python/traitlets/py3/tests/utils/test_decorators.py2
-rw-r--r--contrib/python/traitlets/py3/tests/utils/test_importstring.py1
-rw-r--r--contrib/python/traitlets/py3/traitlets/__init__.py2
-rw-r--r--contrib/python/traitlets/py3/traitlets/_version.py4
-rw-r--r--contrib/python/traitlets/py3/traitlets/config/__init__.py4
-rw-r--r--contrib/python/traitlets/py3/traitlets/config/application.py14
-rw-r--r--contrib/python/traitlets/py3/traitlets/config/argcomplete_config.py4
-rw-r--r--contrib/python/traitlets/py3/traitlets/config/configurable.py2
-rw-r--r--contrib/python/traitlets/py3/traitlets/config/loader.py24
-rw-r--r--contrib/python/traitlets/py3/traitlets/config/manager.py3
-rw-r--r--contrib/python/traitlets/py3/traitlets/config/sphinxdoc.py3
-rw-r--r--contrib/python/traitlets/py3/traitlets/log.py2
-rw-r--r--contrib/python/traitlets/py3/traitlets/tests/utils.py2
-rw-r--r--contrib/python/traitlets/py3/traitlets/traitlets.py62
-rw-r--r--contrib/python/traitlets/py3/traitlets/utils/decorators.py1
-rw-r--r--contrib/python/traitlets/py3/traitlets/utils/descriptions.py3
-rw-r--r--contrib/python/traitlets/py3/traitlets/utils/getargspec.py2
-rw-r--r--contrib/python/traitlets/py3/traitlets/utils/importstring.py2
-rw-r--r--contrib/python/traitlets/py3/traitlets/utils/nested_update.py2
-rw-r--r--contrib/python/traitlets/py3/traitlets/utils/text.py4
-rw-r--r--contrib/python/traitlets/py3/ya.make2
-rw-r--r--contrib/tools/bison/bison/data/lalr1.cc2
-rw-r--r--library/cpp/clickhouse/client/client.cpp25
-rw-r--r--library/cpp/clickhouse/client/client.h2
-rw-r--r--library/python/strings/__init__.py3
-rw-r--r--library/python/strings/strings.py117
-rw-r--r--library/python/strings/ut/test_strings.py150
-rw-r--r--library/rightlib_sha.txt1
-rw-r--r--util/system/datetime.cpp6
-rw-r--r--util/system/datetime.h18
-rw-r--r--util/system/fs_win.cpp3
-rwxr-xr-xya20
-rwxr-xr-xydb/ci/rightlib/increment.sh43
-rwxr-xr-xydb/ci/rightlib/squash.sh (renamed from ydb/ci/increment.sh)13
-rw-r--r--yt/yt/build/ya_version.cpp4
-rw-r--r--yt/yt/client/api/client.h2
-rw-r--r--yt/yt/client/api/delegating_client.cpp20
-rw-r--r--yt/yt/client/api/delegating_client.h20
-rw-r--r--yt/yt/client/api/flow_client.h55
-rw-r--r--yt/yt/client/api/rpc_proxy/api_service_proxy.h12
-rw-r--r--yt/yt/client/api/rpc_proxy/client_impl.cpp90
-rw-r--r--yt/yt/client/api/rpc_proxy/client_impl.h20
-rw-r--r--yt/yt/client/driver/command.h2
-rw-r--r--yt/yt/client/driver/driver.cpp5
-rw-r--r--yt/yt/client/driver/flow_commands.cpp57
-rw-r--r--yt/yt/client/driver/flow_commands.h75
-rw-r--r--yt/yt/client/driver/ya.make1
-rw-r--r--yt/yt/client/federated/client.cpp32
-rw-r--r--yt/yt/client/federated/client.h8
-rw-r--r--yt/yt/client/hedging/hedging.cpp113
-rw-r--r--yt/yt/client/scheduler/public.h2
-rw-r--r--yt/yt/client/table_client/config.cpp67
-rw-r--r--yt/yt/client/table_client/config.h47
-rw-r--r--yt/yt/client/table_client/public.h15
-rw-r--r--yt/yt/client/unittests/mock/client.cpp29
-rw-r--r--yt/yt/client/unittests/mock/client.h418
-rw-r--r--yt/yt/client/unittests/mock/connection.h3
-rw-r--r--yt/yt/client/unittests/mock/ya.make8
-rw-r--r--yt/yt/core/concurrency/config.cpp4
-rw-r--r--yt/yt/core/concurrency/config.h4
-rw-r--r--yt/yt/core/concurrency/retrying_periodic_executor.cpp8
-rw-r--r--yt/yt/core/http/mock/client.cpp115
-rw-r--r--yt/yt/core/http/mock/client.h47
-rw-r--r--yt/yt/core/http/mock/http.h1
-rw-r--r--yt/yt/core/http/mock/ya.make1
-rw-r--r--yt/yt/core/misc/proc.cpp21
-rw-r--r--yt/yt/core/misc/proc.h3
-rw-r--r--yt/yt/core/net/connection.cpp7
-rw-r--r--yt/yt/core/net/connection.h3
-rw-r--r--yt/yt/core/test_framework/mock_http.cpp183
-rw-r--r--yt/yt/core/test_framework/mock_http.h97
-rw-r--r--yt/yt/core/test_framework/ya.make1
-rw-r--r--yt/yt/flow/lib/client/public.h39
-rw-r--r--yt/yt/library/codegen/caller.h1
-rw-r--r--yt/yt/library/process/pipe.cpp11
-rw-r--r--yt/yt/library/process/pipe.h5
-rw-r--r--yt/yt/library/process/unittests/pipes_ut.cpp106
-rw-r--r--yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto48
-rw-r--r--yt/yt_proto/yt/client/chunk_client/proto/chunk_meta.proto3
-rw-r--r--yt/yt_proto/yt/client/table_chunk_format/proto/chunk_meta.proto17
786 files changed, 21300 insertions, 13323 deletions
diff --git a/build/export_generators/hardcoded-cmake/cmake/global_flags.compiler.msvc.cmake b/build/export_generators/hardcoded-cmake/cmake/global_flags.compiler.msvc.cmake
index 1541beb834..9d553495e3 100644
--- a/build/export_generators/hardcoded-cmake/cmake/global_flags.compiler.msvc.cmake
+++ b/build/export_generators/hardcoded-cmake/cmake/global_flags.compiler.msvc.cmake
@@ -1,8 +1,11 @@
-set(_IS_CLANG_CL_COMPILER
- ${CMAKE_CXX_COMPILER_ID} STREQUAL Clang
- AND "${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC"
- AND "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC"
-)
+if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang
+ AND "${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC"
+ AND "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
+
+ set(_IS_CLANG_CL_COMPILER true)
+else()
+ set(_IS_CLANG_CL_COMPILER false)
+endif()
set(_WARNS_ENABLED
4018 # 'expression' : signed/unsigned mismatch
diff --git a/build/export_generators/ide-gradle/build.gradle.kts.jinja b/build/export_generators/ide-gradle/build.gradle.kts.jinja
index dd57a390f1..79d8b1b501 100644
--- a/build/export_generators/ide-gradle/build.gradle.kts.jinja
+++ b/build/export_generators/ide-gradle/build.gradle.kts.jinja
@@ -1,98 +1,93 @@
+{%- set mainClassTargets = targets|selectattr("app_main_class") -%}
+{%- set publish = targets|selectattr('publish') -%}
+{%- set hasJunit5Test = targets|selectattr('junit5_test') -%}
+{%- set target0 = targets[0] -%}
+{%- set with_kotlin = target0.with_kotlin -%}
+{%- set kotlin_version = target0.kotlin_version -%}
plugins {
-{% if targets|selectattr("app_main_class") -%}
+{%- if mainClassTargets %}
`application`
-{% else -%}
+{%- else %}
`java-library`
-{% endif -%}
-{% if targets|selectattr('publish') -%}
+{%- endif %}
+{%- if publish %}
`maven-publish`
`signing`
-{% endif -%}
- kotlin("jvm") version "1.8.22"
- kotlin("plugin.allopen") version "1.8.22"
+{%- endif -%}
+{%- if with_kotlin and kotlin_version %}
+ kotlin("jvm") version "{{ kotlin_version }}"
+{%- if target0.with_kotlinc_plugin_allopen %}
+ kotlin("plugin.allopen") version "{{ kotlin_version }}"
+{% endif -%}
+{%- if target0.with_kotlinc_plugin_lombok %}
+ kotlin("plugin.lombok") version "{{ kotlin_version }}"
+{% endif -%}
+{%- if target0.with_kotlinc_plugin_noarg %}
+ kotlin("plugin.noarg") version "{{ kotlin_version }}"
+{% endif -%}
+{%- if target0.with_kotlinc_plugin_serialization %}
+ kotlin("plugin.serialization") version "{{ kotlin_version }}"
+{% endif -%}
+{%- endif %}
}
+{%- if target0.with_kotlinc_plugin_allopen %}
allOpen {
annotation("org.springframework.stereotype.Component")
}
+{% endif -%}
+{%- if with_kotlin %}
kotlin {
- jvmToolchain(17)
+ jvmToolchain({%- if target0.required_jdk -%}{{ target0.required_jdk }}{%- else -%}17{%- endif -%})
}
+{% endif -%}
+{%- if publish %}
-{% if targets|selectattr('publish') -%}
-group = "{{ targets[0].publish_group }}"
-version = project.properties["version"]
+group = "{{ target0.publish_group }}"
+version = {% if target0.publish_version and target0.publish_version != "no" -%}"{{ target0.publish_version }}"{%- else -%}project.properties["version"]{%- endif %}
+{% endif %}
-{% endif -%}
repositories {
mavenCentral()
}
-configurations {
- all {
- exclude(group = "ch.qos.logback", module = "logback-classic")
- exclude(group = "org.apache.logging.log4j", module = "log4j-to-slf4j")
- }
-}
+val project_root="{%- if exportRoot.startswith(arcadiaRoot + '/') -%}{{ arcadiaRoot }}{%- else -%}{{ exportRoot }}{%- endif -%}"
-{% if targets|selectattr("app_main_class") -%}
+{% if mainClassTargets -%}
application {
-{% for target in targets|selectattr("app_main_class") -%}
+{%- for target in mainClassTargets %}
mainClass.set("{{ target.app_main_class }}")
-{% endfor -%}
+{% endfor -%}
}
-{% endif -%}
+{% endif -%}
java {
withSourcesJar()
withJavadocJar()
}
-{% if target.jar_source_set is defined -%}
-{% for source_set in target.jar_source_set -%}
-{%- set srcdir, glob = source_set.split(':') -%}
-sourceSets.main.java.srcDirs += '{{ srcdir }}'
-{% endfor -%}
-{% endif -%}
+configurations.api {
+ isTransitive = false
+}
-dependencies {
-{% for target in targets -%}
-{% if target.junit5_test -%}
- testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
-
- api("org.apache.commons:commons-math3:3.6.1")
-
- api("com.google.guava:guava:31.0.1-jre")
-{% endif -%}
-{% for library in target.consumer -%}
-{% set classpath = library.classpath -%}
-{% if targets|selectattr("app_main_class") -%}
-{% if library.excludes.consumer is defined %}
- implementation({{ classpath }}) {
-{% for exclude in library.excludes.consumer -%}
-{% set classpath_parts = exclude.classpath.split(':') -%}
- exclude group: '{{ classpath_parts[0] }}', module: '{{ classpath_parts[1] }}'
-{% endfor -%}
- }
-{% else -%}
- implementation({{ classpath }})
-{% endif -%}
-{% elif target.isTest -%}
- testImplementation({{ classpath }})
-{% else -%}
- api({{ classpath }})
-{% endif -%}
-{% endfor -%}
-{% endfor -%}
+configurations.implementation {
+ isTransitive = false
}
-{% if targets|selectattr("junit5_test") -%}
-tasks.named<Test>("test") {
- useJUnitPlatform()
+configurations.testImplementation {
+ isTransitive = false
}
-{% endif -%}
+{% if hasTest -%}
+val testsJar by tasks.registering(Jar::class) {
+ dependsOn(JavaPlugin.COMPILE_TEST_JAVA_TASK_NAME)
+ archiveClassifier.set("tests")
+ from(sourceSets["test"].output)
+}
+
+artifacts.add(configurations.create("testArtifacts").name, testsJar)
+
tasks.test {
testLogging {
showStandardStreams = true
@@ -100,6 +95,58 @@ tasks.test {
}
}
+{% endif -%}
+
+{% for target in targets -%}
+{%- if target.jar_source_set is defined -%}
+{%- for source_set in target.jar_source_set -%}
+{%- set srcdir_glob = split(source_set, ':') -%}
+sourceSets.main.java.srcDirs += "{{ srcdir_glob[0] }}"
+{% endfor -%}
+{%- endif -%}
+{%- endfor -%}
+
+dependencies {
+{%- for target in targets -%}
+{%- for library in target.consumer if library.classpath -%}
+{%- if library.prebuilt and library.jar and (library.type != "contrib" or build_contribs) -%}
+{%- if target.isTest %}
+ testImplementation
+{%- else %}
+ implementation
+{%- endif -%}(files("$project_root/{{ library.jar }}"))
+{%- else -%}
+{%- if target.isTest %}
+{%- if library.type != "contrib" and library.test2test %}
+ testImplementation(project(path = ":{{ library.test2test | replace("/", ":") }}", configuration = "testArtifacts"))
+{%- else %}
+ testImplementation({{ library.classpath }})
+{%- endif %}
+{%- elif library.type != "contrib" %}
+ implementation({{ library.classpath }})
+{%- else %}
+ api({{ library.classpath }})
+{%- endif -%}
+{%- if library.excludes.consumer is defined %} {
+{% for exclude in library.excludes.consumer if exclude.classpath -%}
+{% set classpath = exclude.classpath|replace('"','') -%}
+{% set classpath_parts = split(classpath, ':') -%}
+ exclude(group = "{{ classpath_parts[0] }}", module = "{{ classpath_parts[1] }}")
+{% endfor -%}
+ }
+{%- endif -%}
+{%- endif -%}
+{%- endfor -%}
+{%- endfor %}
+}
+
+{% if hasJunit5Test -%}
+tasks.named<Test>("test") {
+ useJUnitPlatform()
+}
+
+{% endif -%}
+
{% set runs = targets|selectattr("runs") -%}
{% if runs -%}
{% for run in runs -%}
@@ -146,15 +193,9 @@ tasks.build.dependsOn(
{% endfor -%}
{% endif -%}
-val testsJar by tasks.registering(Jar::class) {
- dependsOn(JavaPlugin.COMPILE_TEST_JAVA_TASK_NAME)
- archiveClassifier.set("tests")
- from(sourceSets["test"].output)
-}
-
-artifacts.add(configurations.create("testOutput").name, testsJar)
-
{% include "extra-tests.gradle.kts" ignore missing %}
-{% if targets|selectattr('publish') -%}
-{% include 'publish.gradle.kts' -%}
+{% if publish -%}
+{% include 'publish.gradle.kts' ignore missing -%}
{% endif -%}
+
+{{ dump }}
diff --git a/build/export_generators/ide-gradle/build.gradle.kts.proto.jinja b/build/export_generators/ide-gradle/build.gradle.kts.proto.jinja
index 43e6ec3529..c7e15a8779 100644
--- a/build/export_generators/ide-gradle/build.gradle.kts.proto.jinja
+++ b/build/export_generators/ide-gradle/build.gradle.kts.proto.jinja
@@ -1,3 +1,5 @@
+{%- set publish = targets|selectattr('publish') -%}
+{%- set target0 = targets[0] -%}
import com.google.protobuf.gradle.*
val buildProtoDir = File("${buildDir}", "__proto__")
@@ -5,16 +7,16 @@ val buildProtoDir = File("${buildDir}", "__proto__")
plugins {
id("java-library")
id("com.google.protobuf") version "0.8.19"
-{% if targets|selectattr('publish') -%}
+{%- if publish %}
`maven-publish`
`signing`
-{% endif -%}
+{%- endif -%}
}
+{%- if publish %}
-{% if targets|selectattr('publish') -%}
-group = "{{ targets[0].publish_group }}"
-version = project.properties["version"]
-{% endif -%}
+group = "{{ target0.publish_group }}"
+version = {% if target0.publish_version -%}"{{ target0.publish_version }}"{%- else -%}project.properties["version"]{%- endif %}
+{%- endif %}
repositories {
mavenCentral()
@@ -25,15 +27,58 @@ java {
withJavadocJar()
}
+configurations.api {
+ isTransitive = false
+}
+
+configurations.implementation {
+ isTransitive = false
+}
+
+configurations.testImplementation {
+ isTransitive = false
+}
+
+{% for target in targets -%}
+{%- if target.jar_source_set is defined -%}
+{%- for source_set in target.jar_source_set -%}
+{%- set srcdir_glob = split(source_set, ':') -%}
+sourceSets.main.java.srcDirs += "{{ srcdir_glob[0] }}"
+{% endfor -%}
+{%- endif -%}
+{%- endfor -%}
+
dependencies {
-{% if targets[0].consumer is defined -%}
-{%- for library in targets[0].consumer -%}
- api({{ library.classpath }})
-{% endfor -%}
-{%- endif -%}
+{%- for target in targets -%}
+{%- for library in target.consumer if library.classpath -%}
+{%- if library.prebuilt and library.jar and (library.type != "contrib" or target.handler.build_contribs) -%}
+{%- if target.isTest %}
+ testImplementation
+{%- else %}
+ implementation
+{%- endif -%}(files("$project_root/{{ library.jar }}"))
+{%- else -%}
+{%- if target.isTest %}
+ testImplementation
+{%- elif library.type != "contrib" %}
+ implementation
+{%- else %}
+ api
+{%- endif -%}({{ library.classpath }})
+{%- if library.excludes.consumer is defined %} {
+{% for exclude in library.excludes.consumer -%}
+{% set classpath = exclude.classpath|replace('"','') -%}
+{% set classpath_parts = split(classpath, ':') -%}
+ exclude(group = "{{ classpath_parts[0] }}", module = "{{ classpath_parts[1] }}")
+{% endfor -%}
+ }
+{%- endif -%}
+{%- endif -%}
+{%- endfor -%}
+{%- endfor %}
-{% if targets[0].proto_namespace is defined -%}
- protobuf(files(File(buildProtoDir, "{{ targets[0].proto_namespace }}")))
+{% if target0.proto_namespace is defined -%}
+ protobuf(files(File(buildProtoDir, "{{ target0.proto_namespace }}")))
{% else -%}
protobuf(files(buildProtoDir))
{% endif -%}
@@ -42,18 +87,12 @@ dependencies {
protobuf {
protoc {
// Download from repositories
- artifact = "com.google.protobuf:protoc:
-{%- if targets[0].proto_compiler_version is defined -%}
-{{ targets[0].proto_compiler_version }}
-{%- else -%}
-3.22.5
-{%- endif -%}
-"
+ artifact = "com.google.protobuf:protoc:{%- if target0.proto_compiler_version is defined -%}{{ target0.proto_compiler_version }}{%- else -%}3.22.5{%- endif -%}"
}
-{% if targets[0].proto_grpc is defined -%}
+{% if target0.proto_grpc is defined -%}
plugins {
id("grpc") {
- artifact = "io.grpc:protoc-gen-grpc-java:1.45.0"
+ artifact = "io.grpc:protoc-gen-grpc-java:{%- if target0.proto_grpc_version -%}{{ target0.proto_grpc_version }}{%- else -%}1.45.0{%- endif -%}"
}
}
generateProtoTasks {
@@ -68,9 +107,9 @@ protobuf {
val prepareProto = tasks.register<Copy>("prepareProto") {
from(rootDir) {
-{% for proto in targets[0].proto_files -%}
+{%- for proto in target0.proto_files %}
include("{{ proto }}")
-{% endfor -%}
+{%- endfor %}
}
into(buildProtoDir)
}
@@ -78,6 +117,5 @@ val prepareProto = tasks.register<Copy>("prepareProto") {
afterEvaluate {
tasks.getByName("extractProto").dependsOn(prepareProto)
}
-{% if targets|selectattr('publish') -%}
-{% include 'publish.gradle.kts' -%}
-{% endif -%}
+
+{{ dump }}
diff --git a/build/export_generators/ide-gradle/generator.toml b/build/export_generators/ide-gradle/generator.toml
index ad5799c415..7a33da1647 100644
--- a/build/export_generators/ide-gradle/generator.toml
+++ b/build/export_generators/ide-gradle/generator.toml
@@ -1,3 +1,5 @@
+use_managed_peers_closure = true
+
[root]
template="settings.gradle.kts.jinja"
copy=[
diff --git a/build/export_generators/ide-gradle/settings.gradle.kts.jinja b/build/export_generators/ide-gradle/settings.gradle.kts.jinja
index 9a22c7f6b5..623000ccf7 100644
--- a/build/export_generators/ide-gradle/settings.gradle.kts.jinja
+++ b/build/export_generators/ide-gradle/settings.gradle.kts.jinja
@@ -1,5 +1,9 @@
-rootProject.name = "{{projectName}}"
+rootProject.name = "{{ projectName }}"
{% for subdir in subdirs -%}
-include("{{ subdir | replace("/", ":") }}")
+{%- set classname = subdir | replace("/", ":") -%}
+include(":{{ classname }}")
+project(":{{ classname }}").projectDir = file("{{ exportRoot }}/{{ subdir }}")
{% endfor -%}
+
+{{ dump }}
diff --git a/build/external_resources/yexport/resources.json b/build/external_resources/yexport/resources.json
index 9c12f1f5cb..29db7808a3 100644
--- a/build/external_resources/yexport/resources.json
+++ b/build/external_resources/yexport/resources.json
@@ -1,13 +1,13 @@
{
"by_platform": {
"darwin": {
- "uri": "sbr:5664933238"
+ "uri": "sbr:5678766702"
},
"darwin-arm64": {
- "uri": "sbr:5664930673"
+ "uri": "sbr:5678770830"
},
"linux": {
- "uri": "sbr:5664937024"
+ "uri": "sbr:5678772247"
}
}
}
diff --git a/build/mapping.conf.json b/build/mapping.conf.json
index 774e314721..c9f3725ffc 100644
--- a/build/mapping.conf.json
+++ b/build/mapping.conf.json
@@ -96,7 +96,8 @@
"5545691160": "https://devtools-registry.s3.yandex.net/5545691160",
"5559524010": "https://devtools-registry.s3.yandex.net/5559524010",
"5572005924": "https://devtools-registry.s3.yandex.net/5572005924",
- "5669710623": "https://devtools-registry.s3.yandex.net/5669710623",
+ "5675381622": "https://devtools-registry.s3.yandex.net/5675381622",
+ "5683487438": "https://devtools-registry.s3.yandex.net/5683487438",
"5486731632": "https://devtools-registry.s3.yandex.net/5486731632",
"5514350352": "https://devtools-registry.s3.yandex.net/5514350352",
"5514360398": "https://devtools-registry.s3.yandex.net/5514360398",
@@ -110,8 +111,10 @@
"5559549864": "https://devtools-registry.s3.yandex.net/5559549864",
"5571992960": "https://devtools-registry.s3.yandex.net/5571992960",
"5572031172": "https://devtools-registry.s3.yandex.net/5572031172",
- "5669730969": "https://devtools-registry.s3.yandex.net/5669730969",
- "5669775571": "https://devtools-registry.s3.yandex.net/5669775571",
+ "5675476139": "https://devtools-registry.s3.yandex.net/5675476139",
+ "5675480223": "https://devtools-registry.s3.yandex.net/5675480223",
+ "5683494446": "https://devtools-registry.s3.yandex.net/5683494446",
+ "5683523790": "https://devtools-registry.s3.yandex.net/5683523790",
"4307890075": "https://devtools-registry.s3.yandex.net/4307890075",
"5517245192": "https://devtools-registry.s3.yandex.net/5517245192",
"4307901240": "https://devtools-registry.s3.yandex.net/4307901240",
@@ -137,18 +140,21 @@
"5562971772": "https://devtools-registry.s3.yandex.net/5562971772",
"5641388522": "https://devtools-registry.s3.yandex.net/5641388522",
"5664938929": "https://devtools-registry.s3.yandex.net/5664938929",
+ "5678782352": "https://devtools-registry.s3.yandex.net/5678782352",
"5486590469": "https://devtools-registry.s3.yandex.net/5486590469",
"5498750509": "https://devtools-registry.s3.yandex.net/5498750509",
"5534043120": "https://devtools-registry.s3.yandex.net/5534043120",
"5562958333": "https://devtools-registry.s3.yandex.net/5562958333",
"5641392899": "https://devtools-registry.s3.yandex.net/5641392899",
"5664942614": "https://devtools-registry.s3.yandex.net/5664942614",
+ "5678784246": "https://devtools-registry.s3.yandex.net/5678784246",
"5486590393": "https://devtools-registry.s3.yandex.net/5486590393",
"5498735180": "https://devtools-registry.s3.yandex.net/5498735180",
"5534059422": "https://devtools-registry.s3.yandex.net/5534059422",
"5562961825": "https://devtools-registry.s3.yandex.net/5562961825",
"5641386025": "https://devtools-registry.s3.yandex.net/5641386025",
"5664939545": "https://devtools-registry.s3.yandex.net/5664939545",
+ "5678781047": "https://devtools-registry.s3.yandex.net/5678781047",
"5476908047": "https://devtools-registry.s3.yandex.net/5476908047",
"5509380757": "https://devtools-registry.s3.yandex.net/5509380757",
"5550834592": "https://devtools-registry.s3.yandex.net/5550834592",
@@ -278,7 +284,8 @@
"5545691160": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
"5559524010": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
"5572005924": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
- "5669710623": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
+ "5675381622": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
+ "5683487438": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
"5486731632": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
"5514350352": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
"5514360398": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
@@ -292,8 +299,10 @@
"5559549864": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
"5571992960": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
"5572031172": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
- "5669730969": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
- "5669775571": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
+ "5675476139": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
+ "5675480223": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
+ "5683494446": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
+ "5683523790": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
"4307890075": "flake8_linter for linux",
"5517245192": "flake8_linter for linux",
"4307901240": "flake8_linter for linux-aarch64",
@@ -319,18 +328,21 @@
"5562971772": "yexport for darwin",
"5641388522": "yexport for darwin",
"5664938929": "yexport for darwin",
+ "5678782352": "yexport for darwin",
"5486590469": "yexport for darwin-arm64",
"5498750509": "yexport for darwin-arm64",
"5534043120": "yexport for darwin-arm64",
"5562958333": "yexport for darwin-arm64",
"5641392899": "yexport for darwin-arm64",
"5664942614": "yexport for darwin-arm64",
+ "5678784246": "yexport for darwin-arm64",
"5486590393": "yexport for linux",
"5498735180": "yexport for linux",
"5534059422": "yexport for linux",
"5562961825": "yexport for linux",
"5641386025": "yexport for linux",
"5664939545": "yexport for linux",
+ "5678781047": "yexport for linux",
"5476908047": "ymake for darwin",
"5509380757": "ymake for darwin",
"5550834592": "ymake for darwin",
diff --git a/build/platform/test_tool/host.ya.make.inc b/build/platform/test_tool/host.ya.make.inc
index 574114fd56..697840cd95 100644
--- a/build/platform/test_tool/host.ya.make.inc
+++ b/build/platform/test_tool/host.ya.make.inc
@@ -1,17 +1,17 @@
IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5669709337)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5669729085)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5683484470)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5683521134)
ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5669708785)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5669728222)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5683482983)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5683519798)
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5669710623)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5669730969)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5683487438)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5683523790)
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5669708289)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5669727277)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5683481887)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5683518214)
ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5669710089)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5669729907)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5683485916)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5683522479)
ENDIF()
diff --git a/build/platform/test_tool/host_os.ya.make.inc b/build/platform/test_tool/host_os.ya.make.inc
index d040dca797..242af2a00f 100644
--- a/build/platform/test_tool/host_os.ya.make.inc
+++ b/build/platform/test_tool/host_os.ya.make.inc
@@ -1,17 +1,17 @@
IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5669773014)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5669773014)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5683492365)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5683492365)
ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5669771519)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5669771519)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5683491099)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5683491099)
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5669775571)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5669775571)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5683494446)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5683494446)
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5669770320)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5669770320)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5683480873)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5683480873)
ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5669774343)
- DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5669774343)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5683493431)
+ DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5683493431)
ENDIF()
diff --git a/build/plugins/lib/test_const/__init__.py b/build/plugins/lib/test_const/__init__.py
index 52aa8a05b8..8037a5c266 100644
--- a/build/plugins/lib/test_const/__init__.py
+++ b/build/plugins/lib/test_const/__init__.py
@@ -400,6 +400,7 @@ class YaTestTags(Enum):
YtRunner = "ya:yt"
CopyData = "ya:copydata"
CopyDataRO = "ya:copydataro"
+ NoPstreeTrim = "ya:no_pstree_trim"
class ServiceTags(Enum):
diff --git a/build/sysincl/emscripten.yml b/build/sysincl/emscripten.yml
index a7c03e6228..5876862aae 100644
--- a/build/sysincl/emscripten.yml
+++ b/build/sysincl/emscripten.yml
@@ -1 +1,349 @@
- includes:
+ - arpa/inet.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/arpa/inet.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/arpa/inet.h
+ - crypt.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/crypt.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/crypt.h
+ - errno.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/errno.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/errno.h
+ - features.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/features.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/features.h
+ - langinfo.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/langinfo.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/langinfo.h
+ - pthread.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/pthread.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/pthread.h
+ - resolv.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/resolv.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/resolv.h
+ - signal.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/signal.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/signal.h
+ - stdio.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/stdio.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/stdio.h
+ - stdlib.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/stdlib.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/stdlib.h
+ - contrib/libs/cxxsupp/libcxx/include/stdlib.h
+ - string.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/string.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/string.h
+ - sys/auxv.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/sys/auxv.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/sys/auxv.h
+ - sys/membarrier.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/sys/membarrier.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/sys/membarrier.h
+ - sys/mman.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/sys/mman.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/sys/mman.h
+ - sys/sysinfo.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/sys/sysinfo.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/sys/sysinfo.h
+ - sys/time.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/sys/time.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/sys/time.h
+ - time.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/time.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/time.h
+
+ - unistd.h:
+ - contrib/restricted/emscripten/system/include/compat/sys/unistd.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/unistd.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/unistd.h
+
+ - wchar.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/wchar.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/include/wchar.h
+
+ - fenv.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/fenv.h
+
+ - bits/fenv.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/arch/generic/bits/fenv.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/arch/emscripten/bits/fenv.h
+
+ - bits/resource.h: contrib/restricted/emscripten/system/lib/libc/musl/arch/generic/bits/resource.h
+
+ - bits/alltypes.h: contrib/restricted/emscripten/system/lib/libc/musl/arch/emscripten/bits/alltypes.h
+ - bits/stdint.h: contrib/restricted/emscripten/system/lib/libc/musl/arch/emscripten/bits/stdint.h
+ - bits/float.h: contrib/restricted/emscripten/system/lib/libc/musl/arch/emscripten/bits/float.h
+ - bits/posix.h: contrib/restricted/emscripten/system/lib/libc/musl/arch/emscripten/bits/posix.h
+
+ - bits/errno.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/arch/generic/bits/errno.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/arch/emscripten/bits/errno.h
+
+ - bits/limits.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/arch/generic/bits/limits.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/arch/emscripten/bits/limits.h
+
+ - bits/stat.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/arch/emscripten/bits/stat.h
+
+ - bits/syscall.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/arch/emscripten/bits/syscall.h
+
+ - bits/ioctl_fix.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/arch/generic/bits/ioctl_fix.h
+
+ - bits/fcntl.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/arch/generic/bits/fcntl.h
+
+ - bits/ioctl.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/arch/generic/bits/ioctl.h
+
+ - sendfile.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/sys/sendfile.h
+
+ - bits/dirent.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/arch/generic/bits/dirent.h
+
+ - syscall.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/syscall.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/sys/syscall.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/src/internal/syscall.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/arch/emscripten/bits/syscall.h
+
+ - inttypes.h: contrib/restricted/emscripten/system/lib/libc/musl/include/inttypes.h
+ - stddef.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stddef.h
+ - stdint.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stdint.h
+
+
+ # libc & stl common headers
+ - complex.h: contrib/restricted/emscripten/system/lib/libc/musl/include/complex.h
+ - errno.h: contrib/restricted/emscripten/system/lib/libc/musl/include/errno.h
+ - float.h: contrib/restricted/emscripten/system/lib/libc/musl/include/float.h
+ - inttypes.h: contrib/restricted/emscripten/system/lib/libc/musl/include/inttypes.h
+ - limits.h: contrib/restricted/emscripten/system/lib/libc/musl/include/limits.h
+ - locale.h: contrib/restricted/emscripten/system/lib/libc/musl/include/locale.h
+ - math.h: contrib/restricted/emscripten/system/lib/libc/musl/include/math.h
+ - setjmp.h: contrib/restricted/emscripten/system/lib/libc/musl/include/setjmp.h
+ - stdbool.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stdbool.h
+ - stddef.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stddef.h
+ - stdint.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stdint.h
+ - stdio.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stdio.h
+ - stdlib.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stdlib.h
+ - string.h: contrib/restricted/emscripten/system/lib/libc/musl/include/string.h
+ - tgmath.h: contrib/restricted/emscripten/system/lib/libc/musl/include/tgmath.h
+ - threads.h: contrib/restricted/emscripten/system/lib/libc/musl/include/threads.h
+ - wchar.h: contrib/restricted/emscripten/system/lib/libc/musl/include/wchar.h
+ - wctype.h: contrib/restricted/emscripten/system/lib/libc/musl/include/wctype.h
+ - iconv.h: contrib/restricted/emscripten/system/lib/libc/musl/include/iconv.h
+
+ # Rest of libc headers
+ - aio.h: contrib/restricted/emscripten/system/lib/libc/musl/include/aio.h
+ - alloca.h: contrib/restricted/emscripten/system/lib/libc/musl/include/alloca.h
+ - ar.h: contrib/restricted/emscripten/system/lib/libc/musl/include/ar.h
+ - arpa/inet.h: contrib/restricted/emscripten/system/lib/libc/musl/include/arpa/inet.h
+ - arpa/nameser_compat.h: contrib/restricted/emscripten/system/lib/libc/musl/include/arpa/nameser_compat.h
+ - arpa/nameser.h: contrib/restricted/emscripten/system/lib/libc/musl/include/arpa/nameser.h
+ - arpa/telnet.h: contrib/restricted/emscripten/system/lib/libc/musl/include/arpa/telnet.h
+ - arpa/tftp.h: contrib/restricted/emscripten/system/lib/libc/musl/include/arpa/tftp.h
+ - assert.h: contrib/restricted/emscripten/system/lib/libc/musl/include/assert.h
+ - byteswap.h: contrib/restricted/emscripten/system/lib/libc/musl/include/byteswap.h
+ - cpio.h: contrib/restricted/emscripten/system/lib/libc/musl/include/cpio.h
+ - crypt.h: contrib/restricted/emscripten/system/lib/libc/musl/include/crypt.h
+ - ctype.h: contrib/restricted/emscripten/system/lib/libc/musl/include/ctype.h
+ - dirent.h: contrib/restricted/emscripten/system/lib/libc/musl/include/dirent.h
+ - dlfcn.h: contrib/restricted/emscripten/system/lib/libc/musl/include/dlfcn.h
+ - elf.h: contrib/restricted/emscripten/system/lib/libc/musl/include/elf.h
+ - endian.h: contrib/restricted/emscripten/system/lib/libc/musl/include/endian.h
+ - err.h: contrib/restricted/emscripten/system/lib/libc/musl/include/err.h
+ - fcntl.h: contrib/restricted/emscripten/system/lib/libc/musl/include/fcntl.h
+ - features.h: contrib/restricted/emscripten/system/lib/libc/musl/include/features.h
+ - fmtmsg.h: contrib/restricted/emscripten/system/lib/libc/musl/include/fmtmsg.h
+ - fnmatch.h: contrib/restricted/emscripten/system/lib/libc/musl/include/fnmatch.h
+ - ftw.h: contrib/restricted/emscripten/system/lib/libc/musl/include/ftw.h
+ - getopt.h: contrib/restricted/emscripten/system/lib/libc/musl/include/getopt.h
+ - glob.h: contrib/restricted/emscripten/system/lib/libc/musl/include/glob.h
+ - grp.h: contrib/restricted/emscripten/system/lib/libc/musl/include/grp.h
+ - ifaddrs.h: contrib/restricted/emscripten/system/lib/libc/musl/include/ifaddrs.h
+ - iso646.h: contrib/restricted/emscripten/system/lib/libc/musl/include/iso646.h
+ - langinfo.h: contrib/restricted/emscripten/system/lib/libc/musl/include/langinfo.h
+ - lastlog.h: contrib/restricted/emscripten/system/lib/libc/musl/include/lastlog.h
+ - libgen.h: contrib/restricted/emscripten/system/lib/libc/musl/include/libgen.h
+ - libintl.h: contrib/restricted/emscripten/system/lib/libc/musl/include/libintl.h
+ - link.h: contrib/restricted/emscripten/system/lib/libc/musl/include/link.h
+ - malloc.h: contrib/restricted/emscripten/system/lib/libc/musl/include/malloc.h
+ - memory.h: contrib/restricted/emscripten/system/lib/libc/musl/include/memory.h
+ - mntent.h: contrib/restricted/emscripten/system/lib/libc/musl/include/mntent.h
+ - monetary.h: contrib/restricted/emscripten/system/lib/libc/musl/include/monetary.h
+ - mqueue.h: contrib/restricted/emscripten/system/lib/libc/musl/include/mqueue.h
+ - netdb.h: contrib/restricted/emscripten/system/lib/libc/musl/include/netdb.h
+ - net/ethernet.h: contrib/restricted/emscripten/system/lib/libc/musl/include/net/ethernet.h
+ - net/if_arp.h: contrib/restricted/emscripten/system/lib/libc/musl/include/net/if_arp.h
+ - net/if.h: contrib/restricted/emscripten/system/lib/libc/musl/include/net/if.h
+ - netinet/ether.h: contrib/restricted/emscripten/system/lib/libc/musl/include/netinet/ether.h
+ - netinet/icmp6.h: contrib/restricted/emscripten/system/lib/libc/musl/include/netinet/icmp6.h
+ - netinet/if_ether.h: contrib/restricted/emscripten/system/lib/libc/musl/include/netinet/if_ether.h
+ - netinet/igmp.h: contrib/restricted/emscripten/system/lib/libc/musl/include/netinet/igmp.h
+ - netinet/in.h: contrib/restricted/emscripten/system/lib/libc/musl/include/netinet/in.h
+ - netinet/in_systm.h: contrib/restricted/emscripten/system/lib/libc/musl/include/netinet/in_systm.h
+ - netinet/ip6.h: contrib/restricted/emscripten/system/lib/libc/musl/include/netinet/ip6.h
+ - netinet/ip.h: contrib/restricted/emscripten/system/lib/libc/musl/include/netinet/ip.h
+ - netinet/ip_icmp.h: contrib/restricted/emscripten/system/lib/libc/musl/include/netinet/ip_icmp.h
+ - netinet/tcp.h: contrib/restricted/emscripten/system/lib/libc/musl/include/netinet/tcp.h
+ - netinet/udp.h: contrib/restricted/emscripten/system/lib/libc/musl/include/netinet/udp.h
+ - netpacket/packet.h: contrib/restricted/emscripten/system/lib/libc/musl/include/netpacket/packet.h
+ - net/route.h: contrib/restricted/emscripten/system/lib/libc/musl/include/net/route.h
+ - nl_types.h: contrib/restricted/emscripten/system/lib/libc/musl/include/nl_types.h
+ - paths.h: contrib/restricted/emscripten/system/lib/libc/musl/include/paths.h
+ - poll.h: contrib/restricted/emscripten/system/lib/libc/musl/include/poll.h
+ - pthread.h: contrib/restricted/emscripten/system/lib/libc/musl/include/pthread.h
+ - pty.h: contrib/restricted/emscripten/system/lib/libc/musl/include/pty.h
+ - pwd.h: contrib/restricted/emscripten/system/lib/libc/musl/include/pwd.h
+ - regex.h: contrib/restricted/emscripten/system/lib/libc/musl/include/regex.h
+ - resolv.h: contrib/restricted/emscripten/system/lib/libc/musl/include/resolv.h
+ - sched.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sched.h
+ - scsi/scsi.h: contrib/restricted/emscripten/system/lib/libc/musl/include/scsi/scsi.h
+ - search.h: contrib/restricted/emscripten/system/lib/libc/musl/include/search.h
+ - semaphore.h: contrib/restricted/emscripten/system/lib/libc/musl/include/semaphore.h
+ - shadow.h: contrib/restricted/emscripten/system/lib/libc/musl/include/shadow.h
+ - signal.h: contrib/restricted/emscripten/system/lib/libc/musl/include/signal.h
+ - spawn.h: contrib/restricted/emscripten/system/lib/libc/musl/include/spawn.h
+ - stdalign.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stdalign.h
+ - stdarg.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stdarg.h
+ - stdio_ext.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stdio_ext.h
+ - stdnoreturn.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stdnoreturn.h
+ - strings.h: contrib/restricted/emscripten/system/lib/libc/musl/include/strings.h
+ - stropts.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stropts.h
+ - sys/acct.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/acct.h
+ - sys/auxv.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/auxv.h
+ - sys/cachectl.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/cachectl.h
+ - sys/dir.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/dir.h
+ - sys/epoll.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/epoll.h
+ - sys/errno.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/errno.h
+ - sys/eventfd.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/eventfd.h
+ - sysexits.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sysexits.h
+ - sys/fcntl.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/fcntl.h
+ - sys/file.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/file.h
+ - sys/fsuid.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/fsuid.h
+ - sys/inotify.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/inotify.h
+ - sys/ioctl.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/ioctl.h
+ - sys/io.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/io.h
+ - sys/ipc.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/ipc.h
+ - sys/kd.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/kd.h
+ - syslog.h: contrib/restricted/emscripten/system/lib/libc/musl/include/syslog.h
+ - sys/mman.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/mman.h
+ - sys/mount.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/mount.h
+ - sys/msg.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/msg.h
+ - sys/mtio.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/mtio.h
+ - sys/param.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/param.h
+ - sys/personality.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/personality.h
+ - sys/poll.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/poll.h
+ - sys/prctl.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/prctl.h
+ - sys/procfs.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/procfs.h
+ - sys/ptrace.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/ptrace.h
+ - sys/quota.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/quota.h
+
+ - sys/random.h:
+ - contrib/restricted/emscripten/system/include/compat/sys/random.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/sys/random.h
+
+ - sys/reboot.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/reboot.h
+ - sys/resource.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/resource.h
+ - sys/select.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/select.h
+ - sys/sem.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/sem.h
+ - sys/sendfile.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/sendfile.h
+
+ - sys/shm.h:
+ - contrib/restricted/emscripten/system/lib/libc/musl/arch/generic/bits/shm.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/sys/shm.h
+
+ - sys/signalfd.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/signalfd.h
+ - sys/signal.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/signal.h
+ - sys/socket.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/socket.h
+ - sys/soundcard.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/soundcard.h
+ - sys/statfs.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/statfs.h
+
+ - sys/stat.h:
+ - contrib/restricted/emscripten/system/include/compat/sys/stat.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/sys/stat.h
+
+ - sys/statvfs.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/statvfs.h
+ - sys/stropts.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/stropts.h
+ - sys/syscall.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/syscall.h
+ - sys/sysinfo.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/sysinfo.h
+ - sys/syslog.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/syslog.h
+ - sys/sysmacros.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/sysmacros.h
+ - sys/termios.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/termios.h
+
+ - sys/timeb.h:
+ - contrib/restricted/emscripten/system/include/compat/sys/timeb.h
+ - contrib/restricted/emscripten/system/lib/libc/musl/include/sys/timeb.h
+
+ - sys/time.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/time.h
+ - sys/timerfd.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/timerfd.h
+ - sys/times.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/times.h
+ - sys/timex.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/timex.h
+ - sys/ttydefaults.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/ttydefaults.h
+ - sys/types.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/types.h
+ - sys/ucontext.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/ucontext.h
+ - sys/uio.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/uio.h
+ - sys/un.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/un.h
+ - sys/user.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/user.h
+ - sys/utsname.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/utsname.h
+ - sys/vfs.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/vfs.h
+ - sys/vt.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/vt.h
+ - sys/wait.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/wait.h
+ - sys/xattr.h: contrib/restricted/emscripten/system/lib/libc/musl/include/sys/xattr.h
+ - tar.h: contrib/restricted/emscripten/system/lib/libc/musl/include/tar.h
+ - termios.h: contrib/restricted/emscripten/system/lib/libc/musl/include/termios.h
+ - threads.h: contrib/restricted/emscripten/system/lib/libc/musl/include/threads.h
+ - time.h: contrib/restricted/emscripten/system/lib/libc/musl/include/time.h
+ - uchar.h: contrib/restricted/emscripten/system/lib/libc/musl/include/uchar.h
+ - ucontext.h: contrib/restricted/emscripten/system/lib/libc/musl/include/ucontext.h
+ - ulimit.h: contrib/restricted/emscripten/system/lib/libc/musl/include/ulimit.h
+ - utime.h: contrib/restricted/emscripten/system/lib/libc/musl/include/utime.h
+ - utmp.h: contrib/restricted/emscripten/system/lib/libc/musl/include/utmp.h
+ - utmpx.h: contrib/restricted/emscripten/system/lib/libc/musl/include/utmpx.h
+ - values.h: contrib/restricted/emscripten/system/lib/libc/musl/include/values.h
+ - wait.h: contrib/restricted/emscripten/system/lib/libc/musl/include/wait.h
+ - wordexp.h: contrib/restricted/emscripten/system/lib/libc/musl/include/wordexp.h
+
+ - wasi/wasi-helpers.h: contrib/restricted/emscripten/system/include/wasi/wasi-helpers.h
+ - wasi/api.h: contrib/restricted/emscripten/system/include/wasi/api.h
+
+ - emscripten.h: contrib/restricted/emscripten/system/include/emscripten/emscripten.h
+
+ - emscripten/exports.h: contrib/restricted/emscripten/system/include/emscripten/exports.h
+ - emscripten/em_math.h: contrib/restricted/emscripten/system/include/emscripten/em_math.h
+ - emscripten/emscripten.h: contrib/restricted/emscripten/system/include/emscripten/emscripten.h
+ - emscripten/wget.h: contrib/restricted/emscripten/system/include/emscripten/wget.h
+ - emscripten/fiber.h: contrib/restricted/emscripten/system/include/emscripten/fiber.h
+ - emscripten/em_asm.h: contrib/restricted/emscripten/system/include/emscripten/em_asm.h
+ - emscripten/version.h: contrib/restricted/emscripten/system/include/emscripten/version.h
+ - emscripten/eventloop.h: contrib/restricted/emscripten/system/include/emscripten/eventloop.h
+ - emscripten/html5_webgpu.h: contrib/restricted/emscripten/system/include/emscripten/html5_webgpu.h
+ - emscripten/trace.h: contrib/restricted/emscripten/system/include/emscripten/trace.h
+ - emscripten/emmalloc.h: contrib/restricted/emscripten/system/include/emscripten/emmalloc.h
+ - emscripten/wire.h: contrib/restricted/emscripten/system/include/emscripten/wire.h
+ - emscripten/heap.h: contrib/restricted/emscripten/system/include/emscripten/heap.h
+ - emscripten/em_js.h: contrib/restricted/emscripten/system/include/emscripten/em_js.h
+ - emscripten/stack.h: contrib/restricted/emscripten/system/include/emscripten/stack.h
+ - emscripten/em_types.h: contrib/restricted/emscripten/system/include/emscripten/em_types.h
+ - emscripten/atomic.h: contrib/restricted/emscripten/system/include/emscripten/atomic.h
+ - emscripten/em_macros.h: contrib/restricted/emscripten/system/include/emscripten/em_macros.h
+ - emscripten/html5.h: contrib/restricted/emscripten/system/include/emscripten/html5.h
+ - emscripten/threading.h: contrib/restricted/emscripten/system/include/emscripten/threading.h
+ - emscripten/wasm_worker.h: contrib/restricted/emscripten/system/include/emscripten/wasm_worker.h
+ - emscripten/console.h: contrib/restricted/emscripten/system/include/emscripten/console.h
+ - emscripten/bind.h: contrib/restricted/emscripten/system/include/emscripten/bind.h
+ - emscripten/dom_pk_codes.h: contrib/restricted/emscripten/system/include/emscripten/dom_pk_codes.h
+ - emscripten/html5_webgl.h: contrib/restricted/emscripten/system/include/emscripten/html5_webgl.h
+ - emscripten/wasmfs.h: contrib/restricted/emscripten/system/include/emscripten/wasmfs.h
+ - emscripten/proxying.h: contrib/restricted/emscripten/system/include/emscripten/proxying.h
+ - emscripten/fetch.h: contrib/restricted/emscripten/system/include/emscripten/fetch.h
+ - emscripten/val.h: contrib/restricted/emscripten/system/include/emscripten/val.h
+ - emscripten/posix_socket.h: contrib/restricted/emscripten/system/include/emscripten/posix_socket.h
+ - emscripten/key_codes.h: contrib/restricted/emscripten/system/include/emscripten/key_codes.h
+ - emscripten/websocket.h: contrib/restricted/emscripten/system/include/emscripten/websocket.h
+
+ - stdc-predef.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stdc-predef.h
+
diff --git a/build/sysincl/stl-to-libcxx.yml b/build/sysincl/stl-to-libcxx.yml
index b1999e34a2..102c1b517e 100644
--- a/build/sysincl/stl-to-libcxx.yml
+++ b/build/sysincl/stl-to-libcxx.yml
@@ -185,7 +185,6 @@
- __std_stream: contrib/libs/cxxsupp/libcxx/include/__std_stream
- __threading_support: contrib/libs/cxxsupp/libcxx/include/__threading_support
- __tree: contrib/libs/cxxsupp/libcxx/include/__tree
- - __tuple: contrib/libs/cxxsupp/libcxx/include/__tuple
- __undef_macros: contrib/libs/cxxsupp/libcxx/include/__undef_macros
- __verbose_abort: contrib/libs/cxxsupp/libcxx/include/__verbose_abort
- __algorithm/adjacent_find.h: contrib/libs/cxxsupp/libcxx/include/__algorithm/adjacent_find.h
@@ -387,15 +386,20 @@
- __charconv/to_chars_result.h: contrib/libs/cxxsupp/libcxx/include/__charconv/to_chars_result.h
- __chrono/calendar.h: contrib/libs/cxxsupp/libcxx/include/__chrono/calendar.h
- __chrono/convert_to_timespec.h: contrib/libs/cxxsupp/libcxx/include/__chrono/convert_to_timespec.h
+ - __chrono/convert_to_tm.h: contrib/libs/cxxsupp/libcxx/include/__chrono/convert_to_tm.h
- __chrono/day.h: contrib/libs/cxxsupp/libcxx/include/__chrono/day.h
- __chrono/duration.h: contrib/libs/cxxsupp/libcxx/include/__chrono/duration.h
- __chrono/file_clock.h: contrib/libs/cxxsupp/libcxx/include/__chrono/file_clock.h
+ - __chrono/formatter.h: contrib/libs/cxxsupp/libcxx/include/__chrono/formatter.h
- __chrono/hh_mm_ss.h: contrib/libs/cxxsupp/libcxx/include/__chrono/hh_mm_ss.h
- __chrono/high_resolution_clock.h: contrib/libs/cxxsupp/libcxx/include/__chrono/high_resolution_clock.h
- __chrono/literals.h: contrib/libs/cxxsupp/libcxx/include/__chrono/literals.h
- __chrono/month.h: contrib/libs/cxxsupp/libcxx/include/__chrono/month.h
- __chrono/month_weekday.h: contrib/libs/cxxsupp/libcxx/include/__chrono/month_weekday.h
- __chrono/monthday.h: contrib/libs/cxxsupp/libcxx/include/__chrono/monthday.h
+ - __chrono/ostream.h: contrib/libs/cxxsupp/libcxx/include/__chrono/ostream.h
+ - __chrono/parser_std_format_spec.h: contrib/libs/cxxsupp/libcxx/include/__chrono/parser_std_format_spec.h
+ - __chrono/statically_widen.h: contrib/libs/cxxsupp/libcxx/include/__chrono/statically_widen.h
- __chrono/steady_clock.h: contrib/libs/cxxsupp/libcxx/include/__chrono/steady_clock.h
- __chrono/system_clock.h: contrib/libs/cxxsupp/libcxx/include/__chrono/system_clock.h
- __chrono/time_point.h: contrib/libs/cxxsupp/libcxx/include/__chrono/time_point.h
@@ -463,12 +467,14 @@
- __format/buffer.h: contrib/libs/cxxsupp/libcxx/include/__format/buffer.h
- __format/concepts.h: contrib/libs/cxxsupp/libcxx/include/__format/concepts.h
- __format/enable_insertable.h: contrib/libs/cxxsupp/libcxx/include/__format/enable_insertable.h
+ - __format/escaped_output_table.h: contrib/libs/cxxsupp/libcxx/include/__format/escaped_output_table.h
- __format/extended_grapheme_cluster_table.h: contrib/libs/cxxsupp/libcxx/include/__format/extended_grapheme_cluster_table.h
- __format/format_arg.h: contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h
- __format/format_arg_store.h: contrib/libs/cxxsupp/libcxx/include/__format/format_arg_store.h
- __format/format_args.h: contrib/libs/cxxsupp/libcxx/include/__format/format_args.h
- __format/format_context.h: contrib/libs/cxxsupp/libcxx/include/__format/format_context.h
- __format/format_error.h: contrib/libs/cxxsupp/libcxx/include/__format/format_error.h
+ - __format/format_functions.h: contrib/libs/cxxsupp/libcxx/include/__format/format_functions.h
- __format/format_fwd.h: contrib/libs/cxxsupp/libcxx/include/__format/format_fwd.h
- __format/format_parse_context.h: contrib/libs/cxxsupp/libcxx/include/__format/format_parse_context.h
- __format/format_string.h: contrib/libs/cxxsupp/libcxx/include/__format/format_string.h
@@ -512,8 +518,15 @@
- __functional/unary_negate.h: contrib/libs/cxxsupp/libcxx/include/__functional/unary_negate.h
- __functional/unwrap_ref.h: contrib/libs/cxxsupp/libcxx/include/__functional/unwrap_ref.h
- __functional/weak_result_type.h: contrib/libs/cxxsupp/libcxx/include/__functional/weak_result_type.h
+ - __fwd/array.h: contrib/libs/cxxsupp/libcxx/include/__fwd/array.h
+ - __fwd/get.h: contrib/libs/cxxsupp/libcxx/include/__fwd/get.h
+ - __fwd/hash.h: contrib/libs/cxxsupp/libcxx/include/__fwd/hash.h
+ - __fwd/memory_resource.h: contrib/libs/cxxsupp/libcxx/include/__fwd/memory_resource.h
+ - __fwd/pair.h: contrib/libs/cxxsupp/libcxx/include/__fwd/pair.h
- __fwd/span.h: contrib/libs/cxxsupp/libcxx/include/__fwd/span.h
+ - __fwd/string.h: contrib/libs/cxxsupp/libcxx/include/__fwd/string.h
- __fwd/string_view.h: contrib/libs/cxxsupp/libcxx/include/__fwd/string_view.h
+ - __fwd/tuple.h: contrib/libs/cxxsupp/libcxx/include/__fwd/tuple.h
- __ios/fpos.h: contrib/libs/cxxsupp/libcxx/include/__ios/fpos.h
- __iterator/access.h: contrib/libs/cxxsupp/libcxx/include/__iterator/access.h
- __iterator/advance.h: contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h
@@ -554,16 +567,20 @@
- __iterator/unreachable_sentinel.h: contrib/libs/cxxsupp/libcxx/include/__iterator/unreachable_sentinel.h
- __iterator/wrap_iter.h: contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h
- __memory/addressof.h: contrib/libs/cxxsupp/libcxx/include/__memory/addressof.h
+ - __memory/align.h: contrib/libs/cxxsupp/libcxx/include/__memory/align.h
- __memory/allocate_at_least.h: contrib/libs/cxxsupp/libcxx/include/__memory/allocate_at_least.h
- __memory/allocation_guard.h: contrib/libs/cxxsupp/libcxx/include/__memory/allocation_guard.h
- __memory/allocator.h: contrib/libs/cxxsupp/libcxx/include/__memory/allocator.h
- __memory/allocator_arg_t.h: contrib/libs/cxxsupp/libcxx/include/__memory/allocator_arg_t.h
+ - __memory/allocator_destructor.h: contrib/libs/cxxsupp/libcxx/include/__memory/allocator_destructor.h
- __memory/allocator_traits.h: contrib/libs/cxxsupp/libcxx/include/__memory/allocator_traits.h
- __memory/assume_aligned.h: contrib/libs/cxxsupp/libcxx/include/__memory/assume_aligned.h
- __memory/auto_ptr.h: contrib/libs/cxxsupp/libcxx/include/__memory/auto_ptr.h
+ - __memory/builtin_new_allocator.h: contrib/libs/cxxsupp/libcxx/include/__memory/builtin_new_allocator.h
- __memory/compressed_pair.h: contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h
- __memory/concepts.h: contrib/libs/cxxsupp/libcxx/include/__memory/concepts.h
- __memory/construct_at.h: contrib/libs/cxxsupp/libcxx/include/__memory/construct_at.h
+ - __memory/destruct_n.h: contrib/libs/cxxsupp/libcxx/include/__memory/destruct_n.h
- __memory/pointer_safety.h: contrib/libs/cxxsupp/libcxx/include/__memory/pointer_safety.h
- __memory/pointer_traits.h: contrib/libs/cxxsupp/libcxx/include/__memory/pointer_traits.h
- __memory/ranges_construct_at.h: contrib/libs/cxxsupp/libcxx/include/__memory/ranges_construct_at.h
@@ -571,11 +588,19 @@
- __memory/raw_storage_iterator.h: contrib/libs/cxxsupp/libcxx/include/__memory/raw_storage_iterator.h
- __memory/shared_ptr.h: contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h
- __memory/swap_allocator.h: contrib/libs/cxxsupp/libcxx/include/__memory/swap_allocator.h
+ - __memory/temp_value.h: contrib/libs/cxxsupp/libcxx/include/__memory/temp_value.h
- __memory/temporary_buffer.h: contrib/libs/cxxsupp/libcxx/include/__memory/temporary_buffer.h
- __memory/uninitialized_algorithms.h: contrib/libs/cxxsupp/libcxx/include/__memory/uninitialized_algorithms.h
- __memory/unique_ptr.h: contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h
- __memory/uses_allocator.h: contrib/libs/cxxsupp/libcxx/include/__memory/uses_allocator.h
+ - __memory/uses_allocator_construction.h: contrib/libs/cxxsupp/libcxx/include/__memory/uses_allocator_construction.h
- __memory/voidify.h: contrib/libs/cxxsupp/libcxx/include/__memory/voidify.h
+ - __memory_resource/memory_resource.h: contrib/libs/cxxsupp/libcxx/include/__memory_resource/memory_resource.h
+ - __memory_resource/monotonic_buffer_resource.h: contrib/libs/cxxsupp/libcxx/include/__memory_resource/monotonic_buffer_resource.h
+ - __memory_resource/polymorphic_allocator.h: contrib/libs/cxxsupp/libcxx/include/__memory_resource/polymorphic_allocator.h
+ - __memory_resource/pool_options.h: contrib/libs/cxxsupp/libcxx/include/__memory_resource/pool_options.h
+ - __memory_resource/synchronized_pool_resource.h: contrib/libs/cxxsupp/libcxx/include/__memory_resource/synchronized_pool_resource.h
+ - __memory_resource/unsynchronized_pool_resource.h: contrib/libs/cxxsupp/libcxx/include/__memory_resource/unsynchronized_pool_resource.h
- __numeric/accumulate.h: contrib/libs/cxxsupp/libcxx/include/__numeric/accumulate.h
- __numeric/adjacent_difference.h: contrib/libs/cxxsupp/libcxx/include/__numeric/adjacent_difference.h
- __numeric/exclusive_scan.h: contrib/libs/cxxsupp/libcxx/include/__numeric/exclusive_scan.h
@@ -635,12 +660,14 @@
- __ranges/dangling.h: contrib/libs/cxxsupp/libcxx/include/__ranges/dangling.h
- __ranges/data.h: contrib/libs/cxxsupp/libcxx/include/__ranges/data.h
- __ranges/drop_view.h: contrib/libs/cxxsupp/libcxx/include/__ranges/drop_view.h
+ - __ranges/drop_while_view.h: contrib/libs/cxxsupp/libcxx/include/__ranges/drop_while_view.h
- __ranges/empty.h: contrib/libs/cxxsupp/libcxx/include/__ranges/empty.h
- __ranges/empty_view.h: contrib/libs/cxxsupp/libcxx/include/__ranges/empty_view.h
- __ranges/enable_borrowed_range.h: contrib/libs/cxxsupp/libcxx/include/__ranges/enable_borrowed_range.h
- __ranges/enable_view.h: contrib/libs/cxxsupp/libcxx/include/__ranges/enable_view.h
- __ranges/filter_view.h: contrib/libs/cxxsupp/libcxx/include/__ranges/filter_view.h
- __ranges/iota_view.h: contrib/libs/cxxsupp/libcxx/include/__ranges/iota_view.h
+ - __ranges/istream_view.h: contrib/libs/cxxsupp/libcxx/include/__ranges/istream_view.h
- __ranges/join_view.h: contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
- __ranges/lazy_split_view.h: contrib/libs/cxxsupp/libcxx/include/__ranges/lazy_split_view.h
- __ranges/non_propagating_cache.h: contrib/libs/cxxsupp/libcxx/include/__ranges/non_propagating_cache.h
@@ -654,6 +681,7 @@
- __ranges/size.h: contrib/libs/cxxsupp/libcxx/include/__ranges/size.h
- __ranges/subrange.h: contrib/libs/cxxsupp/libcxx/include/__ranges/subrange.h
- __ranges/take_view.h: contrib/libs/cxxsupp/libcxx/include/__ranges/take_view.h
+ - __ranges/take_while_view.h: contrib/libs/cxxsupp/libcxx/include/__ranges/take_while_view.h
- __ranges/transform_view.h: contrib/libs/cxxsupp/libcxx/include/__ranges/transform_view.h
- __ranges/view_interface.h: contrib/libs/cxxsupp/libcxx/include/__ranges/view_interface.h
- __ranges/views.h: contrib/libs/cxxsupp/libcxx/include/__ranges/views.h
@@ -673,13 +701,20 @@
- __support/solaris/wchar.h: contrib/libs/cxxsupp/libcxx/include/__support/solaris/wchar.h
- __support/solaris/xlocale.h: contrib/libs/cxxsupp/libcxx/include/__support/solaris/xlocale.h
- __support/win32/atomic_win32.h: contrib/libs/cxxsupp/libcxx/include/__support/win32/atomic_win32.h
- - __support/win32/limits_msvc_win32.h: contrib/libs/cxxsupp/libcxx/include/__support/win32/limits_msvc_win32.h
- __support/win32/locale_win32.h: contrib/libs/cxxsupp/libcxx/include/__support/win32/locale_win32.h
- __support/xlocale/__nop_locale_mgmt.h: contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__nop_locale_mgmt.h
- __support/xlocale/__posix_l_fallback.h: contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__posix_l_fallback.h
- __support/xlocale/__strtonum_fallback.h: contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__strtonum_fallback.h
- __thread/poll_with_backoff.h: contrib/libs/cxxsupp/libcxx/include/__thread/poll_with_backoff.h
- __thread/timed_backoff_policy.h: contrib/libs/cxxsupp/libcxx/include/__thread/timed_backoff_policy.h
+ - __tuple/apply_cv.h: contrib/libs/cxxsupp/libcxx/include/__tuple/apply_cv.h
+ - __tuple/make_tuple_types.h: contrib/libs/cxxsupp/libcxx/include/__tuple/make_tuple_types.h
+ - __tuple/sfinae_helpers.h: contrib/libs/cxxsupp/libcxx/include/__tuple/sfinae_helpers.h
+ - __tuple/tuple_element.h: contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_element.h
+ - __tuple/tuple_indices.h: contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_indices.h
+ - __tuple/tuple_like.h: contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_like.h
+ - __tuple/tuple_size.h: contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_size.h
+ - __tuple/tuple_types.h: contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_types.h
- __type_traits/add_const.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/add_const.h
- __type_traits/add_cv.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/add_cv.h
- __type_traits/add_lvalue_reference.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/add_lvalue_reference.h
@@ -690,6 +725,7 @@
- __type_traits/aligned_union.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/aligned_union.h
- __type_traits/alignment_of.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/alignment_of.h
- __type_traits/apply_cv.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/apply_cv.h
+ - __type_traits/can_extract_key.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/can_extract_key.h
- __type_traits/common_reference.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/common_reference.h
- __type_traits/common_type.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/common_type.h
- __type_traits/conditional.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/conditional.h
@@ -697,6 +733,7 @@
- __type_traits/copy_cv.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/copy_cv.h
- __type_traits/copy_cvref.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/copy_cvref.h
- __type_traits/decay.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/decay.h
+ - __type_traits/dependent_type.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/dependent_type.h
- __type_traits/disjunction.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/disjunction.h
- __type_traits/enable_if.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/enable_if.h
- __type_traits/extent.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/extent.h
@@ -705,12 +742,14 @@
- __type_traits/integral_constant.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/integral_constant.h
- __type_traits/is_abstract.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_abstract.h
- __type_traits/is_aggregate.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_aggregate.h
+ - __type_traits/is_allocator.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_allocator.h
- __type_traits/is_arithmetic.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_arithmetic.h
- __type_traits/is_array.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_array.h
- __type_traits/is_assignable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_assignable.h
- __type_traits/is_base_of.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_base_of.h
- __type_traits/is_bounded_array.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_bounded_array.h
- __type_traits/is_callable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_callable.h
+ - __type_traits/is_char_like_type.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_char_like_type.h
- __type_traits/is_class.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_class.h
- __type_traits/is_compound.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_compound.h
- __type_traits/is_const.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_const.h
@@ -728,6 +767,7 @@
- __type_traits/is_floating_point.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_floating_point.h
- __type_traits/is_function.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_function.h
- __type_traits/is_fundamental.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_fundamental.h
+ - __type_traits/is_implicitly_default_constructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_implicitly_default_constructible.h
- __type_traits/is_integral.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_integral.h
- __type_traits/is_literal_type.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_literal_type.h
- __type_traits/is_member_function_pointer.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_function_pointer.h
@@ -759,6 +799,7 @@
- __type_traits/is_signed.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_signed.h
- __type_traits/is_signed_integer.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_signed_integer.h
- __type_traits/is_standard_layout.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_standard_layout.h
+ - __type_traits/is_swappable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_swappable.h
- __type_traits/is_trivial.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivial.h
- __type_traits/is_trivially_assignable.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_assignable.h
- __type_traits/is_trivially_constructible.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_constructible.h
@@ -778,20 +819,25 @@
- __type_traits/is_volatile.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/is_volatile.h
- __type_traits/lazy.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/lazy.h
- __type_traits/make_32_64_or_128_bit.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/make_32_64_or_128_bit.h
+ - __type_traits/make_const_lvalue_ref.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/make_const_lvalue_ref.h
- __type_traits/make_signed.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/make_signed.h
- __type_traits/make_unsigned.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/make_unsigned.h
+ - __type_traits/maybe_const.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/maybe_const.h
- __type_traits/nat.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/nat.h
- __type_traits/negation.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/negation.h
+ - __type_traits/noexcept_move_assign_container.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/noexcept_move_assign_container.h
- __type_traits/promote.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/promote.h
- __type_traits/rank.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/rank.h
- __type_traits/remove_all_extents.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_all_extents.h
- __type_traits/remove_const.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_const.h
+ - __type_traits/remove_const_ref.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_const_ref.h
- __type_traits/remove_cv.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_cv.h
- __type_traits/remove_cvref.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_cvref.h
- __type_traits/remove_extent.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_extent.h
- __type_traits/remove_pointer.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_pointer.h
- __type_traits/remove_reference.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_reference.h
- __type_traits/remove_volatile.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_volatile.h
+ - __type_traits/result_of.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/result_of.h
- __type_traits/type_identity.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/type_identity.h
- __type_traits/type_list.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/type_list.h
- __type_traits/underlying_type.h: contrib/libs/cxxsupp/libcxx/include/__type_traits/underlying_type.h
@@ -799,9 +845,11 @@
- __utility/as_const.h: contrib/libs/cxxsupp/libcxx/include/__utility/as_const.h
- __utility/auto_cast.h: contrib/libs/cxxsupp/libcxx/include/__utility/auto_cast.h
- __utility/cmp.h: contrib/libs/cxxsupp/libcxx/include/__utility/cmp.h
+ - __utility/convert_to_integral.h: contrib/libs/cxxsupp/libcxx/include/__utility/convert_to_integral.h
- __utility/declval.h: contrib/libs/cxxsupp/libcxx/include/__utility/declval.h
- __utility/exchange.h: contrib/libs/cxxsupp/libcxx/include/__utility/exchange.h
- __utility/forward.h: contrib/libs/cxxsupp/libcxx/include/__utility/forward.h
+ - __utility/forward_like.h: contrib/libs/cxxsupp/libcxx/include/__utility/forward_like.h
- __utility/in_place.h: contrib/libs/cxxsupp/libcxx/include/__utility/in_place.h
- __utility/integer_sequence.h: contrib/libs/cxxsupp/libcxx/include/__utility/integer_sequence.h
- __utility/move.h: contrib/libs/cxxsupp/libcxx/include/__utility/move.h
diff --git a/build/ya.conf.json b/build/ya.conf.json
index a637a3471e..b85b11a80a 100644
--- a/build/ya.conf.json
+++ b/build/ya.conf.json
@@ -200,14 +200,6 @@
},
"formula": "build/external_resources/ymake/public.resources.json"
},
- "ymake_python3": {
- "executable": {
- "python3": [
- "python3"
- ]
- },
- "formula": "build/platform/python/ymake_python3/resources.json"
- },
"ytexec": {
"executable": {
"ytexec": [
@@ -1290,55 +1282,6 @@
}
}
},
- "ymake_python3": {
- "platforms": [
- {
- "default": true,
- "host": {
- "os": "LINUX"
- }
- },
- {
- "default": true,
- "host": {
- "os": "WIN"
- }
- },
- {
- "default": true,
- "host": {
- "os": "DARWIN"
- }
- },
- {
- "default": true,
- "host": {
- "arch": "arm64",
- "os": "DARWIN"
- }
- },
- {
- "default": true,
- "host": {
- "arch": "aarch64",
- "os": "LINUX"
- }
- },
- {
- "default": true,
- "host": {
- "arch": "ppc64le",
- "os": "LINUX"
- }
- }
- ],
- "tools": {
- "ymake_python3": {
- "bottle": "ymake_python3",
- "executable": "python3"
- }
- }
- },
"ytexec": {
"platforms": [
{
@@ -1437,10 +1380,6 @@
"description": "Run ymake",
"visible": false
},
- "ymake_python3": {
- "description": "Run pseudo-python3",
- "visible": false
- },
"ytexec": {
"description": "Run ytexec"
}
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 6b8e31642f..f613abae70 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -9,7 +9,7 @@
FAKEID=628318530716
SANDBOX_FAKEID=${FAKEID}.7600000
-CPP_FAKEID=2023-12-07
+CPP_FAKEID=2023-12-08
GO_FAKEID=11100371
ANDROID_FAKEID=2023-05-17
CLANG_TIDY_FAKEID=2023-06-06
diff --git a/build/ymake_conf.py b/build/ymake_conf.py
index d9c1882d73..431c8a4f04 100755
--- a/build/ymake_conf.py
+++ b/build/ymake_conf.py
@@ -1066,9 +1066,6 @@ class GnuToolchainOptions(ToolchainOptions):
if self.target.is_armv7 and self.target.armv7_float_abi == 'softfp':
return 'ubuntu-18'
- if self.target.is_powerpc:
- return 'ubuntu-14'
-
# Default OS SDK for Linux builds
return 'ubuntu-14'
diff --git a/cmake/global_flags.compiler.msvc.cmake b/cmake/global_flags.compiler.msvc.cmake
index 1541beb834..9d553495e3 100644
--- a/cmake/global_flags.compiler.msvc.cmake
+++ b/cmake/global_flags.compiler.msvc.cmake
@@ -1,8 +1,11 @@
-set(_IS_CLANG_CL_COMPILER
- ${CMAKE_CXX_COMPILER_ID} STREQUAL Clang
- AND "${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC"
- AND "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC"
-)
+if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang
+ AND "${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC"
+ AND "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
+
+ set(_IS_CLANG_CL_COMPILER true)
+else()
+ set(_IS_CLANG_CL_COMPILER false)
+endif()
set(_WARNS_ENABLED
4018 # 'expression' : signed/unsigned mismatch
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/adjacent_find.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/adjacent_find.h
index 1089bb20d5..30df4a976f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/adjacent_find.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/adjacent_find.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Iter, class _Sent, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter
+_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter
__adjacent_find(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
if (__first == __last)
return __first;
@@ -37,16 +37,15 @@ __adjacent_find(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
}
template <class _ForwardIterator, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
adjacent_find(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) {
return std::__adjacent_find(std::move(__first), std::move(__last), __pred);
}
template <class _ForwardIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
adjacent_find(_ForwardIterator __first, _ForwardIterator __last) {
- typedef typename iterator_traits<_ForwardIterator>::value_type __v;
- return std::adjacent_find(std::move(__first), std::move(__last), __equal_to<__v>());
+ return std::adjacent_find(std::move(__first), std::move(__last), __equal_to());
}
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/all_of.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/all_of.h
index 3af32a5775..284c34ffcd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/all_of.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/all_of.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
for (; __first != __last; ++__first)
if (!__pred(*__first))
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/any_of.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/any_of.h
index 6fe6a0b6b3..fe0882816b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/any_of.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/any_of.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
for (; __first != __last; ++__first)
if (__pred(*__first))
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/binary_search.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/binary_search.h
index a440072378..8f958c2c1a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/binary_search.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/binary_search.h
@@ -23,18 +23,17 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp)
{
- using _Comp_ref = typename __comp_ref_type<_Compare>::type;
- __first = std::lower_bound<_ForwardIterator, _Tp, _Comp_ref>(__first, __last, __value, __comp);
+ __first = std::lower_bound<_ForwardIterator, _Tp, __comp_ref_type<_Compare> >(__first, __last, __value, __comp);
return __first != __last && !__comp(__value, *__first);
}
template <class _ForwardIterator, class _Tp>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp.h
index 62c06ae57f..af8eb7b5d7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp.h
@@ -17,73 +17,47 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-// I'd like to replace these with _VSTD::equal_to<void>, but can't because:
-// * That only works with C++14 and later, and
-// * We haven't included <functional> here.
-template <class _T1, class _T2 = _T1>
-struct __equal_to
-{
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator()(const _T1& __x, const _T2& __y) const {return __x == __y;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator()(const _T2& __x, const _T1& __y) const {return __x == __y;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator()(const _T2& __x, const _T2& __y) const {return __x == __y;}
-};
-
-template <class _T1>
-struct __equal_to<_T1, _T1>
-{
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
- bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
-};
-
-template <class _T1>
-struct __equal_to<const _T1, _T1>
-{
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
- bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
-};
-
-template <class _T1>
-struct __equal_to<_T1, const _T1>
-{
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
- bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
+struct __equal_to {
+ template <class _T1, class _T2>
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _T1& __x, const _T2& __y) const {
+ return __x == __y;
+ }
};
template <class _T1, class _T2 = _T1>
struct __less
{
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator()(const _T1& __x, const _T2& __y) const {return __x < __y;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator()(const _T2& __x, const _T1& __y) const {return __x < __y;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator()(const _T2& __x, const _T2& __y) const {return __x < __y;}
};
template <class _T1>
struct __less<_T1, _T1>
{
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
};
template <class _T1>
struct __less<const _T1, _T1>
{
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
};
template <class _T1>
struct __less<_T1, const _T1>
{
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
};
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h
index 4719871461..f0a0a31665 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h
@@ -23,11 +23,11 @@ template <class _Compare>
struct __debug_less
{
_Compare &__comp_;
- _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
__debug_less(_Compare& __c) : __comp_(__c) {}
template <class _Tp, class _Up>
- _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator()(const _Tp& __x, const _Up& __y)
{
bool __r = __comp_(__x, __y);
@@ -37,7 +37,7 @@ struct __debug_less
}
template <class _Tp, class _Up>
- _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator()(_Tp& __x, _Up& __y)
{
bool __r = __comp_(__x, __y);
@@ -47,7 +47,7 @@ struct __debug_less
}
template <class _LHS, class _RHS>
- _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
inline _LIBCPP_INLINE_VISIBILITY
decltype((void)declval<_Compare&>()(
declval<_LHS &>(), declval<_RHS &>()))
@@ -59,21 +59,20 @@ struct __debug_less
}
template <class _LHS, class _RHS>
- _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
inline _LIBCPP_INLINE_VISIBILITY
void __do_compare_assert(long, _LHS &, _RHS &) {}
};
-template <class _Comp>
-struct __comp_ref_type {
- // Pass the comparator by lvalue reference. Or in debug mode, using a
- // debugging wrapper that stores a reference.
+// Pass the comparator by lvalue reference. Or in debug mode, using a
+// debugging wrapper that stores a reference.
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
- typedef __debug_less<_Comp> type;
+template <class _Comp>
+using __comp_ref_type = __debug_less<_Comp>;
#else
- typedef _Comp& type;
+template <class _Comp>
+using __comp_ref_type = _Comp&;
#endif
-};
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy.h
index f7535a8154..d6a46f6952 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy.h
@@ -28,7 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// copy
template <class _InIter, class _Sent, class _OutIter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_InIter, _OutIter> __copy_impl(_InIter __first, _Sent __last, _OutIter __result) {
while (__first != __last) {
*__result = *__first;
@@ -40,9 +40,9 @@ pair<_InIter, _OutIter> __copy_impl(_InIter __first, _Sent __last, _OutIter __re
template <class _InValueT,
class _OutValueT,
- class = __enable_if_t<is_same<typename remove_const<_InValueT>::type, _OutValueT>::value
+ class = __enable_if_t<is_same<__remove_const_t<_InValueT>, _OutValueT>::value
&& is_trivially_copy_assignable<_OutValueT>::value> >
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_InValueT*, _OutValueT*> __copy_impl(_InValueT* __first, _InValueT* __last, _OutValueT* __result) {
if (__libcpp_is_constant_evaluated()
// TODO: Remove this once GCC supports __builtin_memmove during constant evaluation
@@ -58,13 +58,13 @@ pair<_InValueT*, _OutValueT*> __copy_impl(_InValueT* __first, _InValueT* __last,
}
template <class _InIter, class _OutIter,
- __enable_if_t<is_same<typename remove_const<__iter_value_type<_InIter> >::type, __iter_value_type<_OutIter> >::value
+ __enable_if_t<is_same<__remove_const_t<__iter_value_type<_InIter> >, __iter_value_type<_OutIter> >::value
&& __is_cpp17_contiguous_iterator<typename _InIter::iterator_type>::value
&& __is_cpp17_contiguous_iterator<typename _OutIter::iterator_type>::value
&& is_trivially_copy_assignable<__iter_value_type<_OutIter> >::value
&& __is_reverse_iterator<_InIter>::value
&& __is_reverse_iterator<_OutIter>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_InIter, _OutIter>
__copy_impl(_InIter __first, _InIter __last, _OutIter __result) {
auto __first_base = std::__unwrap_iter(__first.base());
@@ -79,7 +79,7 @@ template <class _InIter, class _Sent, class _OutIter,
__enable_if_t<!(is_copy_constructible<_InIter>::value
&& is_copy_constructible<_Sent>::value
&& is_copy_constructible<_OutIter>::value), int> = 0 >
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_InIter, _OutIter> __copy(_InIter __first, _Sent __last, _OutIter __result) {
return std::__copy_impl(std::move(__first), std::move(__last), std::move(__result));
}
@@ -88,7 +88,7 @@ template <class _InIter, class _Sent, class _OutIter,
__enable_if_t<is_copy_constructible<_InIter>::value
&& is_copy_constructible<_Sent>::value
&& is_copy_constructible<_OutIter>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_InIter, _OutIter> __copy(_InIter __first, _Sent __last, _OutIter __result) {
auto __range = std::__unwrap_range(__first, __last);
auto __ret = std::__copy_impl(std::move(__range.first), std::move(__range.second), std::__unwrap_iter(__result));
@@ -97,7 +97,7 @@ pair<_InIter, _OutIter> __copy(_InIter __first, _Sent __last, _OutIter __result)
}
template <class _InputIterator, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
return std::__copy(__first, __last, __result).second;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_backward.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_backward.h
index c5fa64bc8d..1db4f1e2d5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_backward.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_backward.h
@@ -20,6 +20,7 @@
#include <__ranges/subrange.h>
#include <__utility/move.h>
#include <__utility/pair.h>
+#include <cstring>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -30,7 +31,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _InputIterator, class _OutputIterator,
__enable_if_t<is_same<_AlgPolicy, _ClassicAlgPolicy>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 pair<_InputIterator, _OutputIterator>
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InputIterator, _OutputIterator>
__copy_backward(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
auto __ret = std::__copy(
__unconstrained_reverse_iterator<_InputIterator>(__last),
@@ -39,7 +40,7 @@ __copy_backward(_InputIterator __first, _InputIterator __last, _OutputIterator _
return pair<_InputIterator, _OutputIterator>(__ret.first.base(), __ret.second.base());
}
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
template <class _AlgPolicy, class _Iter1, class _Sent1, class _Iter2,
__enable_if_t<is_same<_AlgPolicy, _RangeAlgPolicy>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr pair<_Iter1, _Iter2> __copy_backward(_Iter1 __first, _Sent1 __last, _Iter2 __result) {
@@ -48,10 +49,10 @@ _LIBCPP_HIDE_FROM_ABI constexpr pair<_Iter1, _Iter2> __copy_backward(_Iter1 __fi
auto __ret = ranges::copy(std::move(__reverse_range), std::make_reverse_iterator(__result));
return std::make_pair(__last_iter, __ret.out.base());
}
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
template <class _BidirectionalIterator1, class _BidirectionalIterator2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _BidirectionalIterator2
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _BidirectionalIterator2
copy_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last, _BidirectionalIterator2 __result) {
return std::__copy_backward<_ClassicAlgPolicy>(__first, __last, __result).second;
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_if.h
index 9c3cd29e24..a5938b8719 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_if.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_if.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template<class _InputIterator, class _OutputIterator, class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
copy_if(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, _Predicate __pred)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_n.h
index 8b915af63c..b08bbdfb9b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_n.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_n.h
@@ -12,6 +12,7 @@
#include <__algorithm/copy.h>
#include <__config>
#include <__iterator/iterator_traits.h>
+#include <__utility/convert_to_integral.h>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -21,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template<class _InputIterator, class _Size, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename enable_if
<
__is_cpp17_input_iterator<_InputIterator>::value &&
@@ -47,7 +48,7 @@ copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result)
}
template<class _InputIterator, class _Size, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename enable_if
<
__is_cpp17_random_access_iterator<_InputIterator>::value,
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/count.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/count.h
index 5b54693403..6c8c7fda35 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/count.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/count.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename iterator_traits<_InputIterator>::difference_type
count(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
typename iterator_traits<_InputIterator>::difference_type __r(0);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/count_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/count_if.h
index 1ec2d83394..b96521fe0a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/count_if.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/count_if.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename iterator_traits<_InputIterator>::difference_type
count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
typename iterator_traits<_InputIterator>::difference_type __r(0);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal.h
index ca1bc6bc56..cf37f46aaf 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __pred) {
for (; __first1 != __last1; ++__first1, (void)++__first2)
if (!__pred(*__first1, *__first2))
@@ -31,16 +31,14 @@ equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first
}
template <class _InputIterator1, class _InputIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) {
- typedef typename iterator_traits<_InputIterator1>::value_type __v1;
- typedef typename iterator_traits<_InputIterator2>::value_type __v2;
- return _VSTD::equal(__first1, __last1, __first2, __equal_to<__v1, __v2>());
+ return std::equal(__first1, __last1, __first2, __equal_to());
}
#if _LIBCPP_STD_VER > 11
template <class _BinaryPredicate, class _InputIterator1, class _InputIterator2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
_BinaryPredicate __pred, input_iterator_tag, input_iterator_tag) {
for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void)++__first2)
@@ -50,7 +48,7 @@ __equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __fir
}
template <class _BinaryPredicate, class _RandomAccessIterator1, class _RandomAccessIterator2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__equal(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, _RandomAccessIterator2 __first2,
_RandomAccessIterator2 __last2, _BinaryPredicate __pred, random_access_iterator_tag,
random_access_iterator_tag) {
@@ -61,7 +59,7 @@ __equal(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, _Random
}
template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
_BinaryPredicate __pred) {
return _VSTD::__equal<_BinaryPredicate&>(
@@ -70,13 +68,16 @@ equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first
}
template <class _InputIterator1, class _InputIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
- typedef typename iterator_traits<_InputIterator1>::value_type __v1;
- typedef typename iterator_traits<_InputIterator2>::value_type __v2;
- return _VSTD::__equal(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>(),
- typename iterator_traits<_InputIterator1>::iterator_category(),
- typename iterator_traits<_InputIterator2>::iterator_category());
+ return std::__equal(
+ __first1,
+ __last1,
+ __first2,
+ __last2,
+ __equal_to(),
+ typename iterator_traits<_InputIterator1>::iterator_category(),
+ typename iterator_traits<_InputIterator2>::iterator_category());
}
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal_range.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal_range.h
index b11165baf3..2075b03412 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal_range.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal_range.h
@@ -34,7 +34,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _Iter, class _Sent, class _Tp, class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_Iter, _Iter>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_Iter, _Iter>
__equal_range(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp, _Proj&& __proj) {
auto __len = _IterOps<_AlgPolicy>::distance(__first, __last);
_Iter __end = _IterOps<_AlgPolicy>::next(__first, __last);
@@ -58,19 +58,22 @@ __equal_range(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp
}
template <class _ForwardIterator, class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
+_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator>
equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
static_assert(__is_callable<_Compare, decltype(*__first), const _Tp&>::value,
"The comparator has to be callable");
static_assert(is_copy_constructible<_ForwardIterator>::value,
"Iterator has to be copy constructible");
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
return std::__equal_range<_ClassicAlgPolicy>(
- std::move(__first), std::move(__last), __value, static_cast<_Comp_ref>(__comp), std::__identity());
+ std::move(__first),
+ std::move(__last),
+ __value,
+ static_cast<__comp_ref_type<_Compare> >(__comp),
+ std::__identity());
}
template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
+_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator>
equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
return std::equal_range(
std::move(__first),
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/fill.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/fill.h
index 901ba4e686..76cf4a1477 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/fill.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/fill.h
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// fill isn't specialized for std::memset, because the compiler already optimizes the loop to a call to std::memset.
template <class _ForwardIterator, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
__fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, forward_iterator_tag)
{
@@ -32,7 +32,7 @@ __fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, fo
}
template <class _RandomAccessIterator, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
__fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __value, random_access_iterator_tag)
{
@@ -40,7 +40,7 @@ __fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& _
}
template <class _ForwardIterator, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/fill_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/fill_n.h
index 6c5e44efde..fe58c8d641 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/fill_n.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/fill_n.h
@@ -11,6 +11,7 @@
#include <__config>
#include <__iterator/iterator_traits.h>
+#include <__utility/convert_to_integral.h>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -22,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// fill_n isn't specialized for std::memset, because the compiler already optimizes the loop to a call to std::memset.
template <class _OutputIterator, class _Size, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
__fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
{
@@ -32,7 +33,7 @@ __fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
}
template <class _OutputIterator, class _Size, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find.h
index ab37d81262..e51dc9bb16 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator
find(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
for (; __first != __last; ++__first)
if (*__first == __value)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_end.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_end.h
index 65e9f29b1c..e2fee6b3c4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_end.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_end.h
@@ -37,7 +37,7 @@ template <
class _Pred,
class _Proj1,
class _Proj2>
-_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR_AFTER_CXX11 pair<_Iter1, _Iter1> __find_end_impl(
+_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __find_end_impl(
_Iter1 __first1,
_Sent1 __last1,
_Iter2 __first2,
@@ -91,7 +91,7 @@ template <
class _Sent2,
class _Proj1,
class _Proj2>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter1 __find_end(
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter1 __find_end(
_Iter1 __first1,
_Sent1 __sent1,
_Iter2 __first2,
@@ -144,7 +144,7 @@ template <
class _Sent2,
class _Proj1,
class _Proj2>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _Iter1 __find_end(
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iter1 __find_end(
_Iter1 __first1,
_Sent1 __sent1,
_Iter2 __first2,
@@ -189,7 +189,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX11 _Iter1 __find_end(
}
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
_ForwardIterator1 __find_end_classic(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2, _ForwardIterator2 __last2,
_BinaryPredicate& __pred) {
@@ -208,7 +208,7 @@ _ForwardIterator1 __find_end_classic(_ForwardIterator1 __first1, _ForwardIterato
}
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2, _ForwardIterator2 __last2,
_BinaryPredicate __pred) {
@@ -216,12 +216,10 @@ _ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1
}
template <class _ForwardIterator1, class _ForwardIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2, _ForwardIterator2 __last2) {
- using __v1 = typename iterator_traits<_ForwardIterator1>::value_type;
- using __v2 = typename iterator_traits<_ForwardIterator2>::value_type;
- return std::find_end(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>());
+ return std::find_end(__first1, __last1, __first2, __last2, __equal_to());
}
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_first_of.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_first_of.h
index 2096b0f0c9..12f0109a61 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_first_of.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_first_of.h
@@ -21,7 +21,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator1 __find_first_of_ce(_ForwardIterator1 __first1,
+_LIBCPP_HIDE_FROM_ABI
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator1 __find_first_of_ce(_ForwardIterator1 __first1,
_ForwardIterator1 __last1,
_ForwardIterator2 __first2,
_ForwardIterator2 __last2,
@@ -34,18 +35,16 @@ _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator1 __find_first_of_ce(_ForwardItera
}
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator1
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1
find_first_of(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
_ForwardIterator2 __last2, _BinaryPredicate __pred) {
return _VSTD::__find_first_of_ce(__first1, __last1, __first2, __last2, __pred);
}
template <class _ForwardIterator1, class _ForwardIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator1 find_first_of(
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1 find_first_of(
_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) {
- typedef typename iterator_traits<_ForwardIterator1>::value_type __v1;
- typedef typename iterator_traits<_ForwardIterator2>::value_type __v2;
- return _VSTD::__find_first_of_ce(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>());
+ return std::__find_first_of_ce(__first1, __last1, __first2, __last2, __equal_to());
}
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_if.h
index aa98171a1f..f4ef3ac31c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_if.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_if.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator
find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
for (; __first != __last; ++__first)
if (__pred(*__first))
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_if_not.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_if_not.h
index 61ddab0b98..96c159cf5e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_if_not.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_if_not.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator
find_if_not(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
for (; __first != __last; ++__first)
if (!__pred(*__first))
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/for_each.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/for_each.h
index bfbd37c3a3..6564f31cd0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/for_each.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/for_each.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Function>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Function for_each(_InputIterator __first,
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Function for_each(_InputIterator __first,
_InputIterator __last,
_Function __f) {
for (; __first != __last; ++__first)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/for_each_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/for_each_n.h
index 2552b40c27..38d204a118 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/for_each_n.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/for_each_n.h
@@ -11,6 +11,7 @@
#define _LIBCPP___ALGORITHM_FOR_EACH_N_H
#include <__config>
+#include <__utility/convert_to_integral.h>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -22,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 14
template <class _InputIterator, class _Size, class _Function>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator for_each_n(_InputIterator __first,
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator for_each_n(_InputIterator __first,
_Size __orig_n,
_Function __f) {
typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/generate.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/generate.h
index dacbd8c681..48e21b51e6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/generate.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/generate.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Generator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
generate(_ForwardIterator __first, _ForwardIterator __last, _Generator __gen)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/generate_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/generate_n.h
index 2650e9e5d8..45259989bf 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/generate_n.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/generate_n.h
@@ -10,6 +10,7 @@
#define _LIBCPP___ALGORITHM_GENERATE_N_H
#include <__config>
+#include <__utility/convert_to_integral.h>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -19,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _OutputIterator, class _Size, class _Generator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
generate_n(_OutputIterator __first, _Size __orig_n, _Generator __gen)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/half_positive.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/half_positive.h
index 7666ef1449..74aede2b56 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/half_positive.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/half_positive.h
@@ -29,7 +29,7 @@ typename enable_if
>::type
__half_positive(_Integral __value)
{
- return static_cast<_Integral>(static_cast<typename make_unsigned<_Integral>::type>(__value) / 2);
+ return static_cast<_Integral>(static_cast<__make_unsigned_t<_Integral> >(__value) / 2);
}
template <typename _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_found_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_found_result.h
index d43f45cd80..3134d6e0df 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_found_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_found_result.h
@@ -18,7 +18,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -44,6 +44,6 @@ struct in_found_result {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_IN_FOUND_RESULT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h
index 21efa65506..3cbb9e12d3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template <class _InIter1, class _Func1>
@@ -42,7 +42,7 @@ struct in_fun_result {
};
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_out_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_out_result.h
index e45fef187e..3e747be44d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_out_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_out_result.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -49,7 +49,7 @@ struct in_in_out_result {
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h
index 39e64ced33..2098c188cc 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -46,7 +46,7 @@ struct in_in_result {
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_out_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_out_result.h
index 52a883b176..4046eee57d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_out_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_out_result.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template <class _InIter1, class _OutIter1, class _OutIter2>
@@ -47,7 +47,7 @@ struct in_out_out_result {
};
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h
index 47e6f39079..7f5a0271b4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -46,7 +46,7 @@ struct in_out_result {
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/includes.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/includes.h
index c64194a2c8..cc39f275bf 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/includes.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/includes.h
@@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Comp, class _Proj1, class _Proj2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__includes(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
_Comp&& __comp, _Proj1&& __proj1, _Proj2&& __proj2) {
for (; __first2 != __last2; ++__first1) {
@@ -39,7 +39,7 @@ __includes(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
}
template <class _InputIterator1, class _InputIterator2, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool includes(
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool includes(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
@@ -48,14 +48,18 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
static_assert(__is_callable<_Compare, decltype(*__first1), decltype(*__first2)>::value,
"Comparator has to be callable");
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
return std::__includes(
- std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2),
- static_cast<_Comp_ref>(__comp), __identity(), __identity());
+ std::move(__first1),
+ std::move(__last1),
+ std::move(__first2),
+ std::move(__last2),
+ static_cast<__comp_ref_type<_Compare> >(__comp),
+ __identity(),
+ __identity());
}
template <class _InputIterator1, class _InputIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
return std::includes(
std::move(__first1),
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/inplace_merge.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/inplace_merge.h
index 0890639f49..5bbefc94bd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/inplace_merge.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/inplace_merge.h
@@ -23,7 +23,11 @@
#include <__iterator/distance.h>
#include <__iterator/iterator_traits.h>
#include <__iterator/reverse_iterator.h>
-#include <memory>
+#include <__memory/destruct_n.h>
+#include <__memory/temporary_buffer.h>
+#include <__memory/unique_ptr.h>
+#include <__utility/pair.h>
+#include <new>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -56,6 +60,7 @@ public:
template <class _AlgPolicy, class _Compare, class _InputIterator1, class _Sent1,
class _InputIterator2, class _Sent2, class _OutputIterator>
+_LIBCPP_HIDE_FROM_ABI
void __half_inplace_merge(_InputIterator1 __first1, _Sent1 __last1,
_InputIterator2 __first2, _Sent2 __last2,
_OutputIterator __result, _Compare&& __comp)
@@ -83,6 +88,7 @@ void __half_inplace_merge(_InputIterator1 __first1, _Sent1 __last1,
}
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
+_LIBCPP_HIDE_FROM_ABI
void __buffered_inplace_merge(
_BidirectionalIterator __first,
_BidirectionalIterator __middle,
@@ -231,9 +237,8 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
template <class _BidirectionalIterator, class _Compare>
inline _LIBCPP_HIDE_FROM_ABI void inplace_merge(
_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Compare __comp) {
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
std::__inplace_merge<_ClassicAlgPolicy>(
- std::move(__first), std::move(__middle), std::move(__last), static_cast<_Comp_ref>(__comp));
+ std::move(__first), std::move(__middle), std::move(__last), static_cast<__comp_ref_type<_Compare> >(__comp));
}
template <class _BidirectionalIterator>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap.h
index 0d399a09b8..2dcb4a28e8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap.h
@@ -23,17 +23,16 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _RandomAccessIterator, class _Compare>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
{
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
- return std::__is_heap_until(__first, __last, static_cast<_Comp_ref>(__comp)) == __last;
+ return std::__is_heap_until(__first, __last, static_cast<__comp_ref_type<_Compare> >(__comp)) == __last;
}
template<class _RandomAccessIterator>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap_until.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap_until.h
index adb35af887..6ed4cb29c4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap_until.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap_until.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _RandomAccessIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
__is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp)
{
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
@@ -48,15 +48,14 @@ __is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Co
}
template <class _RandomAccessIterator, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
{
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
- return std::__is_heap_until(__first, __last, static_cast<_Comp_ref>(__comp));
+ return std::__is_heap_until(__first, __last, static_cast<__comp_ref_type<_Compare> >(__comp));
}
template<class _RandomAccessIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
return _VSTD::__is_heap_until(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_partitioned.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_partitioned.h
index b4f421cfc0..ab59d3cce5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_partitioned.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_partitioned.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
is_partitioned(_InputIterator __first, _InputIterator __last, _Predicate __pred)
{
for (; __first != __last; ++__first)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_permutation.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_permutation.h
index 06a4949e21..005445652e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_permutation.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_permutation.h
@@ -55,7 +55,7 @@ struct _ConstTimeDistance<_Iter1, _Iter1, _Iter2, _Iter2, __enable_if_t<
template <class _AlgPolicy,
class _Iter1, class _Sent1, class _Iter2, class _Sent2,
class _Proj1, class _Proj2, class _Pred>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__is_permutation_impl(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
_Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2) {
using _D1 = __iter_diff_t<_Iter1>;
@@ -94,7 +94,7 @@ __is_permutation_impl(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 _
// 2+1 iterators, predicate. Not used by range algorithms.
template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__is_permutation(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2,
_BinaryPredicate&& __pred) {
// Shorten sequences as much as possible by lopping of any equal prefix.
@@ -122,7 +122,7 @@ __is_permutation(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterato
template <class _AlgPolicy,
class _Iter1, class _Sent1, class _Iter2, class _Sent2,
class _Proj1, class _Proj2, class _Pred>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
_Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2,
/*_ConstTimeDistance=*/false_type) {
@@ -156,7 +156,7 @@ __is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last
template <class _AlgPolicy,
class _Iter1, class _Sent1, class _Iter2, class _Sent2,
class _Proj1, class _Proj2, class _Pred>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
_Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2,
/*_ConstTimeDistance=*/true_type) {
@@ -172,7 +172,7 @@ __is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last
template <class _AlgPolicy,
class _Iter1, class _Sent1, class _Iter2, class _Sent2,
class _Proj1, class _Proj2, class _Pred>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
_Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2) {
return std::__is_permutation<_AlgPolicy>(
@@ -185,7 +185,7 @@ __is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last
// 2+1 iterators, predicate
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
_BinaryPredicate __pred) {
static_assert(__is_callable<_BinaryPredicate, decltype(*__first1), decltype(*__first2)>::value,
@@ -197,31 +197,30 @@ is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIt
// 2+1 iterators
template <class _ForwardIterator1, class _ForwardIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) {
- using __v1 = __iter_value_type<_ForwardIterator1>;
- using __v2 = __iter_value_type<_ForwardIterator2>;
- return std::is_permutation(__first1, __last1, __first2, __equal_to<__v1, __v2>());
+ return std::is_permutation(__first1, __last1, __first2, __equal_to());
}
#if _LIBCPP_STD_VER > 11
// 2+2 iterators
template <class _ForwardIterator1, class _ForwardIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
-is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
- _ForwardIterator2 __last2) {
- using __v1 = __iter_value_type<_ForwardIterator1>;
- using __v2 = __iter_value_type<_ForwardIterator2>;
-
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool is_permutation(
+ _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) {
return std::__is_permutation<_ClassicAlgPolicy>(
- std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2),
- __equal_to<__v1, __v2>(), __identity(), __identity());
+ std::move(__first1),
+ std::move(__last1),
+ std::move(__first2),
+ std::move(__last2),
+ __equal_to(),
+ __identity(),
+ __identity());
}
// 2+2 iterators, predicate
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
_ForwardIterator2 __last2, _BinaryPredicate __pred) {
static_assert(__is_callable<_BinaryPredicate, decltype(*__first1), decltype(*__first2)>::value,
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_sorted.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_sorted.h
index 56de95bb31..bf44f45764 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_sorted.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_sorted.h
@@ -23,17 +23,16 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Compare>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
{
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
- return _VSTD::__is_sorted_until<_Comp_ref>(__first, __last, __comp) == __last;
+ return _VSTD::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp) == __last;
}
template<class _ForwardIterator>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
is_sorted(_ForwardIterator __first, _ForwardIterator __last)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_sorted_until.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_sorted_until.h
index 338d28508c..b6683000a0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_sorted_until.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_sorted_until.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _ForwardIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
__is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
{
if (__first != __last)
@@ -38,15 +38,14 @@ __is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __
}
template <class _ForwardIterator, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
{
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
- return _VSTD::__is_sorted_until<_Comp_ref>(__first, __last, __comp);
+ return _VSTD::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp);
}
template<class _ForwardIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
is_sorted_until(_ForwardIterator __first, _ForwardIterator __last)
{
return _VSTD::is_sorted_until(__first, __last, __less<typename iterator_traits<_ForwardIterator>::value_type>());
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/iter_swap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/iter_swap.h
index 038859e136..0d93f7f756 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/iter_swap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/iter_swap.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator1, class _ForwardIterator2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void iter_swap(_ForwardIterator1 __a,
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 void iter_swap(_ForwardIterator1 __a,
_ForwardIterator2 __b)
// _NOEXCEPT_(_NOEXCEPT_(swap(*__a, *__b)))
_NOEXCEPT_(_NOEXCEPT_(swap(*declval<_ForwardIterator1>(), *declval<_ForwardIterator2>()))) {
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/iterator_operations.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/iterator_operations.h
index af46187873..bfe82c2028 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/iterator_operations.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/iterator_operations.h
@@ -34,7 +34,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy> struct _IterOps;
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
struct _RangeAlgPolicy {};
template <>
@@ -76,14 +76,14 @@ struct _IterOps<_ClassicAlgPolicy> {
// advance
template <class _Iter, class _Distance>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
static void advance(_Iter& __iter, _Distance __count) {
std::advance(__iter, __count);
}
// distance
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
static typename iterator_traits<_Iter>::difference_type distance(_Iter __first, _Iter __last) {
return std::distance(__first, __last);
}
@@ -95,9 +95,9 @@ struct _IterOps<_ClassicAlgPolicy> {
using __move_t = decltype(std::move(*std::declval<_Iter&>()));
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
static void __validate_iter_reference() {
- static_assert(is_same<__deref_t<_Iter>, typename iterator_traits<__uncvref_t<_Iter> >::reference>::value,
+ static_assert(is_same<__deref_t<_Iter>, typename iterator_traits<__remove_cvref_t<_Iter> >::reference>::value,
"It looks like your iterator's `iterator_traits<It>::reference` does not match the return type of "
"dereferencing the iterator, i.e., calling `*it`. This is undefined behavior according to [input.iterators] "
"and can lead to dangling reference issues at runtime, so we are flagging this.");
@@ -105,7 +105,7 @@ struct _IterOps<_ClassicAlgPolicy> {
// iter_move
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 static
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static
// If the result of dereferencing `_Iter` is a reference type, deduce the result of calling `std::move` on it. Note
// that the C++03 mode doesn't support `decltype(auto)` as the return type.
__enable_if_t<
@@ -118,7 +118,7 @@ struct _IterOps<_ClassicAlgPolicy> {
}
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 static
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static
// If the result of dereferencing `_Iter` is a value type, deduce the return value of this function to also be a
// value -- otherwise, after `operator*` returns a temporary, this function would return a dangling reference to that
// temporary. Note that the C++03 mode doesn't support `auto` as the return type.
@@ -133,35 +133,35 @@ struct _IterOps<_ClassicAlgPolicy> {
// iter_swap
template <class _Iter1, class _Iter2>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
static void iter_swap(_Iter1&& __a, _Iter2&& __b) {
std::iter_swap(std::forward<_Iter1>(__a), std::forward<_Iter2>(__b));
}
// next
template <class _Iterator>
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14
_Iterator next(_Iterator, _Iterator __last) {
return __last;
}
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11
- __uncvref_t<_Iter> next(_Iter&& __it,
- typename iterator_traits<__uncvref_t<_Iter> >::difference_type __n = 1) {
+ _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14
+ __remove_cvref_t<_Iter> next(_Iter&& __it,
+ typename iterator_traits<__remove_cvref_t<_Iter> >::difference_type __n = 1) {
return std::next(std::forward<_Iter>(__it), __n);
}
// prev
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11
- __uncvref_t<_Iter> prev(_Iter&& __iter,
- typename iterator_traits<__uncvref_t<_Iter> >::difference_type __n = 1) {
+ _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14
+ __remove_cvref_t<_Iter> prev(_Iter&& __iter,
+ typename iterator_traits<__remove_cvref_t<_Iter> >::difference_type __n = 1) {
return std::prev(std::forward<_Iter>(__iter), __n);
}
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14
void __advance_to(_Iter& __first, _Iter __last) {
__first = __last;
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/lexicographical_compare.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/lexicographical_compare.h
index 30ddf24081..0a13c5dd31 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/lexicographical_compare.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/lexicographical_compare.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _InputIterator1, class _InputIterator2>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
{
@@ -37,18 +37,17 @@ __lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
template <class _InputIterator1, class _InputIterator2, class _Compare>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
{
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
- return _VSTD::__lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __comp);
+ return _VSTD::__lexicographical_compare<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __comp);
}
template <class _InputIterator1, class _InputIterator2>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/lower_bound.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/lower_bound.h
index 2c92f71526..2648982ea5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/lower_bound.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/lower_bound.h
@@ -29,7 +29,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Iter, class _Sent, class _Type, class _Proj, class _Comp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_Iter __lower_bound_impl(_Iter __first, _Sent __last, const _Type& __value, _Comp& __comp, _Proj& __proj) {
auto __len = _IterOps<_AlgPolicy>::distance(__first, __last);
@@ -48,7 +48,7 @@ _Iter __lower_bound_impl(_Iter __first, _Sent __last, const _Type& __value, _Com
}
template <class _ForwardIterator, class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
static_assert(__is_callable<_Compare, decltype(*__first), const _Tp&>::value,
"The comparator has to be callable");
@@ -57,7 +57,7 @@ _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last,
}
template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
return std::lower_bound(__first, __last, __value,
__less<typename iterator_traits<_ForwardIterator>::value_type, _Tp>());
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/make_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/make_heap.h
index 0aa67d18ed..d66cfe2e5f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/make_heap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/make_heap.h
@@ -24,10 +24,9 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp) {
- using _CompRef = typename __comp_ref_type<_Compare>::type;
- _CompRef __comp_ref = __comp;
+ __comp_ref_type<_Compare> __comp_ref = __comp;
using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type;
difference_type __n = __last - __first;
@@ -40,13 +39,13 @@ void __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _C
}
template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
std::__make_heap<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
}
template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
std::make_heap(std::move(__first), std::move(__last),
__less<typename iterator_traits<_RandomAccessIterator>::value_type>());
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/make_projected.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/make_projected.h
index 6c1d156776..87d4d59042 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/make_projected.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/make_projected.h
@@ -93,7 +93,7 @@ __make_projected(_Pred& __pred, _Proj&) {
_LIBCPP_END_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -121,6 +121,6 @@ decltype(auto) __make_projected_comp(_Comp& __comp, _Proj1& __proj1, _Proj2& __p
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_MAKE_PROJECTED_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/max.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/max.h
index 345b235a21..a08a3fc59b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/max.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/max.h
@@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
@@ -35,7 +35,7 @@ max(const _Tp& __a, const _Tp& __b, _Compare __comp)
template <class _Tp>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&
max(const _Tp& __a, const _Tp& __b)
{
@@ -46,17 +46,16 @@ max(const _Tp& __a, const _Tp& __b)
template<class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp
max(initializer_list<_Tp> __t, _Compare __comp)
{
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
- return *_VSTD::__max_element<_Comp_ref>(__t.begin(), __t.end(), __comp);
+ return *_VSTD::__max_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
}
template<class _Tp>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp
max(initializer_list<_Tp> __t)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/max_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/max_element.h
index 795ec8e1dd..6ac310619b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/max_element.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/max_element.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _ForwardIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
__max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
{
static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -37,16 +37,15 @@ __max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp
}
template <class _ForwardIterator, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
{
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
- return _VSTD::__max_element<_Comp_ref>(__first, __last, __comp);
+ return _VSTD::__max_element<__comp_ref_type<_Compare> >(__first, __last, __comp);
}
template <class _ForwardIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
max_element(_ForwardIterator __first, _ForwardIterator __last)
{
return _VSTD::max_element(__first, __last,
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/merge.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/merge.h
index 48360ed5b4..e54e430bcb 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/merge.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/merge.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
__merge(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
@@ -46,17 +46,16 @@ __merge(_InputIterator1 __first1, _InputIterator1 __last1,
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
merge(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
{
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
- return _VSTD::__merge<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
+ return _VSTD::__merge<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __result, __comp);
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
merge(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/min.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/min.h
index 3d8c73d78f..2882485ad7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/min.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/min.h
@@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
@@ -35,7 +35,7 @@ min(const _Tp& __a, const _Tp& __b, _Compare __comp)
template <class _Tp>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&
min(const _Tp& __a, const _Tp& __b)
{
@@ -46,17 +46,16 @@ min(const _Tp& __a, const _Tp& __b)
template<class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp
min(initializer_list<_Tp> __t, _Compare __comp)
{
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
- return *_VSTD::__min_element<_Comp_ref>(__t.begin(), __t.end(), __comp);
+ return *_VSTD::__min_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
}
template<class _Tp>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp
min(initializer_list<_Tp> __t)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_element.h
index 17b242c341..c0706fe9e4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_element.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_element.h
@@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Comp, class _Iter, class _Sent, class _Proj>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
_Iter __min_element(_Iter __first, _Sent __last, _Comp __comp, _Proj& __proj) {
if (__first == __last)
return __first;
@@ -39,14 +39,14 @@ _Iter __min_element(_Iter __first, _Sent __last, _Comp __comp, _Proj& __proj) {
}
template <class _Comp, class _Iter, class _Sent>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
_Iter __min_element(_Iter __first, _Sent __last, _Comp __comp) {
auto __proj = __identity();
return std::__min_element<_Comp>(std::move(__first), std::move(__last), __comp, __proj);
}
template <class _ForwardIterator, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
{
static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -54,12 +54,11 @@ min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
static_assert(__is_callable<_Compare, decltype(*__first), decltype(*__first)>::value,
"The comparator has to be callable");
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
- return std::__min_element<_Comp_ref>(std::move(__first), std::move(__last), __comp);
+ return std::__min_element<__comp_ref_type<_Compare> >(std::move(__first), std::move(__last), __comp);
}
template <class _ForwardIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
min_element(_ForwardIterator __first, _ForwardIterator __last)
{
return _VSTD::min_element(__first, __last,
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_max_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_max_result.h
index ca77dcc572..4be39992b4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_max_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_max_result.h
@@ -23,7 +23,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -47,7 +47,7 @@ struct min_max_result {
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax.h
index 7e10b8b835..6ef0a77708 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax.h
@@ -25,7 +25,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template<class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<const _Tp&, const _Tp&>
minmax(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
@@ -35,7 +35,7 @@ minmax(const _Tp& __a, const _Tp& __b, _Compare __comp)
template<class _Tp>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<const _Tp&, const _Tp&>
minmax(const _Tp& __a, const _Tp& __b)
{
@@ -45,7 +45,7 @@ minmax(const _Tp& __a, const _Tp& __b)
#ifndef _LIBCPP_CXX03_LANG
template<class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Tp, _Tp> minmax(initializer_list<_Tp> __t, _Compare __comp) {
static_assert(__is_callable<_Compare, _Tp, _Tp>::value, "The comparator has to be callable");
__identity __proj;
@@ -55,7 +55,7 @@ pair<_Tp, _Tp> minmax(initializer_list<_Tp> __t, _Compare __comp) {
template<class _Tp>
_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Tp, _Tp>
minmax(initializer_list<_Tp> __t)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax_element.h
index cf67184e0b..caa963e112 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax_element.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax_element.h
@@ -32,14 +32,14 @@ public:
_MinmaxElementLessFunc(_Comp& __comp, _Proj& __proj) : __comp_(__comp), __proj_(__proj) {}
template <class _Iter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator()(_Iter& __it1, _Iter& __it2) {
return std::__invoke(__comp_, std::__invoke(__proj_, *__it1), std::__invoke(__proj_, *__it2));
}
};
template <class _Iter, class _Sent, class _Proj, class _Comp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter, _Iter> __minmax_element_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
auto __less = _MinmaxElementLessFunc<_Comp, _Proj>(__comp, __proj);
@@ -79,7 +79,7 @@ pair<_Iter, _Iter> __minmax_element_impl(_Iter __first, _Sent __last, _Comp& __c
}
template <class _ForwardIterator, class _Compare>
-_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_ForwardIterator, _ForwardIterator>
minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) {
static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -91,7 +91,7 @@ minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __com
}
template <class _ForwardIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_ForwardIterator, _ForwardIterator> minmax_element(_ForwardIterator __first, _ForwardIterator __last) {
return std::minmax_element(__first, __last, __less<typename iterator_traits<_ForwardIterator>::value_type>());
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/mismatch.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/mismatch.h
index f2011faf2f..600e2cdd3d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/mismatch.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/mismatch.h
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __pred) {
for (; __first1 != __last1; ++__first1, (void)++__first2)
if (!__pred(*__first1, *__first2))
@@ -33,17 +33,15 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
template <class _InputIterator1, class _InputIterator2>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) {
- typedef typename iterator_traits<_InputIterator1>::value_type __v1;
- typedef typename iterator_traits<_InputIterator2>::value_type __v2;
- return _VSTD::mismatch(__first1, __last1, __first2, __equal_to<__v1, __v2>());
+ return std::mismatch(__first1, __last1, __first2, __equal_to());
}
#if _LIBCPP_STD_VER > 11
template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
_BinaryPredicate __pred) {
for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void)++__first2)
@@ -54,11 +52,9 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
template <class _InputIterator1, class _InputIterator2>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
- typedef typename iterator_traits<_InputIterator1>::value_type __v1;
- typedef typename iterator_traits<_InputIterator2>::value_type __v2;
- return _VSTD::mismatch(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>());
+ return std::mismatch(__first1, __last1, __first2, __last2, __equal_to());
}
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/move.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/move.h
index c090faf6b6..e2f8b22800 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/move.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/move.h
@@ -28,7 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// move
template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
pair<_InIter, _OutIter> __move_impl(_InIter __first, _Sent __last, _OutIter __result) {
while (__first != __last) {
*__result = _IterOps<_AlgPolicy>::__iter_move(__first);
@@ -41,9 +41,9 @@ pair<_InIter, _OutIter> __move_impl(_InIter __first, _Sent __last, _OutIter __re
template <class _AlgPolicy,
class _InType,
class _OutType,
- class = __enable_if_t<is_same<typename remove_const<_InType>::type, _OutType>::value
+ class = __enable_if_t<is_same<__remove_const_t<_InType>, _OutType>::value
&& is_trivially_move_assignable<_OutType>::value> >
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_InType*, _OutType*> __move_impl(_InType* __first, _InType* __last, _OutType* __result) {
if (__libcpp_is_constant_evaluated()
// TODO: Remove this once GCC supports __builtin_memmove during constant evaluation
@@ -70,12 +70,12 @@ struct __is_trivially_move_assignable_unwrapped
template <class _AlgPolicy,
class _InIter,
class _OutIter,
- __enable_if_t<is_same<typename remove_const<typename iterator_traits<_InIter>::value_type>::type,
+ __enable_if_t<is_same<__remove_const_t<typename iterator_traits<_InIter>::value_type>,
typename iterator_traits<_OutIter>::value_type>::value
&& __is_cpp17_contiguous_iterator<_InIter>::value
&& __is_cpp17_contiguous_iterator<_OutIter>::value
&& is_trivially_move_assignable<__iter_value_type<_OutIter> >::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
pair<reverse_iterator<_InIter>, reverse_iterator<_OutIter> >
__move_impl(reverse_iterator<_InIter> __first,
reverse_iterator<_InIter> __last,
@@ -89,7 +89,7 @@ __move_impl(reverse_iterator<_InIter> __first,
}
template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
__enable_if_t<is_copy_constructible<_InIter>::value
&& is_copy_constructible<_Sent>::value
&& is_copy_constructible<_OutIter>::value, pair<_InIter, _OutIter> >
@@ -100,7 +100,7 @@ __move(_InIter __first, _Sent __last, _OutIter __result) {
}
template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
__enable_if_t<!is_copy_constructible<_InIter>::value
|| !is_copy_constructible<_Sent>::value
|| !is_copy_constructible<_OutIter>::value, pair<_InIter, _OutIter> >
@@ -109,7 +109,7 @@ __move(_InIter __first, _Sent __last, _OutIter __result) {
}
template <class _InputIterator, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator move(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
return std::__move<_ClassicAlgPolicy>(__first, __last, __result).second;
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/move_backward.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/move_backward.h
index 626e250b6d..02aae26fc4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/move_backward.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/move_backward.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _InputIterator, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
_OutputIterator
__move_backward_constexpr(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
{
@@ -33,7 +33,7 @@ __move_backward_constexpr(_InputIterator __first, _InputIterator __last, _Output
}
template <class _AlgPolicy, class _InputIterator, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
_OutputIterator
__move_backward_impl(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
{
@@ -41,10 +41,10 @@ __move_backward_impl(_InputIterator __first, _InputIterator __last, _OutputItera
}
template <class _AlgPolicy, class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
typename enable_if
<
- is_same<typename remove_const<_Tp>::type, _Up>::value &&
+ is_same<__remove_const_t<_Tp>, _Up>::value &&
is_trivially_move_assignable<_Up>::value,
_Up*
>::type
@@ -60,7 +60,7 @@ __move_backward_impl(_Tp* __first, _Tp* __last, _Up* __result)
}
template <class _AlgPolicy, class _BidirectionalIterator1, class _BidirectionalIterator2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_BidirectionalIterator2
__move_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
_BidirectionalIterator2 __result)
@@ -76,7 +76,7 @@ __move_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
}
template <class _BidirectionalIterator1, class _BidirectionalIterator2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_BidirectionalIterator2
move_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
_BidirectionalIterator2 __result)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/next_permutation.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/next_permutation.h
index b58dcf4e1a..73e8b99ab9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/next_permutation.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/next_permutation.h
@@ -25,8 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-pair<_BidirectionalIterator, bool>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator, bool>
__next_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&& __comp)
{
using _Result = pair<_BidirectionalIterator, bool>;
@@ -57,17 +56,16 @@ __next_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&&
}
template <class _BidirectionalIterator, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp)
{
- using _Comp_ref = typename __comp_ref_type<_Compare>::type;
return std::__next_permutation<_ClassicAlgPolicy>(
- std::move(__first), std::move(__last), static_cast<_Comp_ref>(__comp)).second;
+ std::move(__first), std::move(__last), static_cast<__comp_ref_type<_Compare> >(__comp)).second;
}
template <class _BidirectionalIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/none_of.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/none_of.h
index b34b1e00dd..19357eb236 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/none_of.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/none_of.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
for (; __first != __last; ++__first)
if (__pred(*__first))
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h
index 688398dee8..9fdfb2cae6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h
@@ -26,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template<class _Compare, class _RandomAccessIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 bool
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
__nth_element_find_guard(_RandomAccessIterator& __i, _RandomAccessIterator& __j,
_RandomAccessIterator __m, _Compare __comp)
{
@@ -42,7 +42,7 @@ __nth_element_find_guard(_RandomAccessIterator& __i, _RandomAccessIterator& __j,
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 void
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
__nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp)
{
using _Ops = _IterOps<_AlgPolicy>;
@@ -223,7 +223,7 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
}
template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __nth_element_impl(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last,
_Compare& __comp) {
if (__nth == __last)
@@ -231,8 +231,7 @@ void __nth_element_impl(_RandomAccessIterator __first, _RandomAccessIterator __n
std::__debug_randomize_range<_AlgPolicy>(__first, __last);
- using _Comp_ref = typename __comp_ref_type<_Compare>::type;
- std::__nth_element<_AlgPolicy, _Comp_ref>(__first, __nth, __last, __comp);
+ std::__nth_element<_AlgPolicy, __comp_ref_type<_Compare> >(__first, __nth, __last, __comp);
std::__debug_randomize_range<_AlgPolicy>(__first, __nth);
if (__nth != __last) {
@@ -241,14 +240,14 @@ void __nth_element_impl(_RandomAccessIterator __first, _RandomAccessIterator __n
}
template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last,
_Compare __comp) {
std::__nth_element_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__nth), std::move(__last), __comp);
}
template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last) {
std::nth_element(std::move(__first), std::move(__nth), std::move(__last), __less<typename
iterator_traits<_RandomAccessIterator>::value_type>());
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort.h
index dff0cd01f3..861a5b28dd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort.h
@@ -29,7 +29,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_RandomAccessIterator __partial_sort_impl(
_RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last, _Compare&& __comp) {
if (__first == __middle) {
@@ -55,7 +55,7 @@ _RandomAccessIterator __partial_sort_impl(
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_RandomAccessIterator __partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last,
_Compare& __comp) {
if (__first == __middle)
@@ -63,8 +63,8 @@ _RandomAccessIterator __partial_sort(_RandomAccessIterator __first, _RandomAcces
std::__debug_randomize_range<_AlgPolicy>(__first, __last);
- using _Comp_ref = typename __comp_ref_type<_Compare>::type;
- auto __last_iter = std::__partial_sort_impl<_AlgPolicy>(__first, __middle, __last, static_cast<_Comp_ref>(__comp));
+ auto __last_iter =
+ std::__partial_sort_impl<_AlgPolicy>(__first, __middle, __last, static_cast<__comp_ref_type<_Compare> >(__comp));
std::__debug_randomize_range<_AlgPolicy>(__middle, __last);
@@ -72,7 +72,7 @@ _RandomAccessIterator __partial_sort(_RandomAccessIterator __first, _RandomAcces
}
template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last,
_Compare __comp)
@@ -84,7 +84,7 @@ partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran
}
template <class _RandomAccessIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort_copy.h
index 55edf31b0f..1aba07105d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort_copy.h
@@ -33,7 +33,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare,
class _InputIterator, class _Sentinel1, class _RandomAccessIterator, class _Sentinel2,
class _Proj1, class _Proj2>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator, _RandomAccessIterator>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator, _RandomAccessIterator>
__partial_sort_copy(_InputIterator __first, _Sentinel1 __last,
_RandomAccessIterator __result_first, _Sentinel2 __result_last,
_Compare&& __comp, _Proj1&& __proj1, _Proj2&& __proj2)
@@ -60,7 +60,7 @@ __partial_sort_copy(_InputIterator __first, _Sentinel1 __last,
}
template <class _InputIterator, class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_RandomAccessIterator
partial_sort_copy(_InputIterator __first, _InputIterator __last,
_RandomAccessIterator __result_first, _RandomAccessIterator __result_last, _Compare __comp)
@@ -68,14 +68,13 @@ partial_sort_copy(_InputIterator __first, _InputIterator __last,
static_assert(__is_callable<_Compare, decltype(*__first), decltype(*__result_first)>::value,
"Comparator has to be callable");
- using _Comp_ref = typename __comp_ref_type<_Compare>::type;
auto __result = std::__partial_sort_copy<_ClassicAlgPolicy>(__first, __last, __result_first, __result_last,
- static_cast<_Comp_ref>(__comp), __identity(), __identity());
+ static_cast<__comp_ref_type<_Compare> >(__comp), __identity(), __identity());
return __result.second;
}
template <class _InputIterator, class _RandomAccessIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_RandomAccessIterator
partial_sort_copy(_InputIterator __first, _InputIterator __last,
_RandomAccessIterator __result_first, _RandomAccessIterator __result_last)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition.h
index 60b4e290eb..0e094bf8dd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Predicate, class _AlgPolicy, class _ForwardIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator>
__partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred, forward_iterator_tag)
{
while (true)
@@ -48,7 +48,7 @@ __partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred,
}
template <class _Predicate, class _AlgPolicy, class _BidirectionalIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_BidirectionalIterator, _BidirectionalIterator>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator, _BidirectionalIterator>
__partition_impl(_BidirectionalIterator __first, _Sentinel __sentinel, _Predicate __pred,
bidirectional_iterator_tag)
{
@@ -76,15 +76,15 @@ __partition_impl(_BidirectionalIterator __first, _Sentinel __sentinel, _Predicat
}
template <class _AlgPolicy, class _ForwardIterator, class _Sentinel, class _Predicate, class _IterCategory>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
pair<_ForwardIterator, _ForwardIterator> __partition(
_ForwardIterator __first, _Sentinel __last, _Predicate&& __pred, _IterCategory __iter_category) {
- return std::__partition_impl<__uncvref_t<_Predicate>&, _AlgPolicy>(
+ return std::__partition_impl<__remove_cvref_t<_Predicate>&, _AlgPolicy>(
std::move(__first), std::move(__last), __pred, __iter_category);
}
template <class _ForwardIterator, class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator
partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition_copy.h
index cacde0bfd4..ff8826a937 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition_copy.h
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator1,
class _OutputIterator2, class _Predicate>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_OutputIterator1, _OutputIterator2>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_OutputIterator1, _OutputIterator2>
partition_copy(_InputIterator __first, _InputIterator __last,
_OutputIterator1 __out_true, _OutputIterator2 __out_false,
_Predicate __pred)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition_point.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition_point.h
index 1675534e60..6ede71a264 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition_point.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition_point.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template<class _ForwardIterator, class _Predicate>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
partition_point(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
{
typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h
index 44d5d39726..94d32a4239 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h
@@ -27,13 +27,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp,
typename iterator_traits<_RandomAccessIterator>::difference_type __len) {
_LIBCPP_ASSERT(__len > 0, "The heap given to pop_heap must be non-empty");
- using _CompRef = typename __comp_ref_type<_Compare>::type;
- _CompRef __comp_ref = __comp;
+ __comp_ref_type<_Compare> __comp_ref = __comp;
using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;
if (__len > 1) {
@@ -53,7 +52,7 @@ void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Co
}
template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");
@@ -63,7 +62,7 @@ void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp
}
template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
std::pop_heap(std::move(__first), std::move(__last),
__less<typename iterator_traits<_RandomAccessIterator>::value_type>());
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/prev_permutation.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/prev_permutation.h
index 698506372b..0b86ab74ee 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/prev_permutation.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/prev_permutation.h
@@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
pair<_BidirectionalIterator, bool>
__prev_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&& __comp)
{
@@ -57,17 +57,16 @@ __prev_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&&
}
template <class _BidirectionalIterator, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp)
{
- using _Comp_ref = typename __comp_ref_type<_Compare>::type;
return std::__prev_permutation<_ClassicAlgPolicy>(
- std::move(__first), std::move(__last), static_cast<_Comp_ref>(__comp)).second;
+ std::move(__first), std::move(__last), static_cast<__comp_ref_type<_Compare> >(__comp)).second;
}
template <class _BidirectionalIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/push_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/push_heap.h
index 72ad51e1a8..9068495774 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/push_heap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/push_heap.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void __sift_up(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp,
typename iterator_traits<_RandomAccessIterator>::difference_type __len) {
using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;
@@ -50,15 +50,14 @@ void __sift_up(_RandomAccessIterator __first, _RandomAccessIterator __last, _Com
}
template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void __push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp) {
- using _CompRef = typename __comp_ref_type<_Compare>::type;
typename iterator_traits<_RandomAccessIterator>::difference_type __len = __last - __first;
- std::__sift_up<_AlgPolicy, _CompRef>(std::move(__first), std::move(__last), __comp, __len);
+ std::__sift_up<_AlgPolicy, __comp_ref_type<_Compare> >(std::move(__first), std::move(__last), __comp, __len);
}
template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");
@@ -67,7 +66,7 @@ void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Com
}
template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
std::push_heap(std::move(__first), std::move(__last),
__less<typename iterator_traits<_RandomAccessIterator>::value_type>());
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_adjacent_find.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_adjacent_find.h
index e798d56829..d338d13e6e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_adjacent_find.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_adjacent_find.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -50,7 +50,7 @@ struct __fn {
template <forward_iterator _Iter, sentinel_for<_Iter> _Sent,
class _Proj = identity,
indirect_binary_predicate<projected<_Iter, _Proj>, projected<_Iter, _Proj>> _Pred = ranges::equal_to>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
_Iter operator()(_Iter __first, _Sent __last, _Pred __pred = {}, _Proj __proj = {}) const {
return __adjacent_find_impl(std::move(__first), std::move(__last), __pred, __proj);
}
@@ -59,7 +59,7 @@ struct __fn {
class _Proj = identity,
indirect_binary_predicate<projected<iterator_t<_Range>, _Proj>,
projected<iterator_t<_Range>, _Proj>> _Pred = ranges::equal_to>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_iterator_t<_Range> operator()(_Range&& __range, _Pred __pred = {}, _Proj __proj = {}) const {
return __adjacent_find_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
}
@@ -73,6 +73,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_ADJACENT_FIND_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_all_of.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_all_of.h
index a146865652..e45c4e5843 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_all_of.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_all_of.h
@@ -22,7 +22,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -42,14 +42,14 @@ struct __fn {
template <input_iterator _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
return __all_of_impl(std::move(__first), std::move(__last), __pred, __proj);
}
template <input_range _Range, class _Proj = identity,
indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
return __all_of_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
}
@@ -63,6 +63,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_ALL_OF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_any_of.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_any_of.h
index 11c52cbe21..e7d1e723a7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_any_of.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_any_of.h
@@ -22,7 +22,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -42,14 +42,14 @@ struct __fn {
template <input_iterator _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Iter __first, _Sent __last, _Pred __pred = {}, _Proj __proj = {}) const {
return __any_of_impl(std::move(__first), std::move(__last), __pred, __proj);
}
template <input_range _Range, class _Proj = identity,
indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
return __any_of_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
}
@@ -63,6 +63,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_ANY_OF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_binary_search.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_binary_search.h
index 6da68834aa..b2a8977652 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_binary_search.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_binary_search.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -33,7 +33,7 @@ namespace __binary_search {
struct __fn {
template <forward_iterator _Iter, sentinel_for<_Iter> _Sent, class _Type, class _Proj = identity,
indirect_strict_weak_order<const _Type*, projected<_Iter, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Iter __first, _Sent __last, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const {
auto __ret = std::__lower_bound_impl<_RangeAlgPolicy>(__first, __last, __value, __comp, __proj);
return __ret != __last && !std::invoke(__comp, __value, std::invoke(__proj, *__first));
@@ -41,7 +41,7 @@ struct __fn {
template <forward_range _Range, class _Type, class _Proj = identity,
indirect_strict_weak_order<const _Type*, projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Range&& __r, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const {
auto __first = ranges::begin(__r);
auto __last = ranges::end(__r);
@@ -58,6 +58,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_BINARY_SEARCH_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h
index bdde97e178..09a97fc790 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h
@@ -22,7 +22,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -33,7 +33,7 @@ struct __fn {
template <class _Type,
class _Proj = identity,
indirect_strict_weak_order<projected<const _Type*, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
const _Type& operator()(const _Type& __value,
const _Type& __low,
const _Type& __high,
@@ -60,6 +60,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_CLAMP_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy.h
index f5d6d5cd13..87a6a1e136 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy.h
@@ -18,12 +18,13 @@
#include <__ranges/concepts.h>
#include <__ranges/dangling.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -60,6 +61,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_COPY_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_backward.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_backward.h
index 673df8025f..67977201fa 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_backward.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_backward.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -61,6 +61,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_COPY_BACKWARD_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_if.h
index 492104fbbf..dba41c3b3a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_if.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_if.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -76,6 +76,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_COPY_IF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_n.h
index eaa05c9546..38a0a308d3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_n.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_n.h
@@ -26,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -69,7 +69,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count.h
index 670df26911..527dd06200 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count.h
@@ -25,7 +25,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -34,7 +34,7 @@ namespace __count {
struct __fn {
template <input_iterator _Iter, sentinel_for<_Iter> _Sent, class _Type, class _Proj = identity>
requires indirect_binary_predicate<ranges::equal_to, projected<_Iter, _Proj>, const _Type*>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
iter_difference_t<_Iter> operator()(_Iter __first, _Sent __last, const _Type& __value, _Proj __proj = {}) const {
auto __pred = [&](auto&& __e) { return __e == __value; };
return ranges::__count_if_impl(std::move(__first), std::move(__last), __pred, __proj);
@@ -42,7 +42,7 @@ struct __fn {
template <input_range _Range, class _Type, class _Proj = identity>
requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _Type*>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
range_difference_t<_Range> operator()(_Range&& __r, const _Type& __value, _Proj __proj = {}) const {
auto __pred = [&](auto&& __e) { return __e == __value; };
return ranges::__count_if_impl(ranges::begin(__r), ranges::end(__r), __pred, __proj);
@@ -57,6 +57,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_COUNT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count_if.h
index 0f34ee9f2b..931618b7b5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count_if.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count_if.h
@@ -25,7 +25,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -46,14 +46,14 @@ namespace __count_if {
struct __fn {
template <input_iterator _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
indirect_unary_predicate<projected<_Iter, _Proj>> _Predicate>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
iter_difference_t<_Iter> operator()(_Iter __first, _Sent __last, _Predicate __pred, _Proj __proj = {}) const {
return ranges::__count_if_impl(std::move(__first), std::move(__last), __pred, __proj);
}
template <input_range _Range, class _Proj = identity,
indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Predicate>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
range_difference_t<_Range> operator()(_Range&& __r, _Predicate __pred, _Proj __proj = {}) const {
return ranges::__count_if_impl(ranges::begin(__r), ranges::end(__r), __pred, __proj);
}
@@ -67,6 +67,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_COUNT_IF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal.h
index c5f2d23322..3c417f09de 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -60,7 +60,7 @@ public:
class _Proj1 = identity,
class _Proj2 = identity>
requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Iter1 __first1, _Sent1 __last1,
_Iter2 __first2, _Sent2 __last2,
_Pred __pred = {},
@@ -83,7 +83,7 @@ public:
class _Proj1 = identity,
class _Proj2 = identity>
requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Range1&& __range1,
_Range2&& __range2,
_Pred __pred = {},
@@ -110,6 +110,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_EQUAL_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal_range.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal_range.h
index 1a804034b6..4e79420916 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal_range.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal_range.h
@@ -24,12 +24,13 @@
#include <__ranges/subrange.h>
#include <__utility/forward.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -43,7 +44,7 @@ struct __fn {
class _Tp,
class _Proj = identity,
indirect_strict_weak_order<const _Tp*, projected<_Iter, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter>
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter>
operator()(_Iter __first, _Sent __last, const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const {
auto __ret = std::__equal_range<_RangeAlgPolicy>(
std::move(__first), std::move(__last), __value, __comp, __proj);
@@ -55,7 +56,7 @@ struct __fn {
class _Tp,
class _Proj = identity,
indirect_strict_weak_order<const _Tp*, projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range>
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range>
operator()(_Range&& __range, const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const {
auto __ret = std::__equal_range<_RangeAlgPolicy>(
ranges::begin(__range), ranges::end(__range), __value, __comp, __proj);
@@ -72,6 +73,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_EQUAL_RANGE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill.h
index 7ce4a76ba9..6ebc2bd67d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill.h
@@ -20,7 +20,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -54,6 +54,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_FILL_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill_n.h
index d93c573406..a2660e8b59 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill_n.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill_n.h
@@ -17,7 +17,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -43,6 +43,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_FILL_N_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find.h
index ca6d2f4382..580c2a14c9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find.h
@@ -26,7 +26,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -35,7 +35,7 @@ namespace __find {
struct __fn {
template <input_iterator _Ip, sentinel_for<_Ip> _Sp, class _Tp, class _Proj = identity>
requires indirect_binary_predicate<ranges::equal_to, projected<_Ip, _Proj>, const _Tp*>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
_Ip operator()(_Ip __first, _Sp __last, const _Tp& __value, _Proj __proj = {}) const {
auto __pred = [&](auto&& __e) { return std::forward<decltype(__e)>(__e) == __value; };
return ranges::__find_if_impl(std::move(__first), std::move(__last), __pred, __proj);
@@ -43,7 +43,7 @@ struct __fn {
template <input_range _Rp, class _Tp, class _Proj = identity>
requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Rp>, _Proj>, const _Tp*>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_iterator_t<_Rp> operator()(_Rp&& __r, const _Tp& __value, _Proj __proj = {}) const {
auto __pred = [&](auto&& __e) { return std::forward<decltype(__e)>(__e) == __value; };
return ranges::__find_if_impl(ranges::begin(__r), ranges::end(__r), __pred, __proj);
@@ -58,6 +58,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_FIND_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_end.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_end.h
index 270b006498..ea36f4d4e6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_end.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_end.h
@@ -21,12 +21,13 @@
#include <__ranges/access.h>
#include <__ranges/concepts.h>
#include <__ranges/subrange.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -39,7 +40,7 @@ struct __fn {
class _Proj1 = identity,
class _Proj2 = identity>
requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
subrange<_Iter1> operator()(_Iter1 __first1, _Sent1 __last1,
_Iter2 __first2, _Sent2 __last2,
_Pred __pred = {},
@@ -64,7 +65,7 @@ struct __fn {
class _Proj1 = identity,
class _Proj2 = identity>
requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_subrange_t<_Range1> operator()(_Range1&& __range1,
_Range2&& __range2,
_Pred __pred = {},
@@ -92,6 +93,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_FIND_END_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_first_of.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_first_of.h
index ae31d38e6a..9d66e7511c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_first_of.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_first_of.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -54,7 +54,7 @@ struct __fn {
class _Proj1 = identity,
class _Proj2 = identity>
requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
_Iter1 operator()(_Iter1 __first1, _Sent1 __last1,
_Iter2 __first2, _Sent2 __last2,
_Pred __pred = {},
@@ -73,7 +73,7 @@ struct __fn {
class _Proj1 = identity,
class _Proj2 = identity>
requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_iterator_t<_Range1> operator()(_Range1&& __range1,
_Range2&& __range2,
_Pred __pred = {},
@@ -96,6 +96,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_FIND_FIRST_OF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if.h
index 65ac122f66..45ce6e460d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -45,14 +45,14 @@ struct __fn {
template <input_iterator _Ip, sentinel_for<_Ip> _Sp, class _Proj = identity,
indirect_unary_predicate<projected<_Ip, _Proj>> _Pred>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
_Ip operator()(_Ip __first, _Sp __last, _Pred __pred, _Proj __proj = {}) const {
return ranges::__find_if_impl(std::move(__first), std::move(__last), __pred, __proj);
}
template <input_range _Rp, class _Proj = identity,
indirect_unary_predicate<projected<iterator_t<_Rp>, _Proj>> _Pred>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_iterator_t<_Rp> operator()(_Rp&& __r, _Pred __pred, _Proj __proj = {}) const {
return ranges::__find_if_impl(ranges::begin(__r), ranges::end(__r), __pred, __proj);
}
@@ -66,6 +66,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_FIND_IF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if_not.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if_not.h
index 9a1adf71fc..3dd1213275 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if_not.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if_not.h
@@ -26,7 +26,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -35,7 +35,7 @@ namespace __find_if_not {
struct __fn {
template <input_iterator _Ip, sentinel_for<_Ip> _Sp, class _Proj = identity,
indirect_unary_predicate<projected<_Ip, _Proj>> _Pred>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
_Ip operator()(_Ip __first, _Sp __last, _Pred __pred, _Proj __proj = {}) const {
auto __pred2 = [&](auto&& __e) { return !std::invoke(__pred, std::forward<decltype(__e)>(__e)); };
return ranges::__find_if_impl(std::move(__first), std::move(__last), __pred2, __proj);
@@ -43,7 +43,7 @@ struct __fn {
template <input_range _Rp, class _Proj = identity,
indirect_unary_predicate<projected<iterator_t<_Rp>, _Proj>> _Pred>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_iterator_t<_Rp> operator()(_Rp&& __r, _Pred __pred, _Proj __proj = {}) const {
auto __pred2 = [&](auto&& __e) { return !std::invoke(__pred, std::forward<decltype(__e)>(__e)); };
return ranges::__find_if_impl(ranges::begin(__r), ranges::end(__r), __pred2, __proj);
@@ -58,6 +58,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_FIND_IF_NOT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each.h
index f284c0ee3a..0c70c05981 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -73,6 +73,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_FOR_EACH_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each_n.h
index 013afbd193..261816aba4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each_n.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each_n.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -61,6 +61,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_FOR_EACH_N_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate.h
index 149296574d..ae486ae653 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -68,6 +68,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_GENERATE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate_n.h
index 63f466cecd..e625e3a974 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate_n.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate_n.h
@@ -25,7 +25,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -57,6 +57,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_GENERATE_N_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_includes.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_includes.h
index 2c7581af68..8438117cfa 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_includes.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_includes.h
@@ -27,7 +27,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -43,7 +43,7 @@ struct __fn {
class _Proj1 = identity,
class _Proj2 = identity,
indirect_strict_weak_order<projected<_Iter1, _Proj1>, projected<_Iter2, _Proj2>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
_Iter1 __first1,
_Sent1 __last1,
_Iter2 __first2,
@@ -68,7 +68,7 @@ struct __fn {
class _Proj2 = identity,
indirect_strict_weak_order<projected<iterator_t<_Range1>, _Proj1>, projected<iterator_t<_Range2>, _Proj2>>
_Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
_Range1&& __range1, _Range2&& __range2, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
return std::__includes(
ranges::begin(__range1),
@@ -90,6 +90,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_INCLUDES_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_inplace_merge.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_inplace_merge.h
index 12c90908c2..88171a65c8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_inplace_merge.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_inplace_merge.h
@@ -31,7 +31,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -80,6 +80,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_INPLACE_MERGE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap.h
index 0bb1dcda0e..a16c075b07 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap.h
@@ -26,7 +26,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -47,14 +47,14 @@ struct __fn {
template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
return __is_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
}
template <random_access_range _Range, class _Proj = identity,
indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
return __is_heap_fn_impl(ranges::begin(__range), ranges::end(__range), __comp, __proj);
}
@@ -69,6 +69,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_IS_HEAP_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap_until.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap_until.h
index 8a751fcc51..8c8dac5bc9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap_until.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap_until.h
@@ -27,7 +27,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -47,14 +47,14 @@ struct __fn {
template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
_Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
return __is_heap_until_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
}
template <random_access_range _Range, class _Proj = identity,
indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_iterator_t<_Range> operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
return __is_heap_until_fn_impl(ranges::begin(__range), ranges::end(__range), __comp, __proj);
}
@@ -70,6 +70,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_IS_HEAP_UNTIL_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_partitioned.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_partitioned.h
index 3d572895eb..b903953d61 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_partitioned.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_partitioned.h
@@ -23,7 +23,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -54,7 +54,7 @@ struct __fn {
template <input_iterator _Iter, sentinel_for<_Iter> _Sent,
class _Proj = identity,
indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
return __is_parititioned_impl(std::move(__first), std::move(__last), __pred, __proj);
}
@@ -62,7 +62,7 @@ struct __fn {
template <input_range _Range,
class _Proj = identity,
indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
return __is_parititioned_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
}
@@ -76,6 +76,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_IS_PARTITIONED_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_permutation.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_permutation.h
index 41e302fe99..b617500ea0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_permutation.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_permutation.h
@@ -25,7 +25,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -49,7 +49,7 @@ struct __fn {
class _Proj2 = identity,
indirect_equivalence_relation<projected<_Iter1, _Proj1>,
projected<_Iter2, _Proj2>> _Pred = ranges::equal_to>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
_Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
return __is_permutation_func_impl(
@@ -62,7 +62,7 @@ struct __fn {
class _Proj1 = identity,
class _Proj2 = identity,
indirect_equivalence_relation<projected<iterator_t<_Range1>, _Proj1>, projected<iterator_t<_Range2>, _Proj2>> _Pred = ranges::equal_to>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Range1&& __range1, _Range2&& __range2,
_Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
if constexpr (sized_range<_Range1> && sized_range<_Range2>) {
@@ -84,6 +84,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_IS_PERMUTATION_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted.h
index 938e69afba..ce3032ff22 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted.h
@@ -23,7 +23,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -33,7 +33,7 @@ struct __fn {
template <forward_iterator _Iter, sentinel_for<_Iter> _Sent,
class _Proj = identity,
indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
return ranges::__is_sorted_until_impl(std::move(__first), __last, __comp, __proj) == __last;
}
@@ -41,7 +41,7 @@ struct __fn {
template <forward_range _Range,
class _Proj = identity,
indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
auto __last = ranges::end(__range);
return ranges::__is_sorted_until_impl(ranges::begin(__range), __last, __comp, __proj) == __last;
@@ -56,6 +56,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP__ALGORITHM_RANGES_IS_SORTED_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted_until.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted_until.h
index c8f0608e12..17fc42e97f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted_until.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted_until.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -49,7 +49,7 @@ struct __fn {
template <forward_iterator _Iter, sentinel_for<_Iter> _Sent,
class _Proj = identity,
indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
_Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
return ranges::__is_sorted_until_impl(std::move(__first), std::move(__last), __comp, __proj);
}
@@ -57,7 +57,7 @@ struct __fn {
template <forward_range _Range,
class _Proj = identity,
indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_iterator_t<_Range> operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
return ranges::__is_sorted_until_impl(ranges::begin(__range), ranges::end(__range), __comp, __proj);
}
@@ -71,6 +71,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP__ALGORITHM_RANGES_IS_SORTED_UNTIL_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_iterator_concept.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_iterator_concept.h
index 3323119317..c2a508dc9a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_iterator_concept.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_iterator_concept.h
@@ -18,7 +18,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -26,7 +26,7 @@ namespace ranges {
template <class _IterMaybeQualified>
consteval auto __get_iterator_concept() {
- using _Iter = __uncvref_t<_IterMaybeQualified>;
+ using _Iter = __remove_cvref_t<_IterMaybeQualified>;
if constexpr (contiguous_iterator<_Iter>)
return contiguous_iterator_tag();
@@ -46,6 +46,6 @@ using __iterator_concept = decltype(__get_iterator_concept<_Iter>());
} // namespace ranges
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_ITERATOR_CONCEPT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lexicographical_compare.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lexicographical_compare.h
index fe709f7a7f..2972e32716 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lexicographical_compare.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lexicographical_compare.h
@@ -23,7 +23,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -55,7 +55,7 @@ struct __fn {
class _Proj1 = identity,
class _Proj2 = identity,
indirect_strict_weak_order<projected<_Iter1, _Proj1>, projected<_Iter2, _Proj2>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Iter1 __first1, _Sent1 __last1,
_Iter2 __first2, _Sent2 __last2,
_Comp __comp = {},
@@ -74,7 +74,7 @@ struct __fn {
class _Proj2 = identity,
indirect_strict_weak_order<projected<iterator_t<_Range1>, _Proj1>,
projected<iterator_t<_Range2>, _Proj2>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Range1&& __range1, _Range2&& __range2, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
return __lexicographical_compare_impl(ranges::begin(__range1), ranges::end(__range1),
ranges::begin(__range2), ranges::end(__range2),
@@ -93,6 +93,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_LEXICOGRAPHICAL_COMPARE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lower_bound.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lower_bound.h
index 1a9ae204a1..78cbb6d4fb 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lower_bound.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lower_bound.h
@@ -27,7 +27,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -37,14 +37,14 @@ namespace __lower_bound {
struct __fn {
template <forward_iterator _Iter, sentinel_for<_Iter> _Sent, class _Type, class _Proj = identity,
indirect_strict_weak_order<const _Type*, projected<_Iter, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
_Iter operator()(_Iter __first, _Sent __last, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const {
return std::__lower_bound_impl<_RangeAlgPolicy>(__first, __last, __value, __comp, __proj);
}
template <forward_range _Range, class _Type, class _Proj = identity,
indirect_strict_weak_order<const _Type*, projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_iterator_t<_Range> operator()(_Range&& __r,
const _Type& __value,
_Comp __comp = {},
@@ -61,6 +61,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_LOWER_BOUND_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_make_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_make_heap.h
index b114286a85..f25c7ab588 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_make_heap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_make_heap.h
@@ -32,7 +32,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -75,6 +75,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_MAKE_HEAP_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h
index f48bc3ecec..55aef99769 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h
@@ -27,7 +27,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
@@ -39,14 +39,14 @@ namespace __max {
struct __fn {
template <class _Tp, class _Proj = identity,
indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
const _Tp& operator()(const _Tp& __a, const _Tp& __b, _Comp __comp = {}, _Proj __proj = {}) const {
return std::invoke(__comp, std::invoke(__proj, __a), std::invoke(__proj, __b)) ? __b : __a;
}
template <copyable _Tp, class _Proj = identity,
indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
_Tp operator()(initializer_list<_Tp> __il, _Comp __comp = {}, _Proj __proj = {}) const {
_LIBCPP_ASSERT(__il.begin() != __il.end(), "initializer_list must contain at least one element");
@@ -57,7 +57,7 @@ struct __fn {
template <input_range _Rp, class _Proj = identity,
indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
requires indirectly_copyable_storable<iterator_t<_Rp>, range_value_t<_Rp>*>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
range_value_t<_Rp> operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
auto __first = ranges::begin(__r);
auto __last = ranges::end(__r);
@@ -88,6 +88,6 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP_STD_VER > 17 && && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 &&
#endif // _LIBCPP___ALGORITHM_RANGES_MAX_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max_element.h
index d8d7242e17..490f32075a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max_element.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max_element.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -33,7 +33,7 @@ namespace __max_element {
struct __fn {
template <forward_iterator _Ip, sentinel_for<_Ip> _Sp, class _Proj = identity,
indirect_strict_weak_order<projected<_Ip, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
_Ip operator()(_Ip __first, _Sp __last, _Comp __comp = {}, _Proj __proj = {}) const {
auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) { return std::invoke(__comp, __rhs, __lhs); };
return ranges::__min_element_impl(__first, __last, __comp_lhs_rhs_swapped, __proj);
@@ -41,7 +41,7 @@ struct __fn {
template <forward_range _Rp, class _Proj = identity,
indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_iterator_t<_Rp> operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) { return std::invoke(__comp, __rhs, __lhs); };
return ranges::__min_element_impl(ranges::begin(__r), ranges::end(__r), __comp_lhs_rhs_swapped, __proj);
@@ -56,6 +56,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_MAX_ELEMENT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_merge.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_merge.h
index eb621c2351..b36a05abc4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_merge.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_merge.h
@@ -27,7 +27,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -47,7 +47,7 @@ template <
class _Comp,
class _Proj1,
class _Proj2>
-_LIBCPP_HIDE_FROM_ABI constexpr merge_result<__uncvref_t<_InIter1>, __uncvref_t<_InIter2>, __uncvref_t<_OutIter>>
+_LIBCPP_HIDE_FROM_ABI constexpr merge_result<__remove_cvref_t<_InIter1>, __remove_cvref_t<_InIter2>, __remove_cvref_t<_OutIter>>
__merge_impl(
_InIter1&& __first1,
_Sent1&& __last1,
@@ -137,6 +137,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_MERGE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min.h
index 0bb1e72ac5..0e31f57fb8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min.h
@@ -26,7 +26,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
@@ -38,14 +38,14 @@ namespace __min {
struct __fn {
template <class _Tp, class _Proj = identity,
indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
const _Tp& operator()(const _Tp& __a, const _Tp& __b, _Comp __comp = {}, _Proj __proj = {}) const {
return std::invoke(__comp, std::invoke(__proj, __b), std::invoke(__proj, __a)) ? __b : __a;
}
template <copyable _Tp, class _Proj = identity,
indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
_Tp operator()(initializer_list<_Tp> __il, _Comp __comp = {}, _Proj __proj = {}) const {
_LIBCPP_ASSERT(__il.begin() != __il.end(), "initializer_list must contain at least one element");
return *ranges::__min_element_impl(__il.begin(), __il.end(), __comp, __proj);
@@ -54,7 +54,7 @@ struct __fn {
template <input_range _Rp, class _Proj = identity,
indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
requires indirectly_copyable_storable<iterator_t<_Rp>, range_value_t<_Rp>*>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
range_value_t<_Rp> operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
auto __first = ranges::begin(__r);
auto __last = ranges::end(__r);
@@ -84,6 +84,6 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP_STD_VER > 17 && && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 &&
#endif // _LIBCPP___ALGORITHM_RANGES_MIN_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h
index 26f95fe3a6..1751874d03 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -48,14 +48,14 @@ namespace __min_element {
struct __fn {
template <forward_iterator _Ip, sentinel_for<_Ip> _Sp, class _Proj = identity,
indirect_strict_weak_order<projected<_Ip, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
_Ip operator()(_Ip __first, _Sp __last, _Comp __comp = {}, _Proj __proj = {}) const {
return ranges::__min_element_impl(__first, __last, __comp, __proj);
}
template <forward_range _Rp, class _Proj = identity,
indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_iterator_t<_Rp> operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
return ranges::__min_element_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
}
@@ -69,6 +69,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_MIN_ELEMENT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax.h
index 2f4bba0e7c..f82e00551e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax.h
@@ -23,13 +23,14 @@
#include <__ranges/concepts.h>
#include <__utility/forward.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#include <initializer_list>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
@@ -44,7 +45,7 @@ namespace __minmax {
struct __fn {
template <class _Type, class _Proj = identity,
indirect_strict_weak_order<projected<const _Type*, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr ranges::minmax_result<const _Type&>
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr ranges::minmax_result<const _Type&>
operator()(const _Type& __a, const _Type& __b, _Comp __comp = {}, _Proj __proj = {}) const {
if (std::invoke(__comp, std::invoke(__proj, __b), std::invoke(__proj, __a)))
return {__b, __a};
@@ -53,7 +54,7 @@ struct __fn {
template <copyable _Type, class _Proj = identity,
indirect_strict_weak_order<projected<const _Type*, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
ranges::minmax_result<_Type> operator()(initializer_list<_Type> __il, _Comp __comp = {}, _Proj __proj = {}) const {
_LIBCPP_ASSERT(__il.begin() != __il.end(), "initializer_list has to contain at least one element");
auto __iters = std::__minmax_element_impl(__il.begin(), __il.end(), __comp, __proj);
@@ -63,7 +64,7 @@ struct __fn {
template <input_range _Range, class _Proj = identity,
indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
requires indirectly_copyable_storable<iterator_t<_Range>, range_value_t<_Range>*>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
ranges::minmax_result<range_value_t<_Range>> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
auto __first = ranges::begin(__r);
auto __last = ranges::end(__r);
@@ -128,6 +129,6 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_MINMAX_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax_element.h
index b7bb26cefe..6699f9626e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax_element.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax_element.h
@@ -29,7 +29,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -42,7 +42,7 @@ namespace __minmax_element {
struct __fn {
template <forward_iterator _Ip, sentinel_for<_Ip> _Sp, class _Proj = identity,
indirect_strict_weak_order<projected<_Ip, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
ranges::minmax_element_result<_Ip> operator()(_Ip __first, _Sp __last, _Comp __comp = {}, _Proj __proj = {}) const {
auto __ret = std::__minmax_element_impl(std::move(__first), std::move(__last), __comp, __proj);
return {__ret.first, __ret.second};
@@ -50,7 +50,7 @@ struct __fn {
template <forward_range _Rp, class _Proj = identity,
indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
ranges::minmax_element_result<borrowed_iterator_t<_Rp>>
operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
auto __ret = std::__minmax_element_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
@@ -67,6 +67,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_MINMAX_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_mismatch.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_mismatch.h
index 4c1440b5da..4fd0517928 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_mismatch.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_mismatch.h
@@ -27,7 +27,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -55,7 +55,7 @@ struct __fn {
input_iterator _I2, sentinel_for<_I2> _S2,
class _Pred = ranges::equal_to, class _Proj1 = identity, class _Proj2 = identity>
requires indirectly_comparable<_I1, _I2, _Pred, _Proj1, _Proj2>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
mismatch_result<_I1, _I2> operator()(_I1 __first1, _S1 __last1, _I2 __first2, _S2 __last2,
_Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
return __go(std::move(__first1), __last1, std::move(__first2), __last2, __pred, __proj1, __proj2);
@@ -64,7 +64,7 @@ struct __fn {
template <input_range _R1, input_range _R2,
class _Pred = ranges::equal_to, class _Proj1 = identity, class _Proj2 = identity>
requires indirectly_comparable<iterator_t<_R1>, iterator_t<_R2>, _Pred, _Proj1, _Proj2>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
mismatch_result<borrowed_iterator_t<_R1>, borrowed_iterator_t<_R2>>
operator()(_R1&& __r1, _R2&& __r2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
return __go(ranges::begin(__r1), ranges::end(__r1), ranges::begin(__r2), ranges::end(__r2),
@@ -78,7 +78,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move.h
index 9e1d4c72fb..94f9970ed2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -67,6 +67,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_MOVE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move_backward.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move_backward.h
index 583a6bf29d..134e087737 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move_backward.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move_backward.h
@@ -25,7 +25,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -71,6 +71,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_MOVE_BACKWARD_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_next_permutation.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_next_permutation.h
index 34c5fee040..6c8e8e1529 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_next_permutation.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_next_permutation.h
@@ -22,12 +22,13 @@
#include <__ranges/concepts.h>
#include <__ranges/dangling.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -67,6 +68,6 @@ constexpr inline auto next_permutation = __next_permutation::__fn{};
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_NEXT_PERMUTATION_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_none_of.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_none_of.h
index 706ff5cd74..b39e570fd3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_none_of.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_none_of.h
@@ -22,7 +22,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -42,14 +42,14 @@ struct __fn {
template <input_iterator _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Iter __first, _Sent __last, _Pred __pred = {}, _Proj __proj = {}) const {
return __none_of_impl(std::move(__first), std::move(__last), __pred, __proj);
}
template <input_range _Range, class _Proj = identity,
indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
bool operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
return __none_of_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
}
@@ -63,6 +63,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_NONE_OF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_nth_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_nth_element.h
index ad63bd20fb..d9ec4f1382 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_nth_element.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_nth_element.h
@@ -31,7 +31,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -75,6 +75,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_NTH_ELEMENT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort.h
index 020e34925d..3ea0a7fb44 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort.h
@@ -27,12 +27,13 @@
#include <__ranges/dangling.h>
#include <__utility/forward.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -72,6 +73,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort_copy.h
index 271c347b7a..212db555a8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort_copy.h
@@ -24,12 +24,13 @@
#include <__ranges/concepts.h>
#include <__ranges/dangling.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -86,6 +87,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_COPY_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition.h
index 6a53933f37..8b3aae5c25 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition.h
@@ -26,13 +26,14 @@
#include <__ranges/subrange.h>
#include <__utility/forward.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -43,7 +44,7 @@ struct __fn {
template <class _Iter, class _Sent, class _Proj, class _Pred>
_LIBCPP_HIDE_FROM_ABI static constexpr
- subrange<__uncvref_t<_Iter>> __partition_fn_impl(_Iter&& __first, _Sent&& __last, _Pred&& __pred, _Proj&& __proj) {
+ subrange<__remove_cvref_t<_Iter>> __partition_fn_impl(_Iter&& __first, _Sent&& __last, _Pred&& __pred, _Proj&& __proj) {
auto&& __projected_pred = std::__make_projected(__pred, __proj);
auto __result = std::__partition<_RangeAlgPolicy>(
std::move(__first), std::move(__last), __projected_pred, __iterator_concept<_Iter>());
@@ -77,6 +78,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_PARTITION_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_copy.h
index 7201a8cbfe..e7a9a347df 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_copy.h
@@ -26,7 +26,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -43,7 +43,7 @@ struct __fn {
template <class _InIter, class _Sent, class _OutIter1, class _OutIter2, class _Proj, class _Pred>
_LIBCPP_HIDE_FROM_ABI constexpr
static partition_copy_result<
- __uncvref_t<_InIter>, __uncvref_t<_OutIter1>, __uncvref_t<_OutIter2>
+ __remove_cvref_t<_InIter>, __remove_cvref_t<_OutIter1>, __remove_cvref_t<_OutIter2>
> __partition_copy_fn_impl( _InIter&& __first, _Sent&& __last, _OutIter1&& __out_true, _OutIter2&& __out_false,
_Pred& __pred, _Proj& __proj) {
for (; __first != __last; ++__first) {
@@ -93,6 +93,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_PARTITION_COPY_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_point.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_point.h
index 6614a0bb50..2bd118d4de 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_point.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_point.h
@@ -27,7 +27,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -83,6 +83,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_PARTITION_POINT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_pop_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_pop_heap.h
index fc7554fb07..65beec8864 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_pop_heap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_pop_heap.h
@@ -32,7 +32,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -76,6 +76,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_POP_HEAP_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_prev_permutation.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_prev_permutation.h
index 58da606d07..6866d90cf4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_prev_permutation.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_prev_permutation.h
@@ -22,12 +22,13 @@
#include <__ranges/concepts.h>
#include <__ranges/dangling.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -71,6 +72,6 @@ constexpr inline auto prev_permutation = __prev_permutation::__fn{};
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_PREV_PERMUTATION_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_push_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_push_heap.h
index 3436b39e12..a1f4347417 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_push_heap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_push_heap.h
@@ -32,7 +32,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -75,6 +75,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_PUSH_HEAP_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove.h
index a6a1200763..dd5c5fb453 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove.h
@@ -25,7 +25,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -35,7 +35,7 @@ struct __fn {
template <permutable _Iter, sentinel_for<_Iter> _Sent, class _Type, class _Proj = identity>
requires indirect_binary_predicate<ranges::equal_to, projected<_Iter, _Proj>, const _Type*>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
subrange<_Iter> operator()(_Iter __first, _Sent __last, const _Type& __value, _Proj __proj = {}) const {
auto __pred = [&](auto&& __other) { return __value == __other; };
return ranges::__remove_if_impl(std::move(__first), std::move(__last), __pred, __proj);
@@ -44,7 +44,7 @@ struct __fn {
template <forward_range _Range, class _Type, class _Proj = identity>
requires permutable<iterator_t<_Range>>
&& indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _Type*>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_subrange_t<_Range> operator()(_Range&& __range, const _Type& __value, _Proj __proj = {}) const {
auto __pred = [&](auto&& __other) { return __value == __other; };
return ranges::__remove_if_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
@@ -59,6 +59,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy.h
index a8144ce0ec..2102228667 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy.h
@@ -26,7 +26,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -71,6 +71,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy_if.h
index 3f56693fa1..4fc67454b9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy_if.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy_if.h
@@ -29,7 +29,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -85,6 +85,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_IF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_if.h
index d4e382e551..1f17467fc4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_if.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_if.h
@@ -27,7 +27,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -56,7 +56,7 @@ struct __fn {
template <permutable _Iter, sentinel_for<_Iter> _Sent,
class _Proj = identity,
indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
subrange<_Iter> operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
return ranges::__remove_if_impl(std::move(__first), std::move(__last), __pred, __proj);
}
@@ -65,7 +65,7 @@ struct __fn {
class _Proj = identity,
indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
requires permutable<iterator_t<_Range>>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_subrange_t<_Range> operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
return ranges::__remove_if_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
}
@@ -80,6 +80,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_IF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace.h
index 5e74c3ff80..8b12beacb7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined (_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -69,6 +69,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined (_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy.h
index 7d59dbe7db..f87a236fbd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy.h
@@ -26,7 +26,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -86,6 +86,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy_if.h
index 7602e8a144..b8741ec7be 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy_if.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy_if.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -88,6 +88,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_IF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_if.h
index 0f9555fc35..65be3c7d76 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_if.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_if.h
@@ -23,7 +23,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined (_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -72,6 +72,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined (_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_IF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse.h
index e7555d0f9a..e2a5d9a825 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse.h
@@ -22,7 +22,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -78,6 +78,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_REVERSE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse_copy.h
index e2da9b484a..a84b1ad780 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse_copy.h
@@ -25,7 +25,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -62,6 +62,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_REVERSE_COPY_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate.h
index 1cd69a141f..91ed4027df 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate.h
@@ -25,7 +25,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -66,6 +66,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_ROTATE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate_copy.h
index d7a282c867..52f403c16a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate_copy.h
@@ -23,7 +23,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -63,6 +63,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_ROTATE_COPY_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sample.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sample.h
index a8477f8037..a37cb64fa2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sample.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sample.h
@@ -27,7 +27,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -69,6 +69,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_SAMPLE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_search.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_search.h
index 0564bbe1f8..388d5afa49 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_search.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_search.h
@@ -22,12 +22,13 @@
#include <__ranges/concepts.h>
#include <__ranges/size.h>
#include <__ranges/subrange.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -74,7 +75,7 @@ struct __fn {
class _Proj1 = identity,
class _Proj2 = identity>
requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
subrange<_Iter1> operator()(_Iter1 __first1, _Sent1 __last1,
_Iter2 __first2, _Sent2 __last2,
_Pred __pred = {},
@@ -89,7 +90,7 @@ struct __fn {
class _Proj1 = identity,
class _Proj2 = identity>
requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_subrange_t<_Range1> operator()(_Range1&& __range1,
_Range2&& __range2,
_Pred __pred = {},
@@ -129,6 +130,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_SEARCH_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_search_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_search_n.h
index 29fdbfb1c7..f44afde03e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_search_n.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_search_n.h
@@ -25,12 +25,13 @@
#include <__ranges/size.h>
#include <__ranges/subrange.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -75,7 +76,7 @@ struct __fn {
class _Pred = ranges::equal_to,
class _Proj = identity>
requires indirectly_comparable<_Iter, const _Type*, _Pred, _Proj>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
subrange<_Iter> operator()(_Iter __first, _Sent __last,
iter_difference_t<_Iter> __count,
const _Type& __value,
@@ -86,7 +87,7 @@ struct __fn {
template <forward_range _Range, class _Type, class _Pred = ranges::equal_to, class _Proj = identity>
requires indirectly_comparable<iterator_t<_Range>, const _Type*, _Pred, _Proj>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_subrange_t<_Range> operator()(_Range&& __range,
range_difference_t<_Range> __count,
const _Type& __value,
@@ -115,6 +116,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_SEARCH_N_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_difference.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_difference.h
index efafbda554..398ccc975f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_difference.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_difference.h
@@ -23,12 +23,13 @@
#include <__ranges/dangling.h>
#include <__type_traits/decay.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -100,5 +101,5 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_SET_DIFFERENCE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_intersection.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_intersection.h
index 331ff061d3..aa9fd24ced 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_intersection.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_intersection.h
@@ -28,7 +28,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -113,5 +113,5 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_SET_INTERSECTION_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_symmetric_difference.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_symmetric_difference.h
index f45c5dca6e..b0c79537b1 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_symmetric_difference.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_symmetric_difference.h
@@ -27,7 +27,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -112,5 +112,5 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_SET_SYMMETRIC_DIFFERENCE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_union.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_union.h
index e4f28bb86a..500c0b2c2d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_union.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_union.h
@@ -30,7 +30,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -115,6 +115,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_SET_UNION_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h
index 9b7f81e489..a2f2c0edde 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h
@@ -31,7 +31,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -66,6 +66,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_SHUFFLE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort.h
index c3f3cbff00..32391df5f6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort.h
@@ -31,7 +31,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -74,6 +74,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_SORT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort_heap.h
index f6e4dcb43d..9feb0f609b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort_heap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort_heap.h
@@ -32,7 +32,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -75,6 +75,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_SORT_HEAP_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_partition.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_partition.h
index b20dfa3a8b..c3469f17c7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_partition.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_partition.h
@@ -34,7 +34,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -45,7 +45,7 @@ struct __fn {
template <class _Iter, class _Sent, class _Proj, class _Pred>
_LIBCPP_HIDE_FROM_ABI static
- subrange<__uncvref_t<_Iter>> __stable_partition_fn_impl(
+ subrange<__remove_cvref_t<_Iter>> __stable_partition_fn_impl(
_Iter&& __first, _Sent&& __last, _Pred&& __pred, _Proj&& __proj) {
auto __last_iter = ranges::next(__first, __last);
@@ -83,6 +83,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_STABLE_PARTITION_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_sort.h
index 7ecffefc19..d3c48ddb9b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_sort.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_sort.h
@@ -31,7 +31,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -74,6 +74,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_STABLE_SORT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h
index d980fdec2c..552fd55ff8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -63,6 +63,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_SWAP_RANGES_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_transform.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_transform.h
index 3c13b1b79f..c0981a04a9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_transform.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_transform.h
@@ -26,7 +26,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -165,6 +165,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_TRANSFORM_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique.h
index 11370aeccd..be427ccf7f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique.h
@@ -26,12 +26,13 @@
#include <__ranges/subrange.h>
#include <__utility/forward.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -44,7 +45,7 @@ namespace __unique {
sentinel_for<_Iter> _Sent,
class _Proj = identity,
indirect_equivalence_relation<projected<_Iter, _Proj>> _Comp = ranges::equal_to>
- _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter>
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter>
operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
auto __ret = std::__unique<_RangeAlgPolicy>(
std::move(__first), std::move(__last), std::__make_projected(__comp, __proj));
@@ -56,7 +57,7 @@ namespace __unique {
class _Proj = identity,
indirect_equivalence_relation<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::equal_to>
requires permutable<iterator_t<_Range>>
- _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range>
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range>
operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
auto __ret = std::__unique<_RangeAlgPolicy>(
ranges::begin(__range), ranges::end(__range), std::__make_projected(__comp, __proj));
@@ -73,6 +74,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_UNIQUE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique_copy.h
index 8c0b970d04..3ad47b06f5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique_copy.h
@@ -27,12 +27,13 @@
#include <__ranges/dangling.h>
#include <__utility/forward.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -110,6 +111,6 @@ inline constexpr auto unique_copy = __unique_copy::__fn{};
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_UNIQUE_COPY_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_upper_bound.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_upper_bound.h
index 3c63249248..a134080904 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_upper_bound.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_upper_bound.h
@@ -25,7 +25,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -34,7 +34,7 @@ namespace __upper_bound {
struct __fn {
template <forward_iterator _Iter, sentinel_for<_Iter> _Sent, class _Type, class _Proj = identity,
indirect_strict_weak_order<const _Type*, projected<_Iter, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
_Iter operator()(_Iter __first, _Sent __last, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const {
auto __comp_lhs_rhs_swapped = [&](const auto& __lhs, const auto& __rhs) {
return !std::invoke(__comp, __rhs, __lhs);
@@ -45,7 +45,7 @@ struct __fn {
template <forward_range _Range, class _Type, class _Proj = identity,
indirect_strict_weak_order<const _Type*, projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
- _LIBCPP_HIDE_FROM_ABI constexpr
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
borrowed_iterator_t<_Range> operator()(_Range&& __r,
const _Type& __value,
_Comp __comp = {},
@@ -70,6 +70,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_UPPER_BOUND_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove.h
index 8a7e99ba09..533e41b54f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{
__first = _VSTD::find(__first, __last, __value);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_copy.h
index 55fc1d90a1..ecba08a053 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_copy.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
remove_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __value)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_copy_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_copy_if.h
index 36ddba4883..2f235fd32f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_copy_if.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_copy_if.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
remove_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_if.h
index 0ae131498d..27350728d2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_if.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_if.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
{
__first = _VSTD::find_if<_ForwardIterator, _Predicate&>(__first, __last, __pred);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace.h
index d0ae8f65d4..ce6215066f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
replace(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value, const _Tp& __new_value)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_copy.h
index 7c8a5a0b93..bebb14cbe2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_copy.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
replace_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result,
const _Tp& __old_value, const _Tp& __new_value)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_copy_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_copy_if.h
index 9d8a68fdc0..e1ddb527be 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_copy_if.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_copy_if.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _Predicate, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
replace_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result,
_Predicate __pred, const _Tp& __new_value)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_if.h
index 37c719a34c..b3a3367d22 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_if.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/replace_if.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Predicate, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
replace_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, const _Tp& __new_value)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse.h
index 6484c73752..aa76951707 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _BidirectionalIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
__reverse_impl(_BidirectionalIterator __first, _BidirectionalIterator __last, bidirectional_iterator_tag)
{
@@ -36,7 +36,7 @@ __reverse_impl(_BidirectionalIterator __first, _BidirectionalIterator __last, bi
}
template <class _AlgPolicy, class _RandomAccessIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
__reverse_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag)
{
@@ -46,14 +46,14 @@ __reverse_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, rand
}
template <class _AlgPolicy, class _BidirectionalIterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __reverse(_BidirectionalIterator __first, _Sentinel __last) {
using _IterCategory = typename _IterOps<_AlgPolicy>::template __iterator_category<_BidirectionalIterator>;
std::__reverse_impl<_AlgPolicy>(std::move(__first), std::move(__last), _IterCategory());
}
template <class _BidirectionalIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse_copy.h
index 1583907078..f4a0e9713d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse_copy.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _BidirectionalIterator, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate.h
index beb5409d5b..32682936e3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate.h
@@ -26,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
__rotate_left(_ForwardIterator __first, _ForwardIterator __last)
{
typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
@@ -40,7 +40,7 @@ __rotate_left(_ForwardIterator __first, _ForwardIterator __last)
}
template <class _AlgPolicy, class _BidirectionalIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _BidirectionalIterator
__rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last)
{
typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
@@ -54,7 +54,7 @@ __rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last)
}
template <class _AlgPolicy, class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX14 _ForwardIterator
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _ForwardIterator
__rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last)
{
_ForwardIterator __i = __middle;
@@ -90,7 +90,7 @@ __rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIt
template<typename _Integral>
inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX14 _Integral
+_LIBCPP_CONSTEXPR_SINCE_CXX17 _Integral
__algo_gcd(_Integral __x, _Integral __y)
{
do
@@ -103,7 +103,7 @@ __algo_gcd(_Integral __x, _Integral __y)
}
template <class _AlgPolicy, typename _RandomAccessIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX14 _RandomAccessIterator
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _RandomAccessIterator
__rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
@@ -140,7 +140,7 @@ __rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran
template <class _AlgPolicy, class _ForwardIterator>
inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
__rotate_impl(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last,
_VSTD::forward_iterator_tag)
{
@@ -155,7 +155,7 @@ __rotate_impl(_ForwardIterator __first, _ForwardIterator __middle, _ForwardItera
template <class _AlgPolicy, class _BidirectionalIterator>
inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _BidirectionalIterator
__rotate_impl(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last,
bidirectional_iterator_tag)
{
@@ -172,7 +172,7 @@ __rotate_impl(_BidirectionalIterator __first, _BidirectionalIterator __middle, _
template <class _AlgPolicy, class _RandomAccessIterator>
inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator
__rotate_impl(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last,
random_access_iterator_tag)
{
@@ -189,7 +189,7 @@ __rotate_impl(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ra
}
template <class _AlgPolicy, class _Iterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iterator, _Iterator>
__rotate(_Iterator __first, _Iterator __middle, _Sentinel __last) {
using _Ret = pair<_Iterator, _Iterator>;
@@ -209,7 +209,7 @@ __rotate(_Iterator __first, _Iterator __middle, _Sentinel __last) {
template <class _ForwardIterator>
inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last)
{
return std::__rotate<_ClassicAlgPolicy>(
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate_copy.h
index ab569ef7c6..c154649ab9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate_copy.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h
index 4ead6cac82..93771be39e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h
@@ -33,7 +33,7 @@ template <class _AlgPolicy,
class _Pred,
class _Proj1,
class _Proj2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter1, _Iter1> __search_forward_impl(_Iter1 __first1, _Sent1 __last1,
_Iter2 __first2, _Sent2 __last2,
_Pred& __pred,
@@ -80,7 +80,7 @@ template <class _AlgPolicy,
class _Proj2,
class _DiffT1,
class _DiffT2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter1, _Iter1> __search_random_access_impl(_Iter1 __first1, _Sent1 __last1,
_Iter2 __first2, _Sent2 __last2,
_Pred& __pred,
@@ -120,7 +120,7 @@ template <class _Iter1, class _Sent1,
class _Pred,
class _Proj1,
class _Proj2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter1, _Iter1> __search_impl(_Iter1 __first1, _Sent1 __last1,
_Iter2 __first2, _Sent2 __last2,
_Pred& __pred,
@@ -152,7 +152,7 @@ template <class _Iter1, class _Sent1,
class _Pred,
class _Proj1,
class _Proj2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter1, _Iter1> __search_impl(_Iter1 __first1, _Sent1 __last1,
_Iter2 __first2, _Sent2 __last2,
_Pred& __pred,
@@ -170,7 +170,7 @@ pair<_Iter1, _Iter1> __search_impl(_Iter1 __first1, _Sent1 __last1,
}
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2, _ForwardIterator2 __last2,
_BinaryPredicate __pred) {
@@ -181,17 +181,15 @@ _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
}
template <class _ForwardIterator1, class _ForwardIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2, _ForwardIterator2 __last2) {
- using __v1 = typename iterator_traits<_ForwardIterator1>::value_type;
- using __v2 = typename iterator_traits<_ForwardIterator2>::value_type;
- return std::search(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>());
+ return std::search(__first1, __last1, __first2, __last2, __equal_to());
}
#if _LIBCPP_STD_VER > 14
template <class _ForwardIterator, class _Searcher>
-_LIBCPP_NODISCARD_EXT _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCPP_NODISCARD_EXT _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher& __s) {
return __s(__f, __l).first;
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/search_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/search_n.h
index ccb8e845f5..60a0735651 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/search_n.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/search_n.h
@@ -19,6 +19,7 @@
#include <__iterator/distance.h>
#include <__iterator/iterator_traits.h>
#include <__ranges/concepts.h>
+#include <__utility/convert_to_integral.h>
#include <__utility/pair.h>
#include <type_traits> // __convert_to_integral
@@ -29,7 +30,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Pred, class _Iter, class _Sent, class _SizeT, class _Type, class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter, _Iter> __search_n_forward_impl(_Iter __first, _Sent __last,
_SizeT __count,
const _Type& __value,
@@ -71,7 +72,7 @@ pair<_Iter, _Iter> __search_n_forward_impl(_Iter __first, _Sent __last,
}
template <class _AlgPolicy, class _Pred, class _Iter, class _Sent, class _SizeT, class _Type, class _Proj, class _DiffT>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
std::pair<_Iter, _Iter> __search_n_random_access_impl(_Iter __first, _Sent __last,
_SizeT __count,
const _Type& __value,
@@ -122,7 +123,7 @@ template <class _Iter, class _Sent,
class _Type,
class _Pred,
class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter, _Iter> __search_n_impl(_Iter __first, _Sent __last,
_DiffT __count,
const _Type& __value,
@@ -142,7 +143,7 @@ template <class _Iter1, class _Sent1,
class _Type,
class _Pred,
class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter1, _Iter1> __search_n_impl(_Iter1 __first, _Sent1 __last,
_DiffT __count,
const _Type& __value,
@@ -158,7 +159,7 @@ pair<_Iter1, _Iter1> __search_n_impl(_Iter1 __first, _Sent1 __last,
}
template <class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last,
_Size __count,
const _Tp& __value,
@@ -170,10 +171,9 @@ _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last,
}
template <class _ForwardIterator, class _Size, class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last, _Size __count, const _Tp& __value) {
- typedef typename iterator_traits<_ForwardIterator>::value_type __v;
- return std::search_n(__first, __last, std::__convert_to_integral(__count), __value, __equal_to<__v, _Tp>());
+ return std::search_n(__first, __last, std::__convert_to_integral(__count), __value, __equal_to());
}
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_difference.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_difference.h
index 4378bd5304..e0385bf822 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_difference.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_difference.h
@@ -27,7 +27,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template < class _Comp, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<__uncvref_t<_InIter1>, __uncvref_t<_OutIter> >
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<__remove_cvref_t<_InIter1>, __remove_cvref_t<_OutIter> >
__set_difference(
_InIter1&& __first1, _Sent1&& __last1, _InIter2&& __first2, _Sent2&& __last2, _OutIter&& __result, _Comp&& __comp) {
while (__first1 != __last1 && __first2 != __last2) {
@@ -46,19 +46,19 @@ __set_difference(
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_difference(
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_difference(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
_InputIterator2 __last2,
_OutputIterator __result,
_Compare __comp) {
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
- return std::__set_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp).second;
+ return std::__set_difference<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __result, __comp)
+ .second;
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_difference(
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_difference(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_intersection.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_intersection.h
index 77cc83738d..9fa7799aee 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_intersection.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_intersection.h
@@ -30,13 +30,13 @@ struct __set_intersection_result {
_OutIter __out_;
// need a constructor as C++03 aggregate init is hard
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
__set_intersection_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
: __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
};
template <class _AlgPolicy, class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 __set_intersection_result<_InIter1, _InIter2, _OutIter>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __set_intersection_result<_InIter1, _InIter2, _OutIter>
__set_intersection(
_InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
while (__first1 != __last1 && __first2 != __last2) {
@@ -59,15 +59,14 @@ __set_intersection(
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_intersection(
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_intersection(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
_InputIterator2 __last2,
_OutputIterator __result,
_Compare __comp) {
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
- return std::__set_intersection<_ClassicAlgPolicy, _Comp_ref>(
+ return std::__set_intersection<_ClassicAlgPolicy, __comp_ref_type<_Compare> >(
std::move(__first1),
std::move(__last1),
std::move(__first2),
@@ -78,7 +77,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_i
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_intersection(
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_intersection(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_symmetric_difference.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_symmetric_difference.h
index cd532ab580..97d3f1da7c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_symmetric_difference.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_symmetric_difference.h
@@ -15,6 +15,7 @@
#include <__config>
#include <__iterator/iterator_traits.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -29,13 +30,13 @@ struct __set_symmetric_difference_result {
_OutIter __out_;
// need a constructor as C++03 aggregate init is hard
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
__set_symmetric_difference_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
: __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
};
template <class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 __set_symmetric_difference_result<_InIter1, _InIter2, _OutIter>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __set_symmetric_difference_result<_InIter1, _InIter2, _OutIter>
__set_symmetric_difference(
_InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
while (__first1 != __last1) {
@@ -64,15 +65,14 @@ __set_symmetric_difference(
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_symmetric_difference(
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_symmetric_difference(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
_InputIterator2 __last2,
_OutputIterator __result,
_Compare __comp) {
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
- return std::__set_symmetric_difference<_Comp_ref>(
+ return std::__set_symmetric_difference<__comp_ref_type<_Compare> >(
std::move(__first1),
std::move(__last1),
std::move(__first2),
@@ -83,7 +83,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_symmetri
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_symmetric_difference(
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_symmetric_difference(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_union.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_union.h
index 3bd4379801..addc77b7d8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_union.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_union.h
@@ -15,6 +15,7 @@
#include <__config>
#include <__iterator/iterator_traits.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -29,13 +30,13 @@ struct __set_union_result {
_OutIter __out_;
// need a constructor as C++03 aggregate init is hard
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
__set_union_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
: __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
};
template <class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 __set_union_result<_InIter1, _InIter2, _OutIter> __set_union(
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __set_union_result<_InIter1, _InIter2, _OutIter> __set_union(
_InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
for (; __first1 != __last1; ++__result) {
if (__first2 == __last2) {
@@ -60,15 +61,14 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 __set_union_result<_InIter1,
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_union(
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_union(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
_InputIterator2 __last2,
_OutputIterator __result,
_Compare __comp) {
- typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
- return std::__set_union<_Comp_ref>(
+ return std::__set_union<__comp_ref_type<_Compare> >(
std::move(__first1),
std::move(__last1),
std::move(__first2),
@@ -79,7 +79,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_union(
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_union(
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_union(
_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/shuffle.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/shuffle.h
index e32c6a7608..c2f5c37efa 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/shuffle.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/shuffle.h
@@ -31,9 +31,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD
class _LIBCPP_TYPE_VIS __libcpp_debug_randomizer {
public:
__libcpp_debug_randomizer() {
- __state = __seed();
- __inc = __state + 0xda3e39cb94b95bdbULL;
- __inc = (__inc << 1) | 1;
+ __state_ = __seed();
+ __inc_ = __state_ + 0xda3e39cb94b95bdbULL;
+ __inc_ = (__inc_ << 1) | 1;
}
typedef uint_fast32_t result_type;
@@ -41,8 +41,8 @@ public:
static const result_type _Max = 0xFFFFFFFF;
_LIBCPP_HIDE_FROM_ABI result_type operator()() {
- uint_fast64_t __oldstate = __state;
- __state = __oldstate * 6364136223846793005ULL + __inc;
+ uint_fast64_t __oldstate = __state_;
+ __state_ = __oldstate * 6364136223846793005ULL + __inc_;
return __oldstate >> 32;
}
@@ -50,8 +50,8 @@ public:
static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR result_type max() { return _Max; }
private:
- uint_fast64_t __state;
- uint_fast64_t __inc;
+ uint_fast64_t __state_;
+ uint_fast64_t __inc_;
_LIBCPP_HIDE_FROM_ABI static uint_fast64_t __seed() {
#ifdef _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY_SEED
return _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY_SEED;
@@ -93,7 +93,7 @@ public:
_LIBCPP_FUNC_VIS __rs_default __rs_get();
template <class _RandomAccessIterator>
-_LIBCPP_DEPRECATED_IN_CXX14 void
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
@@ -114,7 +114,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
}
template <class _RandomAccessIterator, class _RandomNumberGenerator>
-_LIBCPP_DEPRECATED_IN_CXX14 void
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
#ifndef _LIBCPP_CXX03_LANG
_RandomNumberGenerator&& __rand)
@@ -137,7 +137,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
#endif
template <class _AlgPolicy, class _RandomAccessIterator, class _Sentinel, class _UniformRandomNumberGenerator>
-_RandomAccessIterator __shuffle(
+_LIBCPP_HIDE_FROM_ABI _RandomAccessIterator __shuffle(
_RandomAccessIterator __first, _Sentinel __last_sentinel, _UniformRandomNumberGenerator&& __g) {
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
typedef uniform_int_distribution<ptrdiff_t> _Dp;
@@ -161,8 +161,8 @@ _RandomAccessIterator __shuffle(
}
template <class _RandomAccessIterator, class _UniformRandomNumberGenerator>
-void shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
- _UniformRandomNumberGenerator&& __g) {
+_LIBCPP_HIDE_FROM_ABI void
+shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, _UniformRandomNumberGenerator&& __g) {
(void)std::__shuffle<_ClassicAlgPolicy>(
std::move(__first), std::move(__last), std::forward<_UniformRandomNumberGenerator>(__g));
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h
index 06811239f8..e3972fb6f4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 void
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
__sift_down(_RandomAccessIterator __first, _Compare&& __comp,
typename iterator_traits<_RandomAccessIterator>::difference_type __len,
_RandomAccessIterator __start)
@@ -78,7 +78,7 @@ __sift_down(_RandomAccessIterator __first, _Compare&& __comp,
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator
__floyd_sift_down(_RandomAccessIterator __first, _Compare&& __comp,
typename iterator_traits<_RandomAccessIterator>::difference_type __len)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort.h
index 1ca2f1b817..81f6eeb238 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort.h
@@ -22,8 +22,10 @@
#include <__functional/operations.h>
#include <__functional/ranges_operations.h>
#include <__iterator/iterator_traits.h>
+#include <__memory/destruct_n.h>
+#include <__memory/unique_ptr.h>
+#include <__utility/move.h>
#include <climits>
-#include <memory>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -43,7 +45,7 @@ struct _WrapAlgPolicy {
using _Comp = _CompT;
_Comp& __comp;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
_WrapAlgPolicy(_Comp& __c) : __comp(__c) {}
};
@@ -62,7 +64,7 @@ struct _UnwrapAlgPolicy {
using _AlgPolicy = _ClassicAlgPolicy;
using _Comp = _CompT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 static
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static
_Comp __get_comp(_Comp __comp) { return __comp; }
};
@@ -73,14 +75,15 @@ struct _UnwrapAlgPolicy<_WrapAlgPolicy<_Ts...> > {
using _AlgPolicy = typename _Wrapped::_AlgPolicy;
using _Comp = typename _Wrapped::_Comp;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 static
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static
_Comp __get_comp(_Wrapped& __w) { return __w.__comp; }
};
// stable, 2-3 compares, 0-2 swaps
template <class _AlgPolicy, class _Compare, class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 unsigned __sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z,
+_LIBCPP_HIDE_FROM_ABI
+_LIBCPP_CONSTEXPR_SINCE_CXX14 unsigned __sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z,
_Compare __c) {
using _Ops = _IterOps<_AlgPolicy>;
@@ -118,6 +121,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX11 unsigned __sort3(_ForwardIterator __x, _ForwardIte
// stable, 3-6 compares, 0-5 swaps
template <class _AlgPolicy, class _Compare, class _ForwardIterator>
+_LIBCPP_HIDE_FROM_ABI
unsigned __sort4(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3, _ForwardIterator __x4,
_Compare __c) {
using _Ops = _IterOps<_AlgPolicy>;
@@ -171,7 +175,7 @@ _LIBCPP_HIDDEN unsigned __sort5(_ForwardIterator __x1, _ForwardIterator __x2, _F
}
template <class _AlgPolicy, class _Compare, class _ForwardIterator>
-_LIBCPP_HIDDEN unsigned __sort5_wrap_policy(
+_LIBCPP_HIDE_FROM_ABI unsigned __sort5_wrap_policy(
_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3, _ForwardIterator __x4, _ForwardIterator __x5,
_Compare __c) {
using _WrappedComp = typename _WrapAlgPolicy<_AlgPolicy, _Compare>::type;
@@ -231,8 +235,8 @@ template <class, class _Compare, class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
__sort3_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3,
_Compare __c) {
- _VSTD::__cond_swap<_Compare>(__x2, __x3, __c);
- _VSTD::__partially_sorted_swap<_Compare>(__x1, __x2, __x3, __c);
+ std::__cond_swap<_Compare>(__x2, __x3, __c);
+ std::__partially_sorted_swap<_Compare>(__x1, __x2, __x3, __c);
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
@@ -246,11 +250,11 @@ template <class, class _Compare, class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
__sort4_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3,
_RandomAccessIterator __x4, _Compare __c) {
- _VSTD::__cond_swap<_Compare>(__x1, __x3, __c);
- _VSTD::__cond_swap<_Compare>(__x2, __x4, __c);
- _VSTD::__cond_swap<_Compare>(__x1, __x2, __c);
- _VSTD::__cond_swap<_Compare>(__x3, __x4, __c);
- _VSTD::__cond_swap<_Compare>(__x2, __x3, __c);
+ std::__cond_swap<_Compare>(__x1, __x3, __c);
+ std::__cond_swap<_Compare>(__x2, __x4, __c);
+ std::__cond_swap<_Compare>(__x1, __x2, __c);
+ std::__cond_swap<_Compare>(__x3, __x4, __c);
+ std::__cond_swap<_Compare>(__x2, __x3, __c);
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
@@ -264,12 +268,12 @@ template <class, class _Compare, class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
__sort5_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3,
_RandomAccessIterator __x4, _RandomAccessIterator __x5, _Compare __c) {
- _VSTD::__cond_swap<_Compare>(__x1, __x2, __c);
- _VSTD::__cond_swap<_Compare>(__x4, __x5, __c);
- _VSTD::__partially_sorted_swap<_Compare>(__x3, __x4, __x5, __c);
- _VSTD::__cond_swap<_Compare>(__x2, __x5, __c);
- _VSTD::__partially_sorted_swap<_Compare>(__x1, __x3, __x4, __c);
- _VSTD::__partially_sorted_swap<_Compare>(__x2, __x3, __x4, __c);
+ std::__cond_swap<_Compare>(__x1, __x2, __c);
+ std::__cond_swap<_Compare>(__x4, __x5, __c);
+ std::__partially_sorted_swap<_Compare>(__x3, __x4, __x5, __c);
+ std::__cond_swap<_Compare>(__x2, __x5, __c);
+ std::__partially_sorted_swap<_Compare>(__x1, __x3, __x4, __c);
+ std::__partially_sorted_swap<_Compare>(__x2, __x3, __x4, __c);
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
@@ -281,7 +285,8 @@ __sort5_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2,
// Assumes size > 0
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 void __selection_sort(_BidirectionalIterator __first, _BidirectionalIterator __last,
+_LIBCPP_HIDE_FROM_ABI
+_LIBCPP_CONSTEXPR_SINCE_CXX14 void __selection_sort(_BidirectionalIterator __first, _BidirectionalIterator __last,
_Compare __comp) {
_BidirectionalIterator __lm1 = __last;
for (--__lm1; __first != __lm1; ++__first) {
@@ -292,6 +297,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX11 void __selection_sort(_BidirectionalIterator __fir
}
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
+_LIBCPP_HIDE_FROM_ABI
void __insertion_sort(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) {
using _Ops = _IterOps<_AlgPolicy>;
@@ -303,12 +309,13 @@ void __insertion_sort(_BidirectionalIterator __first, _BidirectionalIterator __l
value_type __t(_Ops::__iter_move(__j));
for (_BidirectionalIterator __k = __i; __k != __first && __comp(__t, *--__k); --__j)
*__j = _Ops::__iter_move(__k);
- *__j = _VSTD::move(__t);
+ *__j = std::move(__t);
}
}
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
+_LIBCPP_HIDE_FROM_ABI
void __insertion_sort_3(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
using _Ops = _IterOps<_AlgPolicy>;
@@ -325,14 +332,14 @@ void __insertion_sort_3(_RandomAccessIterator __first, _RandomAccessIterator __l
*__j = _Ops::__iter_move(__k);
__j = __k;
} while (__j != __first && __comp(__t, *--__k));
- *__j = _VSTD::move(__t);
+ *__j = std::move(__t);
}
__j = __i;
}
}
template <class _WrappedComp, class _RandomAccessIterator>
-bool __insertion_sort_incomplete(
+_LIBCPP_HIDDEN bool __insertion_sort_incomplete(
_RandomAccessIterator __first, _RandomAccessIterator __last, _WrappedComp __wrapped_comp) {
using _Unwrap = _UnwrapAlgPolicy<_WrappedComp>;
using _AlgPolicy = typename _Unwrap::_AlgPolicy;
@@ -377,7 +384,7 @@ bool __insertion_sort_incomplete(
*__j = _Ops::__iter_move(__k);
__j = __k;
} while (__j != __first && __comp(__t, *--__k));
- *__j = _VSTD::move(__t);
+ *__j = std::move(__t);
if (++__count == __limit)
return ++__i == __last;
}
@@ -387,6 +394,7 @@ bool __insertion_sort_incomplete(
}
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
+_LIBCPP_HIDE_FROM_ABI
void __insertion_sort_move(_BidirectionalIterator __first1, _BidirectionalIterator __last1,
typename iterator_traits<_BidirectionalIterator>::value_type* __first2, _Compare __comp) {
using _Ops = _IterOps<_AlgPolicy>;
@@ -526,7 +534,7 @@ void __introsort(_RandomAccessIterator __first, _RandomAccessIterator __last, _C
}
// [__first, __i) == *__first and *__first < [__i, __last)
// The first part is sorted, sort the second part
- // _VSTD::__sort<_Compare>(__i, __last, __comp);
+ // std::__sort<_Compare>(__i, __last, __comp);
__first = __i;
goto __restart;
}
@@ -616,7 +624,7 @@ inline _LIBCPP_HIDE_FROM_ABI _Number __log2i(_Number __n) {
}
template <class _WrappedComp, class _RandomAccessIterator>
-void __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _WrappedComp __wrapped_comp) {
+_LIBCPP_HIDDEN void __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _WrappedComp __wrapped_comp) {
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
difference_type __depth_limit = 2 * __log2i(__last - __first);
@@ -672,11 +680,11 @@ extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<long do
extern template _LIBCPP_FUNC_VIS unsigned __sort5<__less<long double>&, long double*>(long double*, long double*, long double*, long double*, long double*, __less<long double>&);
template <class _AlgPolicy, class _RandomAccessIterator, class _Comp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) {
std::__debug_randomize_range<_AlgPolicy>(__first, __last);
- using _Comp_ref = typename __comp_ref_type<_Comp>::type;
+ using _Comp_ref = __comp_ref_type<_Comp>;
if (__libcpp_is_constant_evaluated()) {
std::__partial_sort<_AlgPolicy>(__first, __last, __last, __comp);
@@ -689,13 +697,13 @@ void __sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, _C
}
template <class _RandomAccessIterator, class _Comp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) {
std::__sort_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
}
template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void sort(_RandomAccessIterator __first, _RandomAccessIterator __last) {
std::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort_heap.h
index 7713b766f9..8249407b55 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort_heap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort_heap.h
@@ -25,10 +25,9 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp) {
- using _CompRef = typename __comp_ref_type<_Compare>::type;
- _CompRef __comp_ref = __comp;
+ __comp_ref_type<_Compare> __comp_ref = __comp;
using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type;
for (difference_type __n = __last - __first; __n > 1; --__last, (void) --__n)
@@ -36,7 +35,7 @@ void __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _C
}
template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");
@@ -45,7 +44,7 @@ void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Com
}
template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
std::sort_heap(std::move(__first), std::move(__last),
__less<typename iterator_traits<_RandomAccessIterator>::value_type>());
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_partition.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_partition.h
index c7aa3f07a8..a49de6dbb0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_partition.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_partition.h
@@ -15,7 +15,12 @@
#include <__iterator/advance.h>
#include <__iterator/distance.h>
#include <__iterator/iterator_traits.h>
-#include <memory>
+#include <__memory/destruct_n.h>
+#include <__memory/temporary_buffer.h>
+#include <__memory/unique_ptr.h>
+#include <__utility/move.h>
+#include <__utility/pair.h>
+#include <new>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -25,7 +30,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Predicate, class _ForwardIterator, class _Distance, class _Pair>
-_ForwardIterator
+_LIBCPP_HIDE_FROM_ABI _ForwardIterator
__stable_partition_impl(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred,
_Distance __len, _Pair __p, forward_iterator_tag __fit)
{
@@ -114,7 +119,7 @@ __second_half_done:
}
template <class _AlgPolicy, class _Predicate, class _ForwardIterator>
-_ForwardIterator
+_LIBCPP_HIDE_FROM_ABI _ForwardIterator
__stable_partition_impl(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred,
forward_iterator_tag)
{
@@ -259,7 +264,7 @@ __second_half_done:
}
template <class _AlgPolicy, class _Predicate, class _BidirectionalIterator>
-_BidirectionalIterator
+_LIBCPP_HIDE_FROM_ABI _BidirectionalIterator
__stable_partition_impl(_BidirectionalIterator __first, _BidirectionalIterator __last, _Predicate __pred,
bidirectional_iterator_tag)
{
@@ -305,7 +310,7 @@ template <class _AlgPolicy, class _Predicate, class _ForwardIterator, class _Ite
_LIBCPP_HIDE_FROM_ABI
_ForwardIterator __stable_partition(
_ForwardIterator __first, _ForwardIterator __last, _Predicate&& __pred, _IterCategory __iter_category) {
- return std::__stable_partition_impl<_AlgPolicy, __uncvref_t<_Predicate>&>(
+ return std::__stable_partition_impl<_AlgPolicy, __remove_cvref_t<_Predicate>&>(
std::move(__first), std::move(__last), __pred, __iter_category);
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_sort.h
index fb149eeb65..8e70978ab6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_sort.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_sort.h
@@ -16,8 +16,12 @@
#include <__algorithm/sort.h>
#include <__config>
#include <__iterator/iterator_traits.h>
+#include <__memory/destruct_n.h>
+#include <__memory/temporary_buffer.h>
+#include <__memory/unique_ptr.h>
#include <__utility/move.h>
-#include <memory>
+#include <__utility/pair.h>
+#include <new>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -27,7 +31,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _InputIterator1, class _InputIterator2>
-void
+_LIBCPP_HIDE_FROM_ABI void
__merge_move_construct(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
typename iterator_traits<_InputIterator1>::value_type* __result, _Compare __comp)
@@ -69,7 +73,7 @@ __merge_move_construct(_InputIterator1 __first1, _InputIterator1 __last1,
}
template <class _AlgPolicy, class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator>
-void
+_LIBCPP_HIDE_FROM_ABI void
__merge_move_assign(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result, _Compare __comp)
@@ -223,8 +227,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
__h.reset(__buf.first);
}
- using _Comp_ref = typename __comp_ref_type<_Compare>::type;
- std::__stable_sort<_AlgPolicy, _Comp_ref>(__first, __last, __comp, __len, __buf.first, __buf.second);
+ std::__stable_sort<_AlgPolicy, __comp_ref_type<_Compare> >(__first, __last, __comp, __len, __buf.first, __buf.second);
}
template <class _RandomAccessIterator, class _Compare>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/swap_ranges.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/swap_ranges.h
index 0cff519a8d..5ce5ed8c88 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/swap_ranges.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/swap_ranges.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// 2+2 iterators: the shorter size will be used.
template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2, class _Sentinel2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
pair<_ForwardIterator1, _ForwardIterator2>
__swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2, _Sentinel2 __last2) {
while (__first1 != __last1 && __first2 != __last2) {
@@ -36,7 +36,7 @@ __swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2
// 2+1 iterators: size2 >= size1.
template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
pair<_ForwardIterator1, _ForwardIterator2>
__swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2) {
while (__first1 != __last1) {
@@ -49,7 +49,7 @@ __swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2
}
template <class _ForwardIterator1, class _ForwardIterator2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator2
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator2
swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) {
return std::__swap_ranges<_ClassicAlgPolicy>(
std::move(__first1), std::move(__last1), std::move(__first2)).second;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/transform.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/transform.h
index f9db806f5b..4722c154cf 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/transform.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/transform.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _UnaryOperation>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
transform(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _UnaryOperation __op)
{
@@ -28,7 +28,7 @@ transform(_InputIterator __first, _InputIterator __last, _OutputIterator __resul
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _BinaryOperation>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
transform(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2,
_OutputIterator __result, _BinaryOperation __binary_op)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h
index 04a67752dd..1e86074b3d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h
@@ -36,21 +36,21 @@ template <class _Gen>
class _ClassicGenAdaptor {
private:
// The generator is not required to be copyable or movable, so it has to be stored as a reference.
- _Gen& __gen;
+ _Gen& __gen_;
public:
using result_type = invoke_result_t<_Gen&>;
_LIBCPP_HIDE_FROM_ABI
- static constexpr auto min() { return __uncvref_t<_Gen>::min(); }
+ static constexpr auto min() { return __remove_cvref_t<_Gen>::min(); }
_LIBCPP_HIDE_FROM_ABI
- static constexpr auto max() { return __uncvref_t<_Gen>::max(); }
+ static constexpr auto max() { return __remove_cvref_t<_Gen>::max(); }
_LIBCPP_HIDE_FROM_ABI
- constexpr explicit _ClassicGenAdaptor(_Gen& __g) : __gen(__g) {}
+ constexpr explicit _ClassicGenAdaptor(_Gen& __g) : __gen_(__g) {}
_LIBCPP_HIDE_FROM_ABI
- constexpr auto operator()() const { return __gen(); }
+ constexpr auto operator()() const { return __gen_(); }
};
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique.h
index 1727225a91..1717a00c8a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique.h
@@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// unique
template <class _AlgPolicy, class _Iter, class _Sent, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 std::pair<_Iter, _Iter>
+_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 std::pair<_Iter, _Iter>
__unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
__first = std::__adjacent_find(__first, __last, __pred);
if (__first != __last) {
@@ -43,16 +43,15 @@ __unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
}
template <class _ForwardIterator, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
unique(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) {
return std::__unique<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __pred).first;
}
template <class _ForwardIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
unique(_ForwardIterator __first, _ForwardIterator __last) {
- typedef typename iterator_traits<_ForwardIterator>::value_type __v;
- return std::unique(__first, __last, __equal_to<__v>());
+ return std::unique(__first, __last, __equal_to());
}
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique_copy.h
index c7c8d8e9d8..81fcd50f01 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique_copy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique_copy.h
@@ -34,7 +34,7 @@ struct __read_from_tmp_value_tag {};
} // namespace __unique_copy_tags
template <class _AlgPolicy, class _BinaryPredicate, class _InputIterator, class _Sent, class _OutputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _OutputIterator>
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _OutputIterator>
__unique_copy(_InputIterator __first,
_Sent __last,
_OutputIterator __result,
@@ -56,7 +56,7 @@ __unique_copy(_InputIterator __first,
}
template <class _AlgPolicy, class _BinaryPredicate, class _ForwardIterator, class _Sent, class _OutputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator, _OutputIterator>
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator, _OutputIterator>
__unique_copy(_ForwardIterator __first,
_Sent __last,
_OutputIterator __result,
@@ -78,7 +78,7 @@ __unique_copy(_ForwardIterator __first,
}
template <class _AlgPolicy, class _BinaryPredicate, class _InputIterator, class _Sent, class _InputAndOutputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _InputAndOutputIterator>
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _InputAndOutputIterator>
__unique_copy(_InputIterator __first,
_Sent __last,
_InputAndOutputIterator __result,
@@ -95,27 +95,26 @@ __unique_copy(_InputIterator __first,
}
template <class _InputIterator, class _OutputIterator, class _BinaryPredicate>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __pred) {
- using __algo_tag = typename conditional<
+ using __algo_tag = __conditional_t<
is_base_of<forward_iterator_tag, typename iterator_traits<_InputIterator>::iterator_category>::value,
__unique_copy_tags::__reread_from_input_tag,
- typename conditional<
+ __conditional_t<
is_base_of<forward_iterator_tag, typename iterator_traits<_OutputIterator>::iterator_category>::value &&
is_same< typename iterator_traits<_InputIterator>::value_type,
typename iterator_traits<_OutputIterator>::value_type>::value,
__unique_copy_tags::__reread_from_output_tag,
- __unique_copy_tags::__read_from_tmp_value_tag>::type >::type;
+ __unique_copy_tags::__read_from_tmp_value_tag> >;
return std::__unique_copy<_ClassicAlgPolicy>(
std::move(__first), std::move(__last), std::move(__result), __pred, __algo_tag())
.second;
}
template <class _InputIterator, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
- typedef typename iterator_traits<_InputIterator>::value_type __v;
- return std::unique_copy(std::move(__first), std::move(__last), std::move(__result), __equal_to<__v>());
+ return std::unique_copy(std::move(__first), std::move(__last), std::move(__result), __equal_to());
}
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_iter.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_iter.h
index fa9a8fbf2d..07d8d23e33 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_iter.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_iter.h
@@ -57,7 +57,7 @@ struct __unwrap_iter_impl<_Iter, true> {
template<class _Iter,
class _Impl = __unwrap_iter_impl<_Iter>,
__enable_if_t<is_copy_constructible<_Iter>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
decltype(_Impl::__unwrap(std::declval<_Iter>())) __unwrap_iter(_Iter __i) _NOEXCEPT {
return _Impl::__unwrap(__i);
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_range.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_range.h
index 745906a96e..2c5d23e69f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_range.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_range.h
@@ -28,7 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// __unwrap_iter and __rewrap_iter don't work for this, because they assume that the iterator and sentinel have
// the same type. __unwrap_range tries to get two iterators and then forward to __unwrap_iter.
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
template <class _Iter, class _Sent>
struct __unwrap_range_impl {
_LIBCPP_HIDE_FROM_ABI static constexpr auto __unwrap(_Iter __first, _Sent __sent)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/upper_bound.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/upper_bound.h
index 1045380bc8..96552ce1f8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/upper_bound.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/upper_bound.h
@@ -28,7 +28,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _Iter, class _Sent, class _Tp, class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter
__upper_bound(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp, _Proj&& __proj) {
auto __len = _IterOps<_AlgPolicy>::distance(__first, __last);
while (__len != 0) {
@@ -45,7 +45,7 @@ __upper_bound(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp
}
template <class _ForwardIterator, class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
static_assert(is_copy_constructible<_ForwardIterator>::value,
"Iterator has to be copy constructible");
@@ -54,7 +54,7 @@ upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu
}
template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
return std::upper_bound(
std::move(__first),
diff --git a/contrib/libs/cxxsupp/libcxx/include/__assert b/contrib/libs/cxxsupp/libcxx/include/__assert
index e759a25cd4..5905d28c02 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__assert
+++ b/contrib/libs/cxxsupp/libcxx/include/__assert
@@ -17,13 +17,9 @@
# pragma GCC system_header
#endif
-// This is for backwards compatibility with code that might have been enabling
-// assertions through the Debug mode previously.
-// TODO: In LLVM 16, make it an error to define _LIBCPP_DEBUG
+// TODO: Remove in LLVM 17.
#if defined(_LIBCPP_DEBUG)
-# ifndef _LIBCPP_ENABLE_ASSERTIONS
-# define _LIBCPP_ENABLE_ASSERTIONS 1
-# endif
+# error "Defining _LIBCPP_DEBUG is not supported anymore. Please use _LIBCPP_ENABLE_DEBUG_MODE instead."
#endif
// Automatically enable assertions when the debug mode is enabled.
diff --git a/contrib/libs/cxxsupp/libcxx/include/__bit_reference b/contrib/libs/cxxsupp/libcxx/include/__bit_reference
index 5abeeb593c..e104a989fa 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__bit_reference
+++ b/contrib/libs/cxxsupp/libcxx/include/__bit_reference
@@ -54,15 +54,15 @@ class __bit_reference
friend class __bit_const_reference<_Cp>;
friend class __bit_iterator<_Cp, false>;
public:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__bit_reference(const __bit_reference&) = default;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 operator bool() const _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 operator bool() const _NOEXCEPT
{return static_cast<bool>(*__seg_ & __mask_);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool operator ~() const _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool operator ~() const _NOEXCEPT
{return !static_cast<bool>(*this);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__bit_reference& operator=(bool __x) _NOEXCEPT
{
if (__x)
@@ -82,15 +82,15 @@ public:
}
#endif
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__bit_reference& operator=(const __bit_reference& __x) _NOEXCEPT
{return operator=(static_cast<bool>(__x));}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void flip() _NOEXCEPT {*__seg_ ^= __mask_;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false> operator&() const _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 void flip() _NOEXCEPT {*__seg_ ^= __mask_;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, false> operator&() const _NOEXCEPT
{return __bit_iterator<_Cp, false>(__seg_, static_cast<unsigned>(__libcpp_ctz(__mask_)));}
private:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
explicit __bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
: __seg_(__s), __mask_(__m) {}
};
@@ -101,7 +101,7 @@ class __bit_reference<_Cp, false>
};
template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
swap(__bit_reference<_Cp> __x, __bit_reference<_Cp> __y) _NOEXCEPT
{
@@ -111,7 +111,7 @@ swap(__bit_reference<_Cp> __x, __bit_reference<_Cp> __y) _NOEXCEPT
}
template <class _Cp, class _Dp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT
{
@@ -121,7 +121,7 @@ swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT
}
template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT
{
@@ -131,7 +131,7 @@ swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT
}
template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
swap(bool& __x, __bit_reference<_Cp> __y) _NOEXCEPT
{
@@ -155,14 +155,14 @@ public:
_LIBCPP_INLINE_VISIBILITY
__bit_const_reference(const __bit_const_reference&) = default;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT
: __seg_(__x.__seg_), __mask_(__x.__mask_) {}
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR operator bool() const _NOEXCEPT
{return static_cast<bool>(*__seg_ & __mask_);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, true> operator&() const _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, true> operator&() const _NOEXCEPT
{return __bit_iterator<_Cp, true>(__seg_, static_cast<unsigned>(__libcpp_ctz(__mask_)));}
private:
_LIBCPP_INLINE_VISIBILITY
@@ -176,7 +176,7 @@ private:
// find
template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, _IsConst>
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, _IsConst>
__find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
{
typedef __bit_iterator<_Cp, _IsConst> _It;
@@ -212,7 +212,7 @@ __find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
}
template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, _IsConst>
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, _IsConst>
__find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
{
typedef __bit_iterator<_Cp, _IsConst> _It;
@@ -251,7 +251,7 @@ __find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
}
template <class _Cp, bool _IsConst, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__bit_iterator<_Cp, _IsConst>
find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value)
{
@@ -263,7 +263,7 @@ find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last
// count
template <class _Cp, bool _IsConst>
-typename __bit_iterator<_Cp, _IsConst>::difference_type
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 typename __bit_iterator<_Cp, _IsConst>::difference_type
__count_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
{
typedef __bit_iterator<_Cp, _IsConst> _It;
@@ -294,7 +294,7 @@ __count_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
}
template <class _Cp, bool _IsConst>
-typename __bit_iterator<_Cp, _IsConst>::difference_type
+_LIBCPP_HIDE_FROM_ABI typename __bit_iterator<_Cp, _IsConst>::difference_type
__count_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
{
typedef __bit_iterator<_Cp, _IsConst> _It;
@@ -337,7 +337,7 @@ count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __las
// fill_n
template <class _Cp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
__fill_n_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
{
typedef __bit_iterator<_Cp, false> _It;
@@ -367,7 +367,7 @@ __fill_n_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
}
template <class _Cp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
__fill_n_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
{
typedef __bit_iterator<_Cp, false> _It;
@@ -398,7 +398,7 @@ __fill_n_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
}
template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __value)
{
@@ -414,7 +414,7 @@ fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __v
// fill
template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
fill(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, bool __value)
{
@@ -424,8 +424,7 @@ fill(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, bool
// copy
template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-__bit_iterator<_Cp, false>
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
__copy_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
__bit_iterator<_Cp, false> __result)
{
@@ -472,8 +471,7 @@ __copy_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsCon
}
template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-__bit_iterator<_Cp, false>
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
__copy_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
__bit_iterator<_Cp, false> __result)
{
@@ -551,7 +549,7 @@ __copy_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsC
}
template <class _Cp, bool _IsConst>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__bit_iterator<_Cp, false>
copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result)
{
@@ -563,7 +561,7 @@ copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last
// copy_backward
template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false>
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
__copy_backward_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
__bit_iterator<_Cp, false> __result)
{
@@ -610,7 +608,7 @@ __copy_backward_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_C
}
template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false>
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
__copy_backward_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
__bit_iterator<_Cp, false> __result)
{
@@ -696,7 +694,7 @@ __copy_backward_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<
}
template <class _Cp, bool _IsConst>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__bit_iterator<_Cp, false>
copy_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result)
{
@@ -728,7 +726,7 @@ move_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsCons
// swap_ranges
template <class __C1, class __C2>
-__bit_iterator<__C2, false>
+_LIBCPP_HIDE_FROM_ABI __bit_iterator<__C2, false>
__swap_ranges_aligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1, false> __last,
__bit_iterator<__C2, false> __result)
{
@@ -778,7 +776,7 @@ __swap_ranges_aligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1,
}
template <class __C1, class __C2>
-__bit_iterator<__C2, false>
+_LIBCPP_HIDE_FROM_ABI __bit_iterator<__C2, false>
__swap_ranges_unaligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1, false> __last,
__bit_iterator<__C2, false> __result)
{
@@ -903,19 +901,19 @@ struct __bit_array
difference_type __size_;
__storage_type __word_[_Np];
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 static difference_type capacity()
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 static difference_type capacity()
{return static_cast<difference_type>(_Np * __bits_per_word);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit __bit_array(difference_type __s) : __size_(__s) {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __bit_array(difference_type __s) : __size_(__s) {
if (__libcpp_is_constant_evaluated()) {
for (size_t __i = 0; __i != __bit_array<_Cp>::_Np; ++__i)
std::__construct_at(__word_ + __i, 0);
}
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator begin()
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator begin()
{
return iterator(pointer_traits<__storage_pointer>::pointer_to(__word_[0]), 0);
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator end()
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator end()
{
return iterator(pointer_traits<__storage_pointer>::pointer_to(__word_[0]) + __size_ / __bits_per_word,
static_cast<unsigned>(__size_ % __bits_per_word));
@@ -923,7 +921,7 @@ struct __bit_array
};
template <class _Cp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false>
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle, __bit_iterator<_Cp, false> __last)
{
typedef __bit_iterator<_Cp, false> _I1;
@@ -974,7 +972,7 @@ rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle,
// equal
template <class _Cp, bool _IC1, bool _IC2>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool
__equal_unaligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1,
__bit_iterator<_Cp, _IC2> __first2)
{
@@ -1056,7 +1054,7 @@ __equal_unaligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1>
}
template <class _Cp, bool _IC1, bool _IC2>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool
__equal_aligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1,
__bit_iterator<_Cp, _IC2> __first2)
{
@@ -1099,7 +1097,7 @@ __equal_aligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __
}
template <class _Cp, bool _IC1, bool _IC2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
equal(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, __bit_iterator<_Cp, _IC2> __first2)
{
@@ -1117,23 +1115,23 @@ public:
typedef bool value_type;
typedef __bit_iterator pointer;
#ifndef _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
- typedef typename conditional<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> >::type reference;
+ typedef __conditional_t<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> > reference;
#else
- using reference = typename conditional<_IsConst, bool, __bit_reference<_Cp> >::type;
+ using reference = __conditional_t<_IsConst, bool, __bit_reference<_Cp> >;
#endif
typedef random_access_iterator_tag iterator_category;
private:
typedef typename _Cp::__storage_type __storage_type;
- typedef typename conditional<_IsConst, typename _Cp::__const_storage_pointer,
- typename _Cp::__storage_pointer>::type __storage_pointer;
+ typedef __conditional_t<_IsConst, typename _Cp::__const_storage_pointer, typename _Cp::__storage_pointer>
+ __storage_pointer;
static const unsigned __bits_per_word = _Cp::__bits_per_word;
__storage_pointer __seg_;
unsigned __ctz_;
public:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator() _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator() _NOEXCEPT
#if _LIBCPP_STD_VER > 11
: __seg_(nullptr), __ctz_(0)
#endif
@@ -1144,7 +1142,7 @@ public:
// When _IsConst=true, this is a converting constructor;
// the copy and move constructors are implicitly generated
// and trivial.
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__bit_iterator(const __bit_iterator<_Cp, false>& __it) _NOEXCEPT
: __seg_(__it.__seg_), __ctz_(__it.__ctz_) {}
@@ -1153,19 +1151,19 @@ public:
// the implicit generation of a defaulted one is deprecated.
// When _IsConst=true, the assignment operators are
// implicitly generated and trivial.
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__bit_iterator& operator=(const _If<_IsConst, struct __private_nat, __bit_iterator>& __it) {
__seg_ = __it.__seg_;
__ctz_ = __it.__ctz_;
return *this;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference operator*() const _NOEXCEPT {
- return typename conditional<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> >
- ::type(__seg_, __storage_type(1) << __ctz_);
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 reference operator*() const _NOEXCEPT {
+ return __conditional_t<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> >(
+ __seg_, __storage_type(1) << __ctz_);
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator++()
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator++()
{
if (__ctz_ != __bits_per_word-1)
++__ctz_;
@@ -1177,14 +1175,14 @@ public:
return *this;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator operator++(int)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator++(int)
{
__bit_iterator __tmp = *this;
++(*this);
return __tmp;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator--()
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator--()
{
if (__ctz_ != 0)
--__ctz_;
@@ -1196,14 +1194,14 @@ public:
return *this;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator operator--(int)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator--(int)
{
__bit_iterator __tmp = *this;
--(*this);
return __tmp;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator+=(difference_type __n)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator+=(difference_type __n)
{
if (__n >= 0)
__seg_ += (__n + __ctz_) / __bits_per_word;
@@ -1215,54 +1213,54 @@ public:
return *this;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator-=(difference_type __n)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator-=(difference_type __n)
{
return *this += -__n;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator operator+(difference_type __n) const
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator+(difference_type __n) const
{
__bit_iterator __t(*this);
__t += __n;
return __t;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator operator-(difference_type __n) const
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator-(difference_type __n) const
{
__bit_iterator __t(*this);
__t -= __n;
return __t;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
friend __bit_iterator operator+(difference_type __n, const __bit_iterator& __it) {return __it + __n;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
friend difference_type operator-(const __bit_iterator& __x, const __bit_iterator& __y)
{return (__x.__seg_ - __y.__seg_) * __bits_per_word + __x.__ctz_ - __y.__ctz_;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference operator[](difference_type __n) const {return *(*this + __n);}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 reference operator[](difference_type __n) const {return *(*this + __n);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator==(const __bit_iterator& __x, const __bit_iterator& __y)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool operator==(const __bit_iterator& __x, const __bit_iterator& __y)
{return __x.__seg_ == __y.__seg_ && __x.__ctz_ == __y.__ctz_;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator!=(const __bit_iterator& __x, const __bit_iterator& __y)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool operator!=(const __bit_iterator& __x, const __bit_iterator& __y)
{return !(__x == __y);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator<(const __bit_iterator& __x, const __bit_iterator& __y)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool operator<(const __bit_iterator& __x, const __bit_iterator& __y)
{return __x.__seg_ < __y.__seg_ || (__x.__seg_ == __y.__seg_ && __x.__ctz_ < __y.__ctz_);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator>(const __bit_iterator& __x, const __bit_iterator& __y)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool operator>(const __bit_iterator& __x, const __bit_iterator& __y)
{return __y < __x;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator<=(const __bit_iterator& __x, const __bit_iterator& __y)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool operator<=(const __bit_iterator& __x, const __bit_iterator& __y)
{return !(__y < __x);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator>=(const __bit_iterator& __x, const __bit_iterator& __y)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool operator>=(const __bit_iterator& __x, const __bit_iterator& __y)
{return !(__x < __y);}
private:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
explicit __bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT
: __seg_(__s), __ctz_(__ctz) {}
@@ -1273,40 +1271,40 @@ private:
friend class __bit_iterator<_Cp, true>;
template <class _Dp> friend struct __bit_array;
template <class _Dp>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
friend void __fill_n_false(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n);
template <class _Dp>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
friend void __fill_n_true(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n);
template <class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
friend __bit_iterator<_Dp, false> __copy_aligned(__bit_iterator<_Dp, _IC> __first,
__bit_iterator<_Dp, _IC> __last,
__bit_iterator<_Dp, false> __result);
template <class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
friend __bit_iterator<_Dp, false> __copy_unaligned(__bit_iterator<_Dp, _IC> __first,
__bit_iterator<_Dp, _IC> __last,
__bit_iterator<_Dp, false> __result);
template <class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
friend __bit_iterator<_Dp, false> copy(__bit_iterator<_Dp, _IC> __first,
__bit_iterator<_Dp, _IC> __last,
__bit_iterator<_Dp, false> __result);
template <class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
friend __bit_iterator<_Dp, false> __copy_backward_aligned(__bit_iterator<_Dp, _IC> __first,
__bit_iterator<_Dp, _IC> __last,
__bit_iterator<_Dp, false> __result);
template <class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
friend __bit_iterator<_Dp, false> __copy_backward_unaligned(__bit_iterator<_Dp, _IC> __first,
__bit_iterator<_Dp, _IC> __last,
__bit_iterator<_Dp, false> __result);
template <class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
friend __bit_iterator<_Dp, false> copy_backward(__bit_iterator<_Dp, _IC> __first,
__bit_iterator<_Dp, _IC> __last,
__bit_iterator<_Dp, false> __result);
@@ -1320,32 +1318,33 @@ private:
__bit_iterator<__C1, false>,
__bit_iterator<__C2, false>);
template <class _Dp>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
friend __bit_iterator<_Dp, false> rotate(__bit_iterator<_Dp, false>,
__bit_iterator<_Dp, false>,
__bit_iterator<_Dp, false>);
template <class _Dp, bool _IC1, bool _IC2>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
friend bool __equal_aligned(__bit_iterator<_Dp, _IC1>,
__bit_iterator<_Dp, _IC1>,
__bit_iterator<_Dp, _IC2>);
template <class _Dp, bool _IC1, bool _IC2>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
friend bool __equal_unaligned(__bit_iterator<_Dp, _IC1>,
__bit_iterator<_Dp, _IC1>,
__bit_iterator<_Dp, _IC2>);
template <class _Dp, bool _IC1, bool _IC2>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
friend bool equal(__bit_iterator<_Dp, _IC1>,
__bit_iterator<_Dp, _IC1>,
__bit_iterator<_Dp, _IC2>);
template <class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
friend __bit_iterator<_Dp, _IC> __find_bool_true(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
template <class _Dp, bool _IC>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
friend __bit_iterator<_Dp, _IC> __find_bool_false(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
template <class _Dp, bool _IC> friend typename __bit_iterator<_Dp, _IC>::difference_type
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
__count_bool_true(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
template <class _Dp, bool _IC> friend typename __bit_iterator<_Dp, _IC>::difference_type
__count_bool_false(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__bits b/contrib/libs/cxxsupp/libcxx/include/__bits
index c77b5c7850..d2c8439a6b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__bits
+++ b/contrib/libs/cxxsupp/libcxx/include/__bits
@@ -22,8 +22,6 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifndef _LIBCPP_COMPILER_MSVC
-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
int __libcpp_ctz(unsigned __x) _NOEXCEPT { return __builtin_ctz(__x); }
@@ -70,95 +68,6 @@ int __libcpp_popcount(unsigned long __x) _NOEXCEPT { return __builtin_popco
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
int __libcpp_popcount(unsigned long long __x) _NOEXCEPT { return __builtin_popcountll(__x); }
-#else // _LIBCPP_COMPILER_MSVC
-
-// Precondition: __x != 0
-inline _LIBCPP_INLINE_VISIBILITY
-int __libcpp_ctz(unsigned __x) {
- static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
- static_assert(sizeof(unsigned long) == 4, "");
- unsigned long __where;
- if (_BitScanForward(&__where, __x))
- return static_cast<int>(__where);
- return 32;
-}
-
-inline _LIBCPP_INLINE_VISIBILITY
-int __libcpp_ctz(unsigned long __x) {
- static_assert(sizeof(unsigned long) == sizeof(unsigned), "");
- return __libcpp_ctz(static_cast<unsigned>(__x));
-}
-
-inline _LIBCPP_INLINE_VISIBILITY
-int __libcpp_ctz(unsigned long long __x) {
- unsigned long __where;
-#if defined(_LIBCPP_HAS_BITSCAN64)
- if (_BitScanForward64(&__where, __x))
- return static_cast<int>(__where);
-#else
- // Win32 doesn't have _BitScanForward64 so emulate it with two 32 bit calls.
- if (_BitScanForward(&__where, static_cast<unsigned long>(__x)))
- return static_cast<int>(__where);
- if (_BitScanForward(&__where, static_cast<unsigned long>(__x >> 32)))
- return static_cast<int>(__where + 32);
-#endif
- return 64;
-}
-
-// Precondition: __x != 0
-inline _LIBCPP_INLINE_VISIBILITY
-int __libcpp_clz(unsigned __x) {
- static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
- static_assert(sizeof(unsigned long) == 4, "");
- unsigned long __where;
- if (_BitScanReverse(&__where, __x))
- return static_cast<int>(31 - __where);
- return 32; // Undefined Behavior.
-}
-
-inline _LIBCPP_INLINE_VISIBILITY
-int __libcpp_clz(unsigned long __x) {
- static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
- return __libcpp_clz(static_cast<unsigned>(__x));
-}
-
-inline _LIBCPP_INLINE_VISIBILITY
-int __libcpp_clz(unsigned long long __x) {
- unsigned long __where;
-#if defined(_LIBCPP_HAS_BITSCAN64)
- if (_BitScanReverse64(&__where, __x))
- return static_cast<int>(63 - __where);
-#else
- // Win32 doesn't have _BitScanReverse64 so emulate it with two 32 bit calls.
- if (_BitScanReverse(&__where, static_cast<unsigned long>(__x >> 32)))
- return static_cast<int>(63 - (__where + 32));
- if (_BitScanReverse(&__where, static_cast<unsigned long>(__x)))
- return static_cast<int>(63 - __where);
-#endif
- return 64; // Undefined Behavior.
-}
-
-inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned __x) {
- static_assert(sizeof(unsigned) == 4, "");
- return __popcnt(__x);
-}
-
-inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned long __x) {
- static_assert(sizeof(unsigned long) == 4, "");
- return __popcnt(__x);
-}
-
-inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned long long __x) {
- static_assert(sizeof(unsigned long long) == 8, "");
-#if defined(_M_IX86)
- return __popcnt(__x) + __popcnt(__x >> 32);
-#else
- return __popcnt64(__x);
-#endif
-}
-
-#endif // _LIBCPP_COMPILER_MSVC
-
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
diff --git a/contrib/libs/cxxsupp/libcxx/include/__bsd_locale_fallbacks.h b/contrib/libs/cxxsupp/libcxx/include/__bsd_locale_fallbacks.h
index 3d5b785744..9abd7e7e5f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__bsd_locale_fallbacks.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__bsd_locale_fallbacks.h
@@ -13,7 +13,6 @@
#ifndef _LIBCPP___BSD_LOCALE_FALLBACKS_H
#define _LIBCPP___BSD_LOCALE_FALLBACKS_H
-#include <memory>
#include <stdarg.h>
#include <stdlib.h>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__charconv/chars_format.h b/contrib/libs/cxxsupp/libcxx/include/__charconv/chars_format.h
index 0875079e6c..695bd87318 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__charconv/chars_format.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__charconv/chars_format.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifndef _LIBCPP_CXX03_LANG
+#if _LIBCPP_STD_VER > 14
enum class _LIBCPP_ENUM_VIS chars_format
{
@@ -52,25 +52,25 @@ operator^(chars_format __x, chars_format __y) {
_VSTD::__to_underlying(__y));
}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 chars_format&
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 chars_format&
operator&=(chars_format& __x, chars_format __y) {
__x = __x & __y;
return __x;
}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 chars_format&
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 chars_format&
operator|=(chars_format& __x, chars_format __y) {
__x = __x | __y;
return __x;
}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 chars_format&
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 chars_format&
operator^=(chars_format& __x, chars_format __y) {
__x = __x ^ __y;
return __x;
}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCPP_STD_VER > 14
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__charconv/from_chars_result.h b/contrib/libs/cxxsupp/libcxx/include/__charconv/from_chars_result.h
index 2cc3c11ef6..05ffe1485c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__charconv/from_chars_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__charconv/from_chars_result.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifndef _LIBCPP_CXX03_LANG
+#if _LIBCPP_STD_VER > 14
struct _LIBCPP_TYPE_VIS from_chars_result
{
@@ -30,7 +30,7 @@ struct _LIBCPP_TYPE_VIS from_chars_result
# endif
};
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCPP_STD_VER > 14
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__charconv/tables.h b/contrib/libs/cxxsupp/libcxx/include/__charconv/tables.h
index 83f39e6fd2..9b82440348 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__charconv/tables.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__charconv/tables.h
@@ -19,38 +19,16 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifndef _LIBCPP_CXX03_LANG
+#if _LIBCPP_STD_VER > 14
namespace __itoa {
-/// Contains the charconv helper tables.
-///
-/// In C++17 these could be inline constexpr variable, but libc++ supports
-/// charconv for integrals in C++11 mode.
-template <class = void>
-struct __table {
- static const char __base_2_lut[64];
- static const char __base_8_lut[128];
- static const char __base_16_lut[512];
-
- static const uint32_t __pow10_32[10];
- static const uint64_t __pow10_64[20];
-# ifndef _LIBCPP_HAS_NO_INT128
- // TODO FMT Reduce the number of entries in this table.
- static const __uint128_t __pow10_128[40];
- static const int __pow10_128_offset = 0;
-# endif
- static const char __digits_base_10[200];
-};
-
-template <class _Tp>
-const char __table<_Tp>::__base_2_lut[64] = {
+inline constexpr char __base_2_lut[64] = {
'0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '1', '0', '0', '0', '1', '1', '0', '1', '0', '0', '0', '1',
'0', '1', '0', '1', '1', '0', '0', '1', '1', '1', '1', '0', '0', '0', '1', '0', '0', '1', '1', '0', '1', '0',
'1', '0', '1', '1', '1', '1', '0', '0', '1', '1', '0', '1', '1', '1', '1', '0', '1', '1', '1', '1'};
-template <class _Tp>
-const char __table<_Tp>::__base_8_lut[128] = {
+inline constexpr char __base_8_lut[128] = {
'0', '0', '0', '1', '0', '2', '0', '3', '0', '4', '0', '5', '0', '6', '0', '7', '1', '0', '1', '1', '1', '2',
'1', '3', '1', '4', '1', '5', '1', '6', '1', '7', '2', '0', '2', '1', '2', '2', '2', '3', '2', '4', '2', '5',
'2', '6', '2', '7', '3', '0', '3', '1', '3', '2', '3', '3', '3', '4', '3', '5', '3', '6', '3', '7', '4', '0',
@@ -58,8 +36,7 @@ const char __table<_Tp>::__base_8_lut[128] = {
'5', '4', '5', '5', '5', '6', '5', '7', '6', '0', '6', '1', '6', '2', '6', '3', '6', '4', '6', '5', '6', '6',
'6', '7', '7', '0', '7', '1', '7', '2', '7', '3', '7', '4', '7', '5', '7', '6', '7', '7'};
-template <class _Tp>
-const char __table<_Tp>::__base_16_lut[512] = {
+inline constexpr char __base_16_lut[512] = {
'0', '0', '0', '1', '0', '2', '0', '3', '0', '4', '0', '5', '0', '6', '0', '7', '0', '8', '0', '9', '0', 'a', '0',
'b', '0', 'c', '0', 'd', '0', 'e', '0', 'f', '1', '0', '1', '1', '1', '2', '1', '3', '1', '4', '1', '5', '1', '6',
'1', '7', '1', '8', '1', '9', '1', 'a', '1', 'b', '1', 'c', '1', 'd', '1', 'e', '1', 'f', '2', '0', '2', '1', '2',
@@ -84,13 +61,11 @@ const char __table<_Tp>::__base_16_lut[512] = {
'1', 'f', '2', 'f', '3', 'f', '4', 'f', '5', 'f', '6', 'f', '7', 'f', '8', 'f', '9', 'f', 'a', 'f', 'b', 'f', 'c',
'f', 'd', 'f', 'e', 'f', 'f'};
-template <class _Tp>
-const uint32_t __table<_Tp>::__pow10_32[10] = {
+inline constexpr uint32_t __pow10_32[10] = {
UINT32_C(0), UINT32_C(10), UINT32_C(100), UINT32_C(1000), UINT32_C(10000),
UINT32_C(100000), UINT32_C(1000000), UINT32_C(10000000), UINT32_C(100000000), UINT32_C(1000000000)};
-template <class _Tp>
-const uint64_t __table<_Tp>::__pow10_64[20] = {UINT64_C(0),
+inline constexpr uint64_t __pow10_64[20] = {UINT64_C(0),
UINT64_C(10),
UINT64_C(100),
UINT64_C(1000),
@@ -112,8 +87,8 @@ const uint64_t __table<_Tp>::__pow10_64[20] = {UINT64_C(0),
UINT64_C(10000000000000000000)};
# ifndef _LIBCPP_HAS_NO_INT128
-template <class _Tp>
-const __uint128_t __table<_Tp>::__pow10_128[40] = {
+inline constexpr int __pow10_128_offset = 0;
+inline constexpr __uint128_t __pow10_128[40] = {
UINT64_C(0),
UINT64_C(10),
UINT64_C(100),
@@ -156,8 +131,7 @@ const __uint128_t __table<_Tp>::__pow10_128[40] = {
(__uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000000000000000000)) * 10};
# endif
-template <class _Tp>
-const char __table<_Tp>::__digits_base_10[200] = {
+inline constexpr char __digits_base_10[200] = {
// clang-format off
'0', '0', '0', '1', '0', '2', '0', '3', '0', '4', '0', '5', '0', '6', '0', '7', '0', '8', '0', '9',
'1', '0', '1', '1', '1', '2', '1', '3', '1', '4', '1', '5', '1', '6', '1', '7', '1', '8', '1', '9',
@@ -173,7 +147,7 @@ const char __table<_Tp>::__digits_base_10[200] = {
} // namespace __itoa
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCPP_STD_VER > 14
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__charconv/to_chars_base_10.h b/contrib/libs/cxxsupp/libcxx/include/__charconv/to_chars_base_10.h
index d25deffc59..fc7fb76e3e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__charconv/to_chars_base_10.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__charconv/to_chars_base_10.h
@@ -25,54 +25,54 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifndef _LIBCPP_CXX03_LANG
+#if _LIBCPP_STD_VER > 14
namespace __itoa {
-_LIBCPP_HIDE_FROM_ABI inline char* __append1(char* __first, uint32_t __value) noexcept {
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append1(char* __first, uint32_t __value) noexcept {
*__first = '0' + static_cast<char>(__value);
return __first + 1;
}
-_LIBCPP_HIDE_FROM_ABI inline char* __append2(char* __first, uint32_t __value) noexcept {
- return std::copy_n(&__table<>::__digits_base_10[__value * 2], 2, __first);
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append2(char* __first, uint32_t __value) noexcept {
+ return std::copy_n(&__digits_base_10[__value * 2], 2, __first);
}
-_LIBCPP_HIDE_FROM_ABI inline char* __append3(char* __first, uint32_t __value) noexcept {
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append3(char* __first, uint32_t __value) noexcept {
return __itoa::__append2(__itoa::__append1(__first, __value / 100), __value % 100);
}
-_LIBCPP_HIDE_FROM_ABI inline char* __append4(char* __first, uint32_t __value) noexcept {
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append4(char* __first, uint32_t __value) noexcept {
return __itoa::__append2(__itoa::__append2(__first, __value / 100), __value % 100);
}
-_LIBCPP_HIDE_FROM_ABI inline char* __append5(char* __first, uint32_t __value) noexcept {
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append5(char* __first, uint32_t __value) noexcept {
return __itoa::__append4(__itoa::__append1(__first, __value / 10000), __value % 10000);
}
-_LIBCPP_HIDE_FROM_ABI inline char* __append6(char* __first, uint32_t __value) noexcept {
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append6(char* __first, uint32_t __value) noexcept {
return __itoa::__append4(__itoa::__append2(__first, __value / 10000), __value % 10000);
}
-_LIBCPP_HIDE_FROM_ABI inline char* __append7(char* __first, uint32_t __value) noexcept {
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append7(char* __first, uint32_t __value) noexcept {
return __itoa::__append6(__itoa::__append1(__first, __value / 1000000), __value % 1000000);
}
-_LIBCPP_HIDE_FROM_ABI inline char* __append8(char* __first, uint32_t __value) noexcept {
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append8(char* __first, uint32_t __value) noexcept {
return __itoa::__append6(__itoa::__append2(__first, __value / 1000000), __value % 1000000);
}
-_LIBCPP_HIDE_FROM_ABI inline char* __append9(char* __first, uint32_t __value) noexcept {
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append9(char* __first, uint32_t __value) noexcept {
return __itoa::__append8(__itoa::__append1(__first, __value / 100000000), __value % 100000000);
}
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI char* __append10(char* __first, _Tp __value) noexcept {
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI char* __append10(char* __first, _Tp __value) noexcept {
return __itoa::__append8(__itoa::__append2(__first, static_cast<uint32_t>(__value / 100000000)),
static_cast<uint32_t>(__value % 100000000));
}
-_LIBCPP_HIDE_FROM_ABI inline char* __base_10_u32(char* __first, uint32_t __value) noexcept {
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __base_10_u32(char* __first, uint32_t __value) noexcept {
if (__value < 1000000) {
if (__value < 10000) {
if (__value < 100) {
@@ -107,7 +107,7 @@ _LIBCPP_HIDE_FROM_ABI inline char* __base_10_u32(char* __first, uint32_t __value
return __itoa::__append10(__first, __value);
}
-_LIBCPP_HIDE_FROM_ABI inline char* __base_10_u64(char* __buffer, uint64_t __value) noexcept {
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __base_10_u64(char* __buffer, uint64_t __value) noexcept {
if (__value <= UINT32_MAX)
return __itoa::__base_10_u32(__buffer, static_cast<uint32_t>(__value));
@@ -129,12 +129,12 @@ _LIBCPP_HIDE_FROM_ABI inline char* __base_10_u64(char* __buffer, uint64_t __valu
/// \note The lookup table contains a partial set of exponents limiting the
/// range that can be used. However the range is sufficient for
/// \ref __base_10_u128.
-_LIBCPP_HIDE_FROM_ABI inline __uint128_t __pow_10(int __exp) noexcept {
- _LIBCPP_ASSERT(__exp >= __table<>::__pow10_128_offset, "Index out of bounds");
- return __table<>::__pow10_128[__exp - __table<>::__pow10_128_offset];
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline __uint128_t __pow_10(int __exp) noexcept {
+ _LIBCPP_ASSERT(__exp >= __pow10_128_offset, "Index out of bounds");
+ return __pow10_128[__exp - __pow10_128_offset];
}
-_LIBCPP_HIDE_FROM_ABI inline char* __base_10_u128(char* __buffer, __uint128_t __value) noexcept {
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __base_10_u128(char* __buffer, __uint128_t __value) noexcept {
_LIBCPP_ASSERT(
__value > numeric_limits<uint64_t>::max(), "The optimizations for this algorithm fail when this isn't true.");
@@ -176,7 +176,7 @@ _LIBCPP_HIDE_FROM_ABI inline char* __base_10_u128(char* __buffer, __uint128_t __
# endif
} // namespace __itoa
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCPP_STD_VER > 14
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__charconv/to_chars_result.h b/contrib/libs/cxxsupp/libcxx/include/__charconv/to_chars_result.h
index b4bc6ac263..2eb4098dfc 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__charconv/to_chars_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__charconv/to_chars_result.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifndef _LIBCPP_CXX03_LANG
+#if _LIBCPP_STD_VER > 14
struct _LIBCPP_TYPE_VIS to_chars_result
{
@@ -30,7 +30,7 @@ struct _LIBCPP_TYPE_VIS to_chars_result
# endif
};
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCPP_STD_VER > 14
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/convert_to_timespec.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/convert_to_timespec.h
index e8631d135f..fab07f2567 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/convert_to_timespec.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/convert_to_timespec.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___CHRONO_CONVERT_TO_TIMESPEC_H
#define _LIBCPP___CHRONO_CONVERT_TO_TIMESPEC_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/convert_to_tm.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/convert_to_tm.h
new file mode 100644
index 0000000000..dea9758efb
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/convert_to_tm.h
@@ -0,0 +1,68 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___CHRONO_CONVERT_TO_TM_H
+#define _LIBCPP___CHRONO_CONVERT_TO_TM_H
+
+#include <__chrono/day.h>
+#include <__chrono/duration.h>
+#include <__chrono/month.h>
+#include <__chrono/weekday.h>
+#include <__chrono/year.h>
+#include <__concepts/same_as.h>
+#include <__config>
+#include <cstdint>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 17
+
+// Convert a chrono (calendar) time point, or dururation to the given _Tm type,
+// which must have the same properties as std::tm.
+template <class _Tm, class _ChronoT>
+_LIBCPP_HIDE_FROM_ABI _Tm __convert_to_tm(const _ChronoT& __value) {
+ _Tm __result = {};
+# ifdef __GLIBC__
+ __result.tm_zone = "UTC";
+# endif
+
+ if constexpr (chrono::__is_duration<_ChronoT>::value) {
+ // [time.format]/6
+ // ... However, if a flag refers to a "time of day" (e.g. %H, %I, %p,
+ // etc.), then a specialization of duration is interpreted as the time of
+ // day elapsed since midnight.
+ uint64_t __sec = chrono::duration_cast<chrono::seconds>(__value).count();
+ __sec %= 24 * 3600;
+ __result.tm_hour = __sec / 3600;
+ __sec %= 3600;
+ __result.tm_min = __sec / 60;
+ __result.tm_sec = __sec % 60;
+ } else if constexpr (same_as<_ChronoT, chrono::day>)
+ __result.tm_mday = static_cast<unsigned>(__value);
+ else if constexpr (same_as<_ChronoT, chrono::month>)
+ __result.tm_mon = static_cast<unsigned>(__value) - 1;
+ else if constexpr (same_as<_ChronoT, chrono::year>)
+ __result.tm_year = static_cast<int>(__value) - 1900;
+ else if constexpr (same_as<_ChronoT, chrono::weekday>)
+ __result.tm_wday = __value.c_encoding();
+ else
+ static_assert(sizeof(_ChronoT) == 0, "Add the missing type specialization");
+
+ return __result;
+}
+
+#endif //if _LIBCPP_STD_VER > 17
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___CHRONO_CONVERT_TO_TM_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/day.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/day.h
index d9fa4ffbc4..35ecfcf9e5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/day.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/day.h
@@ -27,18 +27,18 @@ namespace chrono
class day {
private:
- unsigned char __d;
+ unsigned char __d_;
public:
_LIBCPP_HIDE_FROM_ABI day() = default;
- _LIBCPP_HIDE_FROM_ABI explicit inline constexpr day(unsigned __val) noexcept : __d(static_cast<unsigned char>(__val)) {}
- _LIBCPP_HIDE_FROM_ABI inline constexpr day& operator++() noexcept { ++__d; return *this; }
+ _LIBCPP_HIDE_FROM_ABI explicit inline constexpr day(unsigned __val) noexcept : __d_(static_cast<unsigned char>(__val)) {}
+ _LIBCPP_HIDE_FROM_ABI inline constexpr day& operator++() noexcept { ++__d_; return *this; }
_LIBCPP_HIDE_FROM_ABI inline constexpr day operator++(int) noexcept { day __tmp = *this; ++(*this); return __tmp; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr day& operator--() noexcept { --__d; return *this; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr day& operator--() noexcept { --__d_; return *this; }
_LIBCPP_HIDE_FROM_ABI inline constexpr day operator--(int) noexcept { day __tmp = *this; --(*this); return __tmp; }
_LIBCPP_HIDE_FROM_ABI constexpr day& operator+=(const days& __dd) noexcept;
_LIBCPP_HIDE_FROM_ABI constexpr day& operator-=(const days& __dd) noexcept;
- _LIBCPP_HIDE_FROM_ABI explicit inline constexpr operator unsigned() const noexcept { return __d; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __d >= 1 && __d <= 31; }
+ _LIBCPP_HIDE_FROM_ABI explicit inline constexpr operator unsigned() const noexcept { return __d_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __d_ >= 1 && __d_ <= 31; }
};
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/duration.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/duration.h
index c502574fb2..4ad6467b2a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/duration.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/duration.h
@@ -278,18 +278,18 @@ public:
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename common_type<duration>::type operator+() const {return typename common_type<duration>::type(*this);}
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename common_type<duration>::type operator-() const {return typename common_type<duration>::type(-__rep_);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator++() {++__rep_; return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration operator++(int) {return duration(__rep_++);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator--() {--__rep_; return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration operator--(int) {return duration(__rep_--);}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator++() {++__rep_; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration operator++(int) {return duration(__rep_++);}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator--() {--__rep_; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration operator--(int) {return duration(__rep_--);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator+=(const duration& __d) {__rep_ += __d.count(); return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator-=(const duration& __d) {__rep_ -= __d.count(); return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator+=(const duration& __d) {__rep_ += __d.count(); return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator-=(const duration& __d) {__rep_ -= __d.count(); return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator*=(const rep& __rhs) {__rep_ *= __rhs; return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator/=(const rep& __rhs) {__rep_ /= __rhs; return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator%=(const rep& __rhs) {__rep_ %= __rhs; return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator%=(const duration& __rhs) {__rep_ %= __rhs.count(); return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator*=(const rep& __rhs) {__rep_ *= __rhs; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator/=(const rep& __rhs) {__rep_ /= __rhs; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator%=(const rep& __rhs) {__rep_ %= __rhs; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator%=(const duration& __rhs) {__rep_ %= __rhs.count(); return *this;}
// special values
@@ -534,67 +534,67 @@ inline namespace literals
inline namespace chrono_literals
{
- constexpr chrono::hours operator""h(unsigned long long __h)
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::hours operator""h(unsigned long long __h)
{
return chrono::hours(static_cast<chrono::hours::rep>(__h));
}
- constexpr chrono::duration<long double, ratio<3600,1>> operator""h(long double __h)
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, ratio<3600,1>> operator""h(long double __h)
{
return chrono::duration<long double, ratio<3600,1>>(__h);
}
- constexpr chrono::minutes operator""min(unsigned long long __m)
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::minutes operator""min(unsigned long long __m)
{
return chrono::minutes(static_cast<chrono::minutes::rep>(__m));
}
- constexpr chrono::duration<long double, ratio<60,1>> operator""min(long double __m)
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, ratio<60,1>> operator""min(long double __m)
{
return chrono::duration<long double, ratio<60,1>> (__m);
}
- constexpr chrono::seconds operator""s(unsigned long long __s)
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::seconds operator""s(unsigned long long __s)
{
return chrono::seconds(static_cast<chrono::seconds::rep>(__s));
}
- constexpr chrono::duration<long double> operator""s(long double __s)
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double> operator""s(long double __s)
{
return chrono::duration<long double> (__s);
}
- constexpr chrono::milliseconds operator""ms(unsigned long long __ms)
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::milliseconds operator""ms(unsigned long long __ms)
{
return chrono::milliseconds(static_cast<chrono::milliseconds::rep>(__ms));
}
- constexpr chrono::duration<long double, milli> operator""ms(long double __ms)
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, milli> operator""ms(long double __ms)
{
return chrono::duration<long double, milli>(__ms);
}
- constexpr chrono::microseconds operator""us(unsigned long long __us)
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::microseconds operator""us(unsigned long long __us)
{
return chrono::microseconds(static_cast<chrono::microseconds::rep>(__us));
}
- constexpr chrono::duration<long double, micro> operator""us(long double __us)
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, micro> operator""us(long double __us)
{
return chrono::duration<long double, micro> (__us);
}
- constexpr chrono::nanoseconds operator""ns(unsigned long long __ns)
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::nanoseconds operator""ns(unsigned long long __ns)
{
return chrono::nanoseconds(static_cast<chrono::nanoseconds::rep>(__ns));
}
- constexpr chrono::duration<long double, nano> operator""ns(long double __ns)
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, nano> operator""ns(long double __ns)
{
return chrono::duration<long double, nano> (__ns);
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/file_clock.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/file_clock.h
index b8e08e78ba..ef62b83295 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/file_clock.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/file_clock.h
@@ -61,7 +61,7 @@ struct _FilesystemClock {
typedef chrono::time_point<_FilesystemClock> time_point;
_LIBCPP_EXPORTED_FROM_ABI
- static _LIBCPP_CONSTEXPR_AFTER_CXX11 const bool is_steady = false;
+ static _LIBCPP_CONSTEXPR_SINCE_CXX14 const bool is_steady = false;
_LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_FUNC_VIS static time_point now() noexcept;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/formatter.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/formatter.h
new file mode 100644
index 0000000000..89c1e82f42
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/formatter.h
@@ -0,0 +1,443 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___CHRONO_FORMATTER_H
+#define _LIBCPP___CHRONO_FORMATTER_H
+
+#include <__chrono/convert_to_tm.h>
+#include <__chrono/day.h>
+#include <__chrono/duration.h>
+#include <__chrono/hh_mm_ss.h>
+#include <__chrono/month.h>
+#include <__chrono/ostream.h>
+#include <__chrono/parser_std_format_spec.h>
+#include <__chrono/statically_widen.h>
+#include <__chrono/time_point.h>
+#include <__chrono/weekday.h>
+#include <__chrono/year.h>
+#include <__concepts/arithmetic.h>
+#include <__concepts/same_as.h>
+#include <__config>
+#include <__format/concepts.h>
+#include <__format/format_error.h>
+#include <__format/format_functions.h>
+#include <__format/format_parse_context.h>
+#include <__format/formatter.h>
+#include <__format/formatter_output.h>
+#include <__format/parser_std_format_spec.h>
+#include <__memory/addressof.h>
+#include <cmath>
+#include <ctime>
+#include <sstream>
+#include <string>
+#include <string_view>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+
+namespace __formatter {
+
+/// Formats a time based on a tm struct.
+///
+/// This formatter passes the formatting to time_put which uses strftime. When
+/// the value is outside the valid range it's unspecified what strftime will
+/// output. For example weekday 8 can print 1 when the day is processed modulo
+/// 7 since that handles the Sunday for 0-based weekday. It can also print 8 if
+/// 7 is handled as a special case.
+///
+/// The Standard doesn't specify what to do in this case so the result depends
+/// on the result of the underlying code.
+///
+/// \pre When the (abbreviated) weekday or month name are used, the caller
+/// validates whether the value is valid. So the caller handles that
+/// requirement of Table 97: Meaning of conversion specifiers
+/// [tab:time.format.spec].
+///
+/// When no chrono-specs are provided it uses the stream formatter.
+
+// For tiny ratios it's not possible to convert a duration to a hh_mm_ss. This
+// fails compile-time due to the limited precision of the ratio (64-bit is too
+// small). Therefore a duration uses its own conversion.
+template <class _CharT, class _Tp>
+ requires(chrono::__is_duration<_Tp>::value)
+_LIBCPP_HIDE_FROM_ABI void __format_sub_seconds(const _Tp& __value, basic_stringstream<_CharT>& __sstr) {
+ __sstr << std::use_facet<numpunct<_CharT>>(__sstr.getloc()).decimal_point();
+
+ auto __fraction = __value - chrono::duration_cast<chrono::seconds>(__value);
+ if constexpr (chrono::treat_as_floating_point_v<typename _Tp::rep>)
+ // When the floating-point value has digits itself they are ignored based
+ // on the wording in [tab:time.format.spec]
+ // If the precision of the input cannot be exactly represented with
+ // seconds, then the format is a decimal floating-point number with a
+ // fixed format and a precision matching that of the precision of the
+ // input (or to a microseconds precision if the conversion to
+ // floating-point decimal seconds cannot be made within 18 fractional
+ // digits).
+ //
+ // This matches the behaviour of MSVC STL, fmtlib interprets this
+ // differently and uses 3 decimals.
+ // https://godbolt.org/z/6dsbnW8ba
+ std::format_to(std::ostreambuf_iterator<_CharT>{__sstr},
+ _LIBCPP_STATICALLY_WIDEN(_CharT, "{:0{}.0f}"),
+ __fraction.count(),
+ chrono::hh_mm_ss<_Tp>::fractional_width);
+ else
+ std::format_to(std::ostreambuf_iterator<_CharT>{__sstr},
+ _LIBCPP_STATICALLY_WIDEN(_CharT, "{:0{}}"),
+ __fraction.count(),
+ chrono::hh_mm_ss<_Tp>::fractional_width);
+}
+
+template <class _Tp>
+consteval bool __use_fraction() {
+ if constexpr (chrono::__is_duration<_Tp>::value)
+ return chrono::hh_mm_ss<_Tp>::fractional_width;
+ else
+ return false;
+}
+
+template <class _CharT>
+_LIBCPP_HIDE_FROM_ABI void __format_year(int __year, basic_stringstream<_CharT>& __sstr) {
+ if (__year < 0) {
+ __sstr << _CharT('-');
+ __year = -__year;
+ }
+
+ // TODO FMT Write an issue
+ // If the result has less than four digits it is zero-padded with 0 to two digits.
+ // is less -> has less
+ // left-padded -> zero-padded, otherwise the proper value would be 000-0.
+
+ // Note according to the wording it should be left padded, which is odd.
+ __sstr << std::format(_LIBCPP_STATICALLY_WIDEN(_CharT, "{:04}"), __year);
+}
+
+template <class _CharT>
+_LIBCPP_HIDE_FROM_ABI void __format_century(int __year, basic_stringstream<_CharT>& __sstr) {
+ // TODO FMT Write an issue
+ // [tab:time.format.spec]
+ // %C The year divided by 100 using floored division. If the result is a
+ // single decimal digit, it is prefixed with 0.
+
+ bool __negative = __year < 0;
+ int __century = (__year - (99 * __negative)) / 100; // floored division
+ __sstr << std::format(_LIBCPP_STATICALLY_WIDEN(_CharT, "{:02}"), __century);
+}
+
+template <class _CharT, class _Tp>
+_LIBCPP_HIDE_FROM_ABI void __format_chrono_using_chrono_specs(
+ const _Tp& __value, basic_stringstream<_CharT>& __sstr, basic_string_view<_CharT> __chrono_specs) {
+ tm __t = std::__convert_to_tm<tm>(__value);
+ const auto& __facet = std::use_facet<time_put<_CharT>>(__sstr.getloc());
+ for (auto __it = __chrono_specs.begin(); __it != __chrono_specs.end(); ++__it) {
+ if (*__it == _CharT('%')) {
+ auto __s = __it;
+ ++__it;
+ // We only handle the types that can't be directly handled by time_put.
+ // (as an optimization n, t, and % are also handled directly.)
+ switch (*__it) {
+ case _CharT('n'):
+ __sstr << _CharT('\n');
+ break;
+ case _CharT('t'):
+ __sstr << _CharT('\t');
+ break;
+ case _CharT('%'):
+ __sstr << *__it;
+ break;
+
+ case _CharT('C'): {
+ // strftime's output is only defined in the range [00, 99].
+ int __year = __t.tm_year + 1900;
+ if (__year < 1000 || __year > 9999)
+ __formatter::__format_century(__year, __sstr);
+ else
+ __facet.put({__sstr}, __sstr, _CharT(' '), std::addressof(__t), __s, __it + 1);
+ } break;
+
+ case _CharT('j'):
+ if constexpr (chrono::__is_duration<_Tp>::value)
+ // Converting a duration where the period has a small ratio to days
+ // may fail to compile. This due to loss of precision in the
+ // conversion. In order to avoid that issue convert to seconds as
+ // an intemediate step.
+ __sstr << chrono::duration_cast<chrono::days>(chrono::duration_cast<chrono::seconds>(__value)).count();
+ else
+ __facet.put({__sstr}, __sstr, _CharT(' '), std::addressof(__t), __s, __it + 1);
+ break;
+
+ case _CharT('q'):
+ if constexpr (chrono::__is_duration<_Tp>::value) {
+ __sstr << chrono::__units_suffix<_CharT, typename _Tp::period>();
+ break;
+ }
+ __builtin_unreachable();
+
+ case _CharT('Q'):
+ // TODO FMT Determine the proper ideas
+ // - Should it honour the precision?
+ // - Shoult it honour the locale setting for the separators?
+ // The wording for Q doesn't use the word locale and the effect of
+ // precision is unspecified.
+ //
+ // MSVC STL ignores precision but uses separator
+ // FMT honours precision and has a bug for separator
+ // https://godbolt.org/z/78b7sMxns
+ if constexpr (chrono::__is_duration<_Tp>::value) {
+ __sstr << format(_LIBCPP_STATICALLY_WIDEN(_CharT, "{}"), __value.count());
+ break;
+ }
+ __builtin_unreachable();
+
+ case _CharT('S'):
+ case _CharT('T'):
+ __facet.put({__sstr}, __sstr, _CharT(' '), std::addressof(__t), __s, __it + 1);
+ if constexpr (__use_fraction<_Tp>())
+ __formatter::__format_sub_seconds(__value, __sstr);
+ break;
+
+ // Unlike time_put and strftime the formatting library requires %Y
+ //
+ // [tab:time.format.spec]
+ // The year as a decimal number. If the result is less than four digits
+ // it is left-padded with 0 to four digits.
+ //
+ // This means years in the range (-1000, 1000) need manual formatting.
+ // It's unclear whether %EY needs the same treatment. For example the
+ // Japanese EY contains the era name and year. This is zero-padded to 2
+ // digits in time_put (note that older glibc versions didn't do
+ // padding.) However most eras won't reach 100 years, let alone 1000.
+ // So padding to 4 digits seems unwanted for Japanese.
+ //
+ // The same applies to %Ex since that too depends on the era.
+ //
+ // %x the locale's date representation is currently doesn't handle the
+ // zero-padding too.
+ //
+ // The 4 digits can be implemented better at a later time. On POSIX
+ // systems the required information can be extracted by nl_langinfo
+ // https://man7.org/linux/man-pages/man3/nl_langinfo.3.html
+ //
+ // Note since year < -1000 is expected to be rare it uses the more
+ // expensive year routine.
+ //
+ // TODO FMT evaluate the comment above.
+
+# if defined(__GLIBC__) || defined(_AIX)
+ case _CharT('y'):
+ // Glibc fails for negative values, AIX for positive values too.
+ __sstr << std::format(_LIBCPP_STATICALLY_WIDEN(_CharT, "{:02}"), (std::abs(__t.tm_year + 1900)) % 100);
+ break;
+# endif // defined(__GLIBC__) || defined(_AIX)
+
+ case _CharT('Y'): {
+ int __year = __t.tm_year + 1900;
+ if (__year < 1000)
+ __formatter::__format_year(__year, __sstr);
+ else
+ __facet.put({__sstr}, __sstr, _CharT(' '), std::addressof(__t), __s, __it + 1);
+ } break;
+
+ case _CharT('O'):
+ if constexpr (__use_fraction<_Tp>()) {
+ // Handle OS using the normal representation for the non-fractional
+ // part. There seems to be no locale information regarding how the
+ // fractional part should be formatted.
+ if (*(__it + 1) == 'S') {
+ ++__it;
+ __facet.put({__sstr}, __sstr, _CharT(' '), std::addressof(__t), __s, __it + 1);
+ __formatter::__format_sub_seconds(__value, __sstr);
+ break;
+ }
+ }
+ [[fallthrough]];
+ case _CharT('E'):
+ ++__it;
+ [[fallthrough]];
+ default:
+ __facet.put({__sstr}, __sstr, _CharT(' '), std::addressof(__t), __s, __it + 1);
+ break;
+ }
+ } else {
+ __sstr << *__it;
+ }
+ }
+}
+
+template <class _Tp>
+_LIBCPP_HIDE_FROM_ABI constexpr bool __month_name_ok(const _Tp& __value) {
+ if constexpr (same_as<_Tp, chrono::day>)
+ return true;
+ else if constexpr (same_as<_Tp, chrono::month>)
+ return __value.ok();
+ else if constexpr (same_as<_Tp, chrono::year>)
+ return true;
+ else if constexpr (same_as<_Tp, chrono::weekday>)
+ return true;
+ else
+ static_assert(sizeof(_Tp) == 0, "Add the missing type specialization");
+}
+
+template <class _Tp>
+_LIBCPP_HIDE_FROM_ABI constexpr bool __weekday_name_ok(const _Tp& __value) {
+ if constexpr (same_as<_Tp, chrono::day>)
+ return true;
+ else if constexpr (same_as<_Tp, chrono::month>)
+ return __value.ok();
+ else if constexpr (same_as<_Tp, chrono::year>)
+ return true;
+ else if constexpr (same_as<_Tp, chrono::weekday>)
+ return __value.ok();
+ else
+ static_assert(sizeof(_Tp) == 0, "Add the missing type specialization");
+}
+
+template <class _CharT, class _Tp>
+_LIBCPP_HIDE_FROM_ABI auto
+__format_chrono(const _Tp& __value,
+ auto& __ctx,
+ __format_spec::__parsed_specifications<_CharT> __specs,
+ basic_string_view<_CharT> __chrono_specs) -> decltype(__ctx.out()) {
+ basic_stringstream<_CharT> __sstr;
+ // [time.format]/2
+ // 2.1 - the "C" locale if the L option is not present in chrono-format-spec, otherwise
+ // 2.2 - the locale passed to the formatting function if any, otherwise
+ // 2.3 - the global locale.
+ // Note that the __ctx's locale() call does 2.2 and 2.3.
+ if (__specs.__chrono_.__locale_specific_form_)
+ __sstr.imbue(__ctx.locale());
+ else
+ __sstr.imbue(locale::classic());
+
+ if (__chrono_specs.empty())
+ __sstr << __value;
+ else {
+ if constexpr (chrono::__is_duration<_Tp>::value) {
+ if (__value < __value.zero())
+ __sstr << _CharT('-');
+ __formatter::__format_chrono_using_chrono_specs(chrono::abs(__value), __sstr, __chrono_specs);
+ // TODO FMT When keeping the precision it will truncate the string.
+ // Note that the behaviour what the precision does isn't specified.
+ __specs.__precision_ = -1;
+ } else {
+ if (__specs.__chrono_.__weekday_name_ && !__formatter::__weekday_name_ok(__value))
+ std::__throw_format_error("formatting a weekday name needs a valid weekday");
+
+ if (__specs.__chrono_.__month_name_ && !__formatter::__month_name_ok(__value))
+ std::__throw_format_error("formatting a month name from an invalid month number");
+
+ __formatter::__format_chrono_using_chrono_specs(__value, __sstr, __chrono_specs);
+ }
+ }
+
+ // TODO FMT Use the stringstream's view after P0408R7 has been implemented.
+ basic_string<_CharT> __str = __sstr.str();
+ return __formatter::__write_string(basic_string_view<_CharT>{__str}, __ctx.out(), __specs);
+}
+
+} // namespace __formatter
+
+template <__fmt_char_type _CharT>
+struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT __formatter_chrono {
+public:
+ _LIBCPP_HIDE_FROM_ABI constexpr auto __parse(
+ basic_format_parse_context<_CharT>& __parse_ctx, __format_spec::__fields __fields, __format_spec::__flags __flags)
+ -> decltype(__parse_ctx.begin()) {
+ return __parser_.__parse(__parse_ctx, __fields, __flags);
+ }
+
+ template <class _Tp>
+ _LIBCPP_HIDE_FROM_ABI auto format(const _Tp& __value, auto& __ctx) const -> decltype(__ctx.out()) const {
+ return __formatter::__format_chrono(
+ __value, __ctx, __parser_.__parser_.__get_parsed_chrono_specifications(__ctx), __parser_.__chrono_specs_);
+ }
+
+ __format_spec::__parser_chrono<_CharT> __parser_;
+};
+
+template <class _Rep, class _Period, __fmt_char_type _CharT>
+struct formatter<chrono::duration<_Rep, _Period>, _CharT> : public __formatter_chrono<_CharT> {
+public:
+ using _Base = __formatter_chrono<_CharT>;
+
+ _LIBCPP_HIDE_FROM_ABI constexpr auto parse(basic_format_parse_context<_CharT>& __parse_ctx)
+ -> decltype(__parse_ctx.begin()) {
+ // [time.format]/1
+ // Giving a precision specification in the chrono-format-spec is valid only
+ // for std::chrono::duration types where the representation type Rep is a
+ // floating-point type. For all other Rep types, an exception of type
+ // format_error is thrown if the chrono-format-spec contains a precision
+ // specification.
+ //
+ // Note this doesn't refer to chrono::treat_as_floating_point_v<_Rep>.
+ if constexpr (std::floating_point<_Rep>)
+ return _Base::__parse(__parse_ctx, __format_spec::__fields_chrono_fractional, __format_spec::__flags::__duration);
+ else
+ return _Base::__parse(__parse_ctx, __format_spec::__fields_chrono, __format_spec::__flags::__duration);
+ }
+};
+
+template <__fmt_char_type _CharT>
+struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<chrono::day, _CharT>
+ : public __formatter_chrono<_CharT> {
+public:
+ using _Base = __formatter_chrono<_CharT>;
+
+ _LIBCPP_HIDE_FROM_ABI constexpr auto parse(basic_format_parse_context<_CharT>& __parse_ctx)
+ -> decltype(__parse_ctx.begin()) {
+ return _Base::__parse(__parse_ctx, __format_spec::__fields_chrono, __format_spec::__flags::__day);
+ }
+};
+
+template <__fmt_char_type _CharT>
+struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<chrono::month, _CharT>
+ : public __formatter_chrono<_CharT> {
+public:
+ using _Base = __formatter_chrono<_CharT>;
+
+ _LIBCPP_HIDE_FROM_ABI constexpr auto parse(basic_format_parse_context<_CharT>& __parse_ctx)
+ -> decltype(__parse_ctx.begin()) {
+ return _Base::__parse(__parse_ctx, __format_spec::__fields_chrono, __format_spec::__flags::__month);
+ }
+};
+
+template <__fmt_char_type _CharT>
+struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<chrono::year, _CharT>
+ : public __formatter_chrono<_CharT> {
+public:
+ using _Base = __formatter_chrono<_CharT>;
+
+ _LIBCPP_HIDE_FROM_ABI constexpr auto parse(basic_format_parse_context<_CharT>& __parse_ctx)
+ -> decltype(__parse_ctx.begin()) {
+ return _Base::__parse(__parse_ctx, __format_spec::__fields_chrono, __format_spec::__flags::__year);
+ }
+};
+
+template <__fmt_char_type _CharT>
+struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<chrono::weekday, _CharT>
+ : public __formatter_chrono<_CharT> {
+public:
+ using _Base = __formatter_chrono<_CharT>;
+
+ _LIBCPP_HIDE_FROM_ABI constexpr auto parse(basic_format_parse_context<_CharT>& __parse_ctx)
+ -> decltype(__parse_ctx.begin()) {
+ return _Base::__parse(__parse_ctx, __format_spec::__fields_chrono, __format_spec::__flags::__weekday);
+ }
+};
+
+#endif // if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___CHRONO_FORMATTER_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/hh_mm_ss.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/hh_mm_ss.h
index 6b3c5c09e6..fde005d097 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/hh_mm_ss.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/hh_mm_ss.h
@@ -57,33 +57,33 @@ public:
_LIBCPP_HIDE_FROM_ABI constexpr hh_mm_ss() noexcept : hh_mm_ss{_Duration::zero()} {}
_LIBCPP_HIDE_FROM_ABI constexpr explicit hh_mm_ss(_Duration __d) noexcept :
- __is_neg(__d < _Duration(0)),
- __h(duration_cast<chrono::hours> (abs(__d))),
- __m(duration_cast<chrono::minutes>(abs(__d) - hours())),
- __s(duration_cast<chrono::seconds>(abs(__d) - hours() - minutes())),
- __f(duration_cast<precision> (abs(__d) - hours() - minutes() - seconds()))
+ __is_neg_(__d < _Duration(0)),
+ __h_(duration_cast<chrono::hours> (abs(__d))),
+ __m_(duration_cast<chrono::minutes>(abs(__d) - hours())),
+ __s_(duration_cast<chrono::seconds>(abs(__d) - hours() - minutes())),
+ __f_(duration_cast<precision> (abs(__d) - hours() - minutes() - seconds()))
{}
- _LIBCPP_HIDE_FROM_ABI constexpr bool is_negative() const noexcept { return __is_neg; }
- _LIBCPP_HIDE_FROM_ABI constexpr chrono::hours hours() const noexcept { return __h; }
- _LIBCPP_HIDE_FROM_ABI constexpr chrono::minutes minutes() const noexcept { return __m; }
- _LIBCPP_HIDE_FROM_ABI constexpr chrono::seconds seconds() const noexcept { return __s; }
- _LIBCPP_HIDE_FROM_ABI constexpr precision subseconds() const noexcept { return __f; }
+ _LIBCPP_HIDE_FROM_ABI constexpr bool is_negative() const noexcept { return __is_neg_; }
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::hours hours() const noexcept { return __h_; }
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::minutes minutes() const noexcept { return __m_; }
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::seconds seconds() const noexcept { return __s_; }
+ _LIBCPP_HIDE_FROM_ABI constexpr precision subseconds() const noexcept { return __f_; }
_LIBCPP_HIDE_FROM_ABI constexpr precision to_duration() const noexcept
{
- auto __dur = __h + __m + __s + __f;
- return __is_neg ? -__dur : __dur;
+ auto __dur = __h_ + __m_ + __s_ + __f_;
+ return __is_neg_ ? -__dur : __dur;
}
_LIBCPP_HIDE_FROM_ABI constexpr explicit operator precision() const noexcept { return to_duration(); }
private:
- bool __is_neg;
- chrono::hours __h;
- chrono::minutes __m;
- chrono::seconds __s;
- precision __f;
+ bool __is_neg_;
+ chrono::hours __h_;
+ chrono::minutes __m_;
+ chrono::seconds __s_;
+ precision __f_;
};
_LIBCPP_HIDE_FROM_ABI constexpr bool is_am(const hours& __h) noexcept { return __h >= hours( 0) && __h < hours(12); }
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/month.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/month.h
index 5aeb5b3971..e929f24884 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/month.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/month.h
@@ -12,6 +12,7 @@
#include <__chrono/duration.h>
#include <__config>
+#include <compare>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -26,18 +27,18 @@ namespace chrono
class month {
private:
- unsigned char __m;
+ unsigned char __m_;
public:
_LIBCPP_HIDE_FROM_ABI month() = default;
- _LIBCPP_HIDE_FROM_ABI explicit inline constexpr month(unsigned __val) noexcept : __m(static_cast<unsigned char>(__val)) {}
- _LIBCPP_HIDE_FROM_ABI inline constexpr month& operator++() noexcept { ++__m; return *this; }
+ _LIBCPP_HIDE_FROM_ABI explicit inline constexpr month(unsigned __val) noexcept : __m_(static_cast<unsigned char>(__val)) {}
+ _LIBCPP_HIDE_FROM_ABI inline constexpr month& operator++() noexcept { ++__m_; return *this; }
_LIBCPP_HIDE_FROM_ABI inline constexpr month operator++(int) noexcept { month __tmp = *this; ++(*this); return __tmp; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr month& operator--() noexcept { --__m; return *this; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr month& operator--() noexcept { --__m_; return *this; }
_LIBCPP_HIDE_FROM_ABI inline constexpr month operator--(int) noexcept { month __tmp = *this; --(*this); return __tmp; }
_LIBCPP_HIDE_FROM_ABI constexpr month& operator+=(const months& __m1) noexcept;
_LIBCPP_HIDE_FROM_ABI constexpr month& operator-=(const months& __m1) noexcept;
- _LIBCPP_HIDE_FROM_ABI explicit inline constexpr operator unsigned() const noexcept { return __m; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __m >= 1 && __m <= 12; }
+ _LIBCPP_HIDE_FROM_ABI explicit inline constexpr operator unsigned() const noexcept { return __m_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __m_ >= 1 && __m_ <= 12; }
};
@@ -45,25 +46,9 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr
bool operator==(const month& __lhs, const month& __rhs) noexcept
{ return static_cast<unsigned>(__lhs) == static_cast<unsigned>(__rhs); }
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator!=(const month& __lhs, const month& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator< (const month& __lhs, const month& __rhs) noexcept
-{ return static_cast<unsigned>(__lhs) < static_cast<unsigned>(__rhs); }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator> (const month& __lhs, const month& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator<=(const month& __lhs, const month& __rhs) noexcept
-{ return !(__rhs < __lhs); }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator>=(const month& __lhs, const month& __rhs) noexcept
-{ return !(__lhs < __rhs); }
+_LIBCPP_HIDE_FROM_ABI constexpr strong_ordering operator<=>(const month& __lhs, const month& __rhs) noexcept {
+ return static_cast<unsigned>(__lhs) <=> static_cast<unsigned>(__rhs);
+}
_LIBCPP_HIDE_FROM_ABI inline constexpr
month operator+ (const month& __lhs, const months& __rhs) noexcept
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/month_weekday.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/month_weekday.h
index 2700513970..01cdf76d84 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/month_weekday.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/month_weekday.h
@@ -27,14 +27,14 @@ namespace chrono
class month_weekday {
private:
- chrono::month __m;
- chrono::weekday_indexed __wdi;
+ chrono::month __m_;
+ chrono::weekday_indexed __wdi_;
public:
_LIBCPP_HIDE_FROM_ABI constexpr month_weekday(const chrono::month& __mval, const chrono::weekday_indexed& __wdival) noexcept
- : __m{__mval}, __wdi{__wdival} {}
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday_indexed weekday_indexed() const noexcept { return __wdi; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __m.ok() && __wdi.ok(); }
+ : __m_{__mval}, __wdi_{__wdival} {}
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday_indexed weekday_indexed() const noexcept { return __wdi_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __m_.ok() && __wdi_.ok(); }
};
_LIBCPP_HIDE_FROM_ABI inline constexpr
@@ -63,14 +63,14 @@ month_weekday operator/(const weekday_indexed& __lhs, int __rhs) noexcept
class month_weekday_last {
- chrono::month __m;
- chrono::weekday_last __wdl;
+ chrono::month __m_;
+ chrono::weekday_last __wdl_;
public:
_LIBCPP_HIDE_FROM_ABI constexpr month_weekday_last(const chrono::month& __mval, const chrono::weekday_last& __wdlval) noexcept
- : __m{__mval}, __wdl{__wdlval} {}
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday_last weekday_last() const noexcept { return __wdl; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __m.ok() && __wdl.ok(); }
+ : __m_{__mval}, __wdl_{__wdlval} {}
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday_last weekday_last() const noexcept { return __wdl_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __m_.ok() && __wdl_.ok(); }
};
_LIBCPP_HIDE_FROM_ABI inline constexpr
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/monthday.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/monthday.h
index 485f0d4299..c0ee3e4a94 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/monthday.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/monthday.h
@@ -14,6 +14,7 @@
#include <__chrono/day.h>
#include <__chrono/month.h>
#include <__config>
+#include <compare>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -28,26 +29,26 @@ namespace chrono
class month_day {
private:
- chrono::month __m;
- chrono::day __d;
+ chrono::month __m_;
+ chrono::day __d_;
public:
_LIBCPP_HIDE_FROM_ABI month_day() = default;
_LIBCPP_HIDE_FROM_ABI constexpr month_day(const chrono::month& __mval, const chrono::day& __dval) noexcept
- : __m{__mval}, __d{__dval} {}
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::day day() const noexcept { return __d; }
+ : __m_{__mval}, __d_{__dval} {}
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::day day() const noexcept { return __d_; }
_LIBCPP_HIDE_FROM_ABI constexpr bool ok() const noexcept;
};
_LIBCPP_HIDE_FROM_ABI inline constexpr
bool month_day::ok() const noexcept
{
- if (!__m.ok()) return false;
- const unsigned __dval = static_cast<unsigned>(__d);
+ if (!__m_.ok()) return false;
+ const unsigned __dval = static_cast<unsigned>(__d_);
if (__dval < 1 || __dval > 31) return false;
if (__dval <= 29) return true;
// Now we've got either 30 or 31
- const unsigned __mval = static_cast<unsigned>(__m);
+ const unsigned __mval = static_cast<unsigned>(__m_);
if (__mval == 2) return false;
if (__mval == 4 || __mval == 6 || __mval == 9 || __mval == 11)
return __dval == 30;
@@ -58,9 +59,11 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr
bool operator==(const month_day& __lhs, const month_day& __rhs) noexcept
{ return __lhs.month() == __rhs.month() && __lhs.day() == __rhs.day(); }
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator!=(const month_day& __lhs, const month_day& __rhs) noexcept
-{ return !(__lhs == __rhs); }
+_LIBCPP_HIDE_FROM_ABI constexpr strong_ordering operator<=>(const month_day& __lhs, const month_day& __rhs) noexcept {
+ if (auto __c = __lhs.month() <=> __rhs.month(); __c != 0)
+ return __c;
+ return __lhs.day() <=> __rhs.day();
+}
_LIBCPP_HIDE_FROM_ABI inline constexpr
month_day operator/(const month& __lhs, const day& __rhs) noexcept
@@ -82,58 +85,24 @@ _LIBCPP_HIDE_FROM_ABI constexpr
month_day operator/(const day& __lhs, int __rhs) noexcept
{ return month(__rhs) / __lhs; }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator< (const month_day& __lhs, const month_day& __rhs) noexcept
-{ return __lhs.month() != __rhs.month() ? __lhs.month() < __rhs.month() : __lhs.day() < __rhs.day(); }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator> (const month_day& __lhs, const month_day& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator<=(const month_day& __lhs, const month_day& __rhs) noexcept
-{ return !(__rhs < __lhs);}
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator>=(const month_day& __lhs, const month_day& __rhs) noexcept
-{ return !(__lhs < __rhs); }
-
-
-
class month_day_last {
private:
- chrono::month __m;
+ chrono::month __m_;
public:
_LIBCPP_HIDE_FROM_ABI explicit constexpr month_day_last(const chrono::month& __val) noexcept
- : __m{__val} {}
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __m.ok(); }
+ : __m_{__val} {}
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __m_.ok(); }
};
_LIBCPP_HIDE_FROM_ABI inline constexpr
bool operator==(const month_day_last& __lhs, const month_day_last& __rhs) noexcept
{ return __lhs.month() == __rhs.month(); }
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator!=(const month_day_last& __lhs, const month_day_last& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator< (const month_day_last& __lhs, const month_day_last& __rhs) noexcept
-{ return __lhs.month() < __rhs.month(); }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator> (const month_day_last& __lhs, const month_day_last& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator<=(const month_day_last& __lhs, const month_day_last& __rhs) noexcept
-{ return !(__rhs < __lhs);}
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator>=(const month_day_last& __lhs, const month_day_last& __rhs) noexcept
-{ return !(__lhs < __rhs); }
+_LIBCPP_HIDE_FROM_ABI constexpr strong_ordering
+operator<=>(const month_day_last& __lhs, const month_day_last& __rhs) noexcept {
+ return __lhs.month() <=> __rhs.month();
+}
_LIBCPP_HIDE_FROM_ABI inline constexpr
month_day_last operator/(const month& __lhs, last_spec) noexcept
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/ostream.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/ostream.h
new file mode 100644
index 0000000000..c48bd6a8b3
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/ostream.h
@@ -0,0 +1,145 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___CHRONO_OSTREAM_H
+#define _LIBCPP___CHRONO_OSTREAM_H
+
+#include <__chrono/day.h>
+#include <__chrono/duration.h>
+#include <__chrono/month.h>
+#include <__chrono/statically_widen.h>
+#include <__chrono/weekday.h>
+#include <__chrono/year.h>
+#include <__concepts/same_as.h>
+#include <__config>
+#include <__format/format_functions.h>
+#include <ostream>
+#include <ratio>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+
+namespace chrono {
+
+// Depending on the type the return is a const _CharT* or a basic_string<_CharT>
+template <class _CharT, class _Period>
+_LIBCPP_HIDE_FROM_ABI auto __units_suffix() {
+ // TODO FMT LWG issue the suffixes are always char and not STATICALLY-WIDEN'ed.
+ if constexpr (same_as<typename _Period::type, atto>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "as");
+ else if constexpr (same_as<typename _Period::type, femto>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "fs");
+ else if constexpr (same_as<typename _Period::type, pico>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "ps");
+ else if constexpr (same_as<typename _Period::type, nano>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "ns");
+ else if constexpr (same_as<typename _Period::type, micro>)
+# ifndef _LIBCPP_HAS_NO_UNICODE
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "\u00b5s");
+# else
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "us");
+# endif
+ else if constexpr (same_as<typename _Period::type, milli>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "ms");
+ else if constexpr (same_as<typename _Period::type, centi>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "cs");
+ else if constexpr (same_as<typename _Period::type, deci>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "ds");
+ else if constexpr (same_as<typename _Period::type, ratio<1>>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "s");
+ else if constexpr (same_as<typename _Period::type, deca>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "das");
+ else if constexpr (same_as<typename _Period::type, hecto>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "hs");
+ else if constexpr (same_as<typename _Period::type, kilo>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "ks");
+ else if constexpr (same_as<typename _Period::type, mega>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "Ms");
+ else if constexpr (same_as<typename _Period::type, giga>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "Gs");
+ else if constexpr (same_as<typename _Period::type, tera>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "Ts");
+ else if constexpr (same_as<typename _Period::type, peta>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "Ps");
+ else if constexpr (same_as<typename _Period::type, exa>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "Es");
+ else if constexpr (same_as<typename _Period::type, ratio<60>>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "min");
+ else if constexpr (same_as<typename _Period::type, ratio<3600>>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "h");
+ else if constexpr (same_as<typename _Period::type, ratio<86400>>)
+ return _LIBCPP_STATICALLY_WIDEN(_CharT, "d");
+ else if constexpr (_Period::den == 1)
+ return std::format(_LIBCPP_STATICALLY_WIDEN(_CharT, "[{}]s"), _Period::num);
+ else
+ return std::format(_LIBCPP_STATICALLY_WIDEN(_CharT, "[{}/{}]s"), _Period::num, _Period::den);
+}
+
+template <class _CharT, class _Traits, class _Rep, class _Period>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT basic_ostream<_CharT, _Traits>&
+operator<<(basic_ostream<_CharT, _Traits>& __os, const duration<_Rep, _Period>& __d) {
+ basic_ostringstream<_CharT, _Traits> __s;
+ __s.flags(__os.flags());
+ __s.imbue(__os.getloc());
+ __s.precision(__os.precision());
+ __s << __d.count() << chrono::__units_suffix<_CharT, _Period>();
+ return __os << __s.str();
+}
+
+template <class _CharT, class _Traits>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT basic_ostream<_CharT, _Traits>&
+operator<<(basic_ostream<_CharT, _Traits>& __os, const day& __d) {
+ return __os
+ << (__d.ok()
+ ? std::format(_LIBCPP_STATICALLY_WIDEN(_CharT, "{:%d}"), __d)
+ // Note this error differs from the wording of the Standard. The
+ // Standard wording doesn't work well on AIX or Windows. There
+ // the formatted day seems to be either modulo 100 or completely
+ // omitted. Judging by the wording this is valid.
+ // TODO FMT Write a paper of file an LWG issue.
+ : std::format(_LIBCPP_STATICALLY_WIDEN(_CharT, "{:02} is not a valid day"), static_cast<unsigned>(__d)));
+}
+
+template <class _CharT, class _Traits>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT basic_ostream<_CharT, _Traits>&
+operator<<(basic_ostream<_CharT, _Traits>& __os, const month& __m) {
+ return __os << (__m.ok() ? std::format(__os.getloc(), _LIBCPP_STATICALLY_WIDEN(_CharT, "{:L%b}"), __m)
+ : std::format(__os.getloc(),
+ _LIBCPP_STATICALLY_WIDEN(_CharT, "{} is not a valid month"),
+ static_cast<unsigned>(__m))); // TODO FMT Standard mandated locale isn't used.
+}
+
+template <class _CharT, class _Traits>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT basic_ostream<_CharT, _Traits>&
+operator<<(basic_ostream<_CharT, _Traits>& __os, const year& __y) {
+ return __os << (__y.ok() ? std::format(_LIBCPP_STATICALLY_WIDEN(_CharT, "{:%Y}"), __y)
+ : std::format(_LIBCPP_STATICALLY_WIDEN(_CharT, "{:%Y} is not a valid year"), __y));
+}
+
+template <class _CharT, class _Traits>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT basic_ostream<_CharT, _Traits>&
+operator<<(basic_ostream<_CharT, _Traits>& __os, const weekday& __wd) {
+ return __os << (__wd.ok() ? std::format(__os.getloc(), _LIBCPP_STATICALLY_WIDEN(_CharT, "{:L%a}"), __wd)
+ : std::format(__os.getloc(), // TODO FMT Standard mandated locale isn't used.
+ _LIBCPP_STATICALLY_WIDEN(_CharT, "{} is not a valid weekday"),
+ static_cast<unsigned>(__wd.c_encoding())));
+}
+
+} // namespace chrono
+
+#endif //if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___CHRONO_OSTREAM_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/parser_std_format_spec.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/parser_std_format_spec.h
new file mode 100644
index 0000000000..cdf7b9b15f
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/parser_std_format_spec.h
@@ -0,0 +1,403 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___CHRONO_PARSER_STD_FORMAT_SPEC_H
+#define _LIBCPP___CHRONO_PARSER_STD_FORMAT_SPEC_H
+
+#include <__config>
+#include <__format/concepts.h>
+#include <__format/format_error.h>
+#include <__format/format_parse_context.h>
+#include <__format/formatter_string.h>
+#include <__format/parser_std_format_spec.h>
+#include <string_view>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+
+namespace __format_spec {
+
+// By not placing this constant in the formatter class it's not duplicated for char and wchar_t
+inline constexpr __fields __fields_chrono_fractional{
+ .__precision_ = true, .__locale_specific_form_ = true, .__type_ = false};
+inline constexpr __fields __fields_chrono{.__locale_specific_form_ = true, .__type_ = false};
+
+/// Flags available or required in a chrono type.
+///
+/// The caller of the chrono formatter lists the types it has available and the
+/// validation tests whether the requested type spec (e.g. %M) is available in
+/// the formatter.
+/// When the type in the chrono-format-spec isn't present in the data a
+/// \ref format_error is thrown.
+enum class __flags {
+ __second = 0x1,
+ __minute = 0x2,
+ __hour = 0x4,
+ __time = __hour | __minute | __second,
+
+ __day = 0x8,
+ __month = 0x10,
+ __year = 0x20,
+
+ __weekday = 0x40,
+
+ __month_day = __day | __month,
+ __month_weekday = __weekday | __month,
+ __year_month = __month | __year,
+ __date = __day | __month | __year | __weekday,
+
+ __date_time = __date | __time,
+
+ __duration = 0x80 | __time,
+
+ __time_zone = 0x100,
+
+ __clock = __date_time | __time_zone
+};
+
+_LIBCPP_HIDE_FROM_ABI constexpr __flags operator&(__flags __lhs, __flags __rhs) {
+ return static_cast<__flags>(static_cast<unsigned>(__lhs) & static_cast<unsigned>(__rhs));
+}
+
+_LIBCPP_HIDE_FROM_ABI constexpr void __validate_second(__flags __flags) {
+ if ((__flags & __flags::__second) != __flags::__second)
+ std::__throw_format_error("The supplied date time doesn't contain a second");
+}
+
+_LIBCPP_HIDE_FROM_ABI constexpr void __validate_minute(__flags __flags) {
+ if ((__flags & __flags::__minute) != __flags::__minute)
+ std::__throw_format_error("The supplied date time doesn't contain a minute");
+}
+
+_LIBCPP_HIDE_FROM_ABI constexpr void __validate_hour(__flags __flags) {
+ if ((__flags & __flags::__hour) != __flags::__hour)
+ std::__throw_format_error("The supplied date time doesn't contain an hour");
+}
+
+_LIBCPP_HIDE_FROM_ABI constexpr void __validate_time(__flags __flags) {
+ if ((__flags & __flags::__time) != __flags::__time)
+ std::__throw_format_error("The supplied date time doesn't contain a time");
+}
+
+_LIBCPP_HIDE_FROM_ABI constexpr void __validate_day(__flags __flags) {
+ if ((__flags & __flags::__day) != __flags::__day)
+ std::__throw_format_error("The supplied date time doesn't contain a day");
+}
+
+_LIBCPP_HIDE_FROM_ABI constexpr void __validate_month(__flags __flags) {
+ if ((__flags & __flags::__month) != __flags::__month)
+ std::__throw_format_error("The supplied date time doesn't contain a month");
+}
+
+_LIBCPP_HIDE_FROM_ABI constexpr void __validate_year(__flags __flags) {
+ if ((__flags & __flags::__year) != __flags::__year)
+ std::__throw_format_error("The supplied date time doesn't contain a year");
+}
+
+_LIBCPP_HIDE_FROM_ABI constexpr void __validate_date(__flags __flags) {
+ if ((__flags & __flags::__date) != __flags::__date)
+ std::__throw_format_error("The supplied date time doesn't contain a date");
+}
+
+_LIBCPP_HIDE_FROM_ABI constexpr void __validate_date_or_duration(__flags __flags) {
+ if (((__flags & __flags::__date) != __flags::__date) && ((__flags & __flags::__duration) != __flags::__duration))
+ std::__throw_format_error("The supplied date time doesn't contain a date or duration");
+}
+
+_LIBCPP_HIDE_FROM_ABI constexpr void __validate_date_time(__flags __flags) {
+ if ((__flags & __flags::__date_time) != __flags::__date_time)
+ std::__throw_format_error("The supplied date time doesn't contain a date and time");
+}
+
+_LIBCPP_HIDE_FROM_ABI constexpr void __validate_weekday(__flags __flags) {
+ if ((__flags & __flags::__weekday) != __flags::__weekday)
+ std::__throw_format_error("The supplied date time doesn't contain a weekday");
+}
+
+_LIBCPP_HIDE_FROM_ABI constexpr void __validate_duration(__flags __flags) {
+ if ((__flags & __flags::__duration) != __flags::__duration)
+ std::__throw_format_error("The supplied date time doesn't contain a duration");
+}
+
+_LIBCPP_HIDE_FROM_ABI constexpr void __validate_time_zone(__flags __flags) {
+ if ((__flags & __flags::__time_zone) != __flags::__time_zone)
+ std::__throw_format_error("The supplied date time doesn't contain a time zone");
+}
+
+template <class _CharT>
+class _LIBCPP_TEMPLATE_VIS __parser_chrono {
+public:
+ _LIBCPP_HIDE_FROM_ABI constexpr auto
+ __parse(basic_format_parse_context<_CharT>& __parse_ctx, __fields __fields, __flags __flags)
+ -> decltype(__parse_ctx.begin()) {
+ const _CharT* __begin = __parser_.__parse(__parse_ctx, __fields);
+ const _CharT* __end = __parse_ctx.end();
+ if (__begin == __end)
+ return __begin;
+
+ const _CharT* __last = __parse_chrono_specs(__begin, __end, __flags);
+ __chrono_specs_ = basic_string_view<_CharT>{__begin, __last};
+
+ return __last;
+ }
+
+ __parser<_CharT> __parser_;
+ basic_string_view<_CharT> __chrono_specs_;
+
+private:
+ _LIBCPP_HIDE_FROM_ABI constexpr const _CharT*
+ __parse_chrono_specs(const _CharT* __begin, const _CharT* __end, __flags __flags) {
+ _LIBCPP_ASSERT(__begin != __end,
+ "When called with an empty input the function will cause "
+ "undefined behavior by evaluating data not in the input");
+
+ if (*__begin != _CharT('%') && *__begin != _CharT('}'))
+ std::__throw_format_error("Expected '%' or '}' in the chrono format-string");
+
+ do {
+ switch (*__begin) {
+ case _CharT('{'):
+ std::__throw_format_error("The chrono-specs contains a '{'");
+
+ case _CharT('}'):
+ return __begin;
+
+ case _CharT('%'):
+ __parse_conversion_spec(__begin, __end, __flags);
+ [[fallthrough]];
+
+ default:
+ // All other literals
+ ++__begin;
+ }
+
+ } while (__begin != __end && *__begin != _CharT('}'));
+
+ return __begin;
+ }
+
+ /// \pre *__begin == '%'
+ /// \post __begin points at the end parsed conversion-spec
+ _LIBCPP_HIDE_FROM_ABI constexpr void
+ __parse_conversion_spec(const _CharT*& __begin, const _CharT* __end, __flags __flags) {
+ ++__begin;
+ if (__begin == __end)
+ std::__throw_format_error("End of input while parsing the modifier chrono conversion-spec");
+
+ switch (*__begin) {
+ case _CharT('n'):
+ case _CharT('t'):
+ case _CharT('%'):
+ break;
+
+ case _CharT('S'):
+ __format_spec::__validate_second(__flags);
+ break;
+
+ case _CharT('M'):
+ __format_spec::__validate_minute(__flags);
+ break;
+
+ case _CharT('p'): // TODO FMT does the formater require an hour or a time?
+ case _CharT('H'):
+ case _CharT('I'):
+ __validate_hour(__flags);
+ break;
+
+ case _CharT('r'):
+ case _CharT('R'):
+ case _CharT('T'):
+ case _CharT('X'):
+ __format_spec::__validate_time(__flags);
+ break;
+
+ case _CharT('d'):
+ case _CharT('e'):
+ __format_spec::__validate_day(__flags);
+ break;
+
+ case _CharT('b'):
+ case _CharT('h'):
+ case _CharT('B'):
+ __parser_.__month_name_ = true;
+ [[fallthrough]];
+ case _CharT('m'):
+ __format_spec::__validate_month(__flags);
+ break;
+
+ case _CharT('y'):
+ case _CharT('C'):
+ case _CharT('Y'):
+ __format_spec::__validate_year(__flags);
+ break;
+
+ case _CharT('j'):
+ __format_spec::__validate_date_or_duration(__flags);
+ break;
+
+ case _CharT('g'):
+ case _CharT('x'):
+ case _CharT('D'):
+ case _CharT('F'):
+ case _CharT('G'):
+ case _CharT('U'):
+ case _CharT('V'):
+ case _CharT('W'):
+ __format_spec::__validate_date(__flags);
+ break;
+
+ case _CharT('c'):
+ __format_spec::__validate_date_time(__flags);
+ break;
+
+ case _CharT('a'):
+ case _CharT('A'):
+ __parser_.__weekday_name_ = true;
+ [[fallthrough]];
+ case _CharT('u'):
+ case _CharT('w'):
+ __format_spec::__validate_weekday(__flags);
+ break;
+
+ case _CharT('q'):
+ case _CharT('Q'):
+ __format_spec::__validate_duration(__flags);
+ break;
+
+ case _CharT('E'):
+ __parse_modifier_E(__begin, __end, __flags);
+ break;
+
+ case _CharT('O'):
+ __parse_modifier_O(__begin, __end, __flags);
+ break;
+
+ case _CharT('z'):
+ case _CharT('Z'):
+ // Currently there's no time zone information. However some clocks have a
+ // hard-coded "time zone", for these clocks the information can be used.
+ // TODO FMT implement time zones.
+ __format_spec::__validate_time_zone(__flags);
+ break;
+
+ default: // unknown type;
+ std::__throw_format_error("The date time type specifier is invalid");
+ }
+ }
+
+ /// \pre *__begin == 'E'
+ /// \post __begin is incremented by one.
+ _LIBCPP_HIDE_FROM_ABI constexpr void
+ __parse_modifier_E(const _CharT*& __begin, const _CharT* __end, __flags __flags) {
+ ++__begin;
+ if (__begin == __end)
+ std::__throw_format_error("End of input while parsing the modifier E");
+
+ switch (*__begin) {
+ case _CharT('X'):
+ __format_spec::__validate_time(__flags);
+ break;
+
+ case _CharT('y'):
+ case _CharT('C'):
+ case _CharT('Y'):
+ __format_spec::__validate_year(__flags);
+ break;
+
+ case _CharT('x'):
+ __format_spec::__validate_date(__flags);
+ break;
+
+ case _CharT('c'):
+ __format_spec::__validate_date_time(__flags);
+ break;
+
+ case _CharT('z'):
+ // Currently there's no time zone information. However some clocks have a
+ // hard-coded "time zone", for these clocks the information can be used.
+ // TODO FMT implement time zones.
+ __format_spec::__validate_time_zone(__flags);
+ break;
+
+ default:
+ std::__throw_format_error("The date time type specifier for modifier E is invalid");
+ }
+ }
+
+ /// \pre *__begin == 'O'
+ /// \post __begin is incremented by one.
+ _LIBCPP_HIDE_FROM_ABI constexpr void
+ __parse_modifier_O(const _CharT*& __begin, const _CharT* __end, __flags __flags) {
+ ++__begin;
+ if (__begin == __end)
+ std::__throw_format_error("End of input while parsing the modifier O");
+
+ switch (*__begin) {
+ case _CharT('S'):
+ __format_spec::__validate_second(__flags);
+ break;
+
+ case _CharT('M'):
+ __format_spec::__validate_minute(__flags);
+ break;
+
+ case _CharT('I'):
+ case _CharT('H'):
+ __format_spec::__validate_hour(__flags);
+ break;
+
+ case _CharT('d'):
+ case _CharT('e'):
+ __format_spec::__validate_day(__flags);
+ break;
+
+ case _CharT('m'):
+ __format_spec::__validate_month(__flags);
+ break;
+
+ case _CharT('y'):
+ __format_spec::__validate_year(__flags);
+ break;
+
+ case _CharT('U'):
+ case _CharT('V'):
+ case _CharT('W'):
+ __format_spec::__validate_date(__flags);
+ break;
+
+ case _CharT('u'):
+ case _CharT('w'):
+ __format_spec::__validate_weekday(__flags);
+ break;
+
+ case _CharT('z'):
+ // Currently there's no time zone information. However some clocks have a
+ // hard-coded "time zone", for these clocks the information can be used.
+ // TODO FMT implement time zones.
+ __format_spec::__validate_time_zone(__flags);
+ break;
+
+ default:
+ std::__throw_format_error("The date time type specifier for modifier O is invalid");
+ }
+ }
+};
+
+} // namespace __format_spec
+
+#endif //_LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___CHRONO_PARSER_STD_FORMAT_SPEC_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/statically_widen.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/statically_widen.h
new file mode 100644
index 0000000000..dd12c3f502
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/statically_widen.h
@@ -0,0 +1,52 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___CHRONO_STATICALLY_WIDEN_H
+#define _LIBCPP___CHRONO_STATICALLY_WIDEN_H
+
+// Implements the STATICALLY-WIDEN exposition-only function. ([time.general]/2)
+
+#include <__concepts/same_as.h>
+#include <__config>
+#include <__format/concepts.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 17
+
+# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <__fmt_char_type _CharT>
+consteval const _CharT* __statically_widen(const char* __str, const wchar_t* __wstr) {
+ if constexpr (same_as<_CharT, char>)
+ return __str;
+ else
+ return __wstr;
+}
+# define _LIBCPP_STATICALLY_WIDEN(_CharT, __str) ::std::__statically_widen<_CharT>(__str, L##__str)
+# else // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+
+// Without this indirection the unit test test/libcxx/modules_include.sh.cpp
+// fails for the CI build "No wide characters". This seems like a bug.
+// TODO FMT investigate why this is needed.
+template <__fmt_char_type _CharT>
+consteval const _CharT* __statically_widen(const char* __str) {
+ return __str;
+}
+# define _LIBCPP_STATICALLY_WIDEN(_CharT, __str) ::std::__statically_widen<_CharT>(__str)
+# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+
+#endif //if _LIBCPP_STD_VER > 17
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___CHRONO_STATICALLY_WIDEN_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/steady_clock.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/steady_clock.h
index 657e5eef6c..ba83351738 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/steady_clock.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/steady_clock.h
@@ -31,7 +31,7 @@ public:
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<steady_clock, duration> time_point;
- static _LIBCPP_CONSTEXPR_AFTER_CXX11 const bool is_steady = true;
+ static _LIBCPP_CONSTEXPR_SINCE_CXX14 const bool is_steady = true;
static time_point now() _NOEXCEPT;
};
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/system_clock.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/system_clock.h
index 2922b78a74..331db46801 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/system_clock.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/system_clock.h
@@ -31,7 +31,7 @@ public:
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<system_clock> time_point;
- static _LIBCPP_CONSTEXPR_AFTER_CXX11 const bool is_steady = false;
+ static _LIBCPP_CONSTEXPR_SINCE_CXX14 const bool is_steady = false;
static time_point now() _NOEXCEPT;
static time_t to_time_t (const time_point& __t) _NOEXCEPT;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/time_point.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/time_point.h
index 63d67d77dd..cc9c462c9d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/time_point.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/time_point.h
@@ -41,12 +41,12 @@ private:
duration __d_;
public:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 time_point() : __d_(duration::zero()) {}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 explicit time_point(const duration& __d) : __d_(__d) {}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 time_point() : __d_(duration::zero()) {}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit time_point(const duration& __d) : __d_(__d) {}
// conversions
template <class _Duration2>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
time_point(const time_point<clock, _Duration2>& __t,
typename enable_if
<
@@ -56,12 +56,12 @@ public:
// observer
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 duration time_since_epoch() const {return __d_;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 duration time_since_epoch() const {return __d_;}
// arithmetic
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 time_point& operator+=(const duration& __d) {__d_ += __d; return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 time_point& operator-=(const duration& __d) {__d_ -= __d; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 time_point& operator+=(const duration& __d) {__d_ += __d; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 time_point& operator-=(const duration& __d) {__d_ -= __d; return *this;}
// special values
@@ -81,7 +81,7 @@ struct _LIBCPP_TEMPLATE_VIS common_type<chrono::time_point<_Clock, _Duration1>,
namespace chrono {
template <class _ToDuration, class _Clock, class _Duration>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
time_point<_Clock, _ToDuration>
time_point_cast(const time_point<_Clock, _Duration>& __t)
{
@@ -141,7 +141,7 @@ abs(duration<_Rep, _Period> __d)
// time_point ==
template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator==(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
@@ -151,7 +151,7 @@ operator==(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
// time_point !=
template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator!=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
@@ -161,7 +161,7 @@ operator!=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
// time_point <
template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator<(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
@@ -171,7 +171,7 @@ operator<(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
// time_point >
template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator>(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
@@ -181,7 +181,7 @@ operator>(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
// time_point <=
template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator<=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
@@ -191,7 +191,7 @@ operator<=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
// time_point >=
template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator>=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
@@ -201,7 +201,7 @@ operator>=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
// time_point operator+(time_point x, duration y);
template <class _Clock, class _Duration1, class _Rep2, class _Period2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
operator+(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
{
@@ -212,7 +212,7 @@ operator+(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Pe
// time_point operator+(duration x, time_point y);
template <class _Rep1, class _Period1, class _Clock, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
time_point<_Clock, typename common_type<duration<_Rep1, _Period1>, _Duration2>::type>
operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
@@ -222,7 +222,7 @@ operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Dura
// time_point operator-(time_point x, duration y);
template <class _Clock, class _Duration1, class _Rep2, class _Period2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
operator-(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
{
@@ -233,7 +233,7 @@ operator-(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Pe
// duration operator-(time_point x, time_point y);
template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename common_type<_Duration1, _Duration2>::type
operator-(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/weekday.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/weekday.h
index bad6781110..e0bc8a4cae 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/weekday.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/weekday.h
@@ -32,25 +32,25 @@ class weekday_last;
class weekday {
private:
- unsigned char __wd;
+ unsigned char __wd_;
_LIBCPP_HIDE_FROM_ABI static constexpr unsigned char __weekday_from_days(int __days) noexcept;
public:
_LIBCPP_HIDE_FROM_ABI weekday() = default;
- _LIBCPP_HIDE_FROM_ABI inline explicit constexpr weekday(unsigned __val) noexcept : __wd(static_cast<unsigned char>(__val == 7 ? 0 : __val)) {}
+ _LIBCPP_HIDE_FROM_ABI inline explicit constexpr weekday(unsigned __val) noexcept : __wd_(static_cast<unsigned char>(__val == 7 ? 0 : __val)) {}
_LIBCPP_HIDE_FROM_ABI inline constexpr weekday(const sys_days& __sysd) noexcept
- : __wd(__weekday_from_days(__sysd.time_since_epoch().count())) {}
+ : __wd_(__weekday_from_days(__sysd.time_since_epoch().count())) {}
_LIBCPP_HIDE_FROM_ABI inline explicit constexpr weekday(const local_days& __locd) noexcept
- : __wd(__weekday_from_days(__locd.time_since_epoch().count())) {}
+ : __wd_(__weekday_from_days(__locd.time_since_epoch().count())) {}
- _LIBCPP_HIDE_FROM_ABI inline constexpr weekday& operator++() noexcept { __wd = (__wd == 6 ? 0 : __wd + 1); return *this; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr weekday& operator++() noexcept { __wd_ = (__wd_ == 6 ? 0 : __wd_ + 1); return *this; }
_LIBCPP_HIDE_FROM_ABI inline constexpr weekday operator++(int) noexcept { weekday __tmp = *this; ++(*this); return __tmp; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr weekday& operator--() noexcept { __wd = (__wd == 0 ? 6 : __wd - 1); return *this; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr weekday& operator--() noexcept { __wd_ = (__wd_ == 0 ? 6 : __wd_ - 1); return *this; }
_LIBCPP_HIDE_FROM_ABI inline constexpr weekday operator--(int) noexcept { weekday __tmp = *this; --(*this); return __tmp; }
_LIBCPP_HIDE_FROM_ABI constexpr weekday& operator+=(const days& __dd) noexcept;
_LIBCPP_HIDE_FROM_ABI constexpr weekday& operator-=(const days& __dd) noexcept;
- _LIBCPP_HIDE_FROM_ABI inline constexpr unsigned c_encoding() const noexcept { return __wd; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr unsigned iso_encoding() const noexcept { return __wd == 0u ? 7 : __wd; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __wd <= 6; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr unsigned c_encoding() const noexcept { return __wd_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr unsigned iso_encoding() const noexcept { return __wd_ == 0u ? 7 : __wd_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __wd_ <= 6; }
_LIBCPP_HIDE_FROM_ABI constexpr weekday_indexed operator[](unsigned __index) const noexcept;
_LIBCPP_HIDE_FROM_ABI constexpr weekday_last operator[](last_spec) const noexcept;
};
@@ -123,15 +123,15 @@ weekday& weekday::operator-=(const days& __dd) noexcept
class weekday_indexed {
private:
- chrono::weekday __wd;
- unsigned char __idx;
+ chrono::weekday __wd_;
+ unsigned char __idx_;
public:
_LIBCPP_HIDE_FROM_ABI weekday_indexed() = default;
_LIBCPP_HIDE_FROM_ABI inline constexpr weekday_indexed(const chrono::weekday& __wdval, unsigned __idxval) noexcept
- : __wd{__wdval}, __idx(__idxval) {}
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday weekday() const noexcept { return __wd; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr unsigned index() const noexcept { return __idx; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __wd.ok() && __idx >= 1 && __idx <= 5; }
+ : __wd_{__wdval}, __idx_(__idxval) {}
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday weekday() const noexcept { return __wd_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr unsigned index() const noexcept { return __idx_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __wd_.ok() && __idx_ >= 1 && __idx_ <= 5; }
};
_LIBCPP_HIDE_FROM_ABI inline constexpr
@@ -145,12 +145,12 @@ bool operator!=(const weekday_indexed& __lhs, const weekday_indexed& __rhs) noex
class weekday_last {
private:
- chrono::weekday __wd;
+ chrono::weekday __wd_;
public:
_LIBCPP_HIDE_FROM_ABI explicit constexpr weekday_last(const chrono::weekday& __val) noexcept
- : __wd{__val} {}
- _LIBCPP_HIDE_FROM_ABI constexpr chrono::weekday weekday() const noexcept { return __wd; }
- _LIBCPP_HIDE_FROM_ABI constexpr bool ok() const noexcept { return __wd.ok(); }
+ : __wd_{__val} {}
+ _LIBCPP_HIDE_FROM_ABI constexpr chrono::weekday weekday() const noexcept { return __wd_; }
+ _LIBCPP_HIDE_FROM_ABI constexpr bool ok() const noexcept { return __wd_.ok(); }
};
_LIBCPP_HIDE_FROM_ABI inline constexpr
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/year.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/year.h
index c7f0027eba..79ee8a02b8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/year.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/year.h
@@ -12,6 +12,7 @@
#include <__chrono/duration.h>
#include <__config>
+#include <compare>
#include <limits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -30,22 +31,22 @@ namespace chrono
class year {
private:
- short __y;
+ short __y_;
public:
_LIBCPP_HIDE_FROM_ABI year() = default;
- _LIBCPP_HIDE_FROM_ABI explicit inline constexpr year(int __val) noexcept : __y(static_cast<short>(__val)) {}
+ _LIBCPP_HIDE_FROM_ABI explicit inline constexpr year(int __val) noexcept : __y_(static_cast<short>(__val)) {}
- _LIBCPP_HIDE_FROM_ABI inline constexpr year& operator++() noexcept { ++__y; return *this; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr year& operator++() noexcept { ++__y_; return *this; }
_LIBCPP_HIDE_FROM_ABI inline constexpr year operator++(int) noexcept { year __tmp = *this; ++(*this); return __tmp; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr year& operator--() noexcept { --__y; return *this; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr year& operator--() noexcept { --__y_; return *this; }
_LIBCPP_HIDE_FROM_ABI inline constexpr year operator--(int) noexcept { year __tmp = *this; --(*this); return __tmp; }
_LIBCPP_HIDE_FROM_ABI constexpr year& operator+=(const years& __dy) noexcept;
_LIBCPP_HIDE_FROM_ABI constexpr year& operator-=(const years& __dy) noexcept;
_LIBCPP_HIDE_FROM_ABI inline constexpr year operator+() const noexcept { return *this; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr year operator-() const noexcept { return year{-__y}; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr year operator-() const noexcept { return year{-__y_}; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr bool is_leap() const noexcept { return __y % 4 == 0 && (__y % 100 != 0 || __y % 400 == 0); }
- _LIBCPP_HIDE_FROM_ABI explicit inline constexpr operator int() const noexcept { return __y; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr bool is_leap() const noexcept { return __y_ % 4 == 0 && (__y_ % 100 != 0 || __y_ % 400 == 0); }
+ _LIBCPP_HIDE_FROM_ABI explicit inline constexpr operator int() const noexcept { return __y_; }
_LIBCPP_HIDE_FROM_ABI constexpr bool ok() const noexcept;
_LIBCPP_HIDE_FROM_ABI static inline constexpr year min() noexcept { return year{-32767}; }
_LIBCPP_HIDE_FROM_ABI static inline constexpr year max() noexcept { return year{ 32767}; }
@@ -56,25 +57,9 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr
bool operator==(const year& __lhs, const year& __rhs) noexcept
{ return static_cast<int>(__lhs) == static_cast<int>(__rhs); }
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator!=(const year& __lhs, const year& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator< (const year& __lhs, const year& __rhs) noexcept
-{ return static_cast<int>(__lhs) < static_cast<int>(__rhs); }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator> (const year& __lhs, const year& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator<=(const year& __lhs, const year& __rhs) noexcept
-{ return !(__rhs < __lhs); }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator>=(const year& __lhs, const year& __rhs) noexcept
-{ return !(__lhs < __rhs); }
+_LIBCPP_HIDE_FROM_ABI constexpr strong_ordering operator<=>(const year& __lhs, const year& __rhs) noexcept {
+ return static_cast<int>(__lhs) <=> static_cast<int>(__rhs);
+}
_LIBCPP_HIDE_FROM_ABI inline constexpr
year operator+ (const year& __lhs, const years& __rhs) noexcept
@@ -102,8 +87,8 @@ year& year::operator-=(const years& __dy) noexcept
{ *this = *this - __dy; return *this; }
_LIBCPP_HIDE_FROM_ABI constexpr bool year::ok() const noexcept {
- static_assert(static_cast<int>(std::numeric_limits<decltype(__y)>::max()) == static_cast<int>(max()));
- return static_cast<int>(min()) <= __y;
+ static_assert(static_cast<int>(std::numeric_limits<decltype(__y_)>::max()) == static_cast<int>(max()));
+ return static_cast<int>(min()) <= __y_;
}
} // namespace chrono
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/year_month.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/year_month.h
index 51b19caa11..9f1e65c8c8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/year_month.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/year_month.h
@@ -14,6 +14,7 @@
#include <__chrono/month.h>
#include <__chrono/year.h>
#include <__config>
+#include <compare>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -27,19 +28,19 @@ namespace chrono
{
class year_month {
- chrono::year __y;
- chrono::month __m;
+ chrono::year __y_;
+ chrono::month __m_;
public:
_LIBCPP_HIDE_FROM_ABI year_month() = default;
_LIBCPP_HIDE_FROM_ABI constexpr year_month(const chrono::year& __yval, const chrono::month& __mval) noexcept
- : __y{__yval}, __m{__mval} {}
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr year_month& operator+=(const months& __dm) noexcept { this->__m += __dm; return *this; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr year_month& operator-=(const months& __dm) noexcept { this->__m -= __dm; return *this; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr year_month& operator+=(const years& __dy) noexcept { this->__y += __dy; return *this; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr year_month& operator-=(const years& __dy) noexcept { this->__y -= __dy; return *this; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __y.ok() && __m.ok(); }
+ : __y_{__yval}, __m_{__mval} {}
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr year_month& operator+=(const months& __dm) noexcept { this->__m_ += __dm; return *this; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr year_month& operator-=(const months& __dm) noexcept { this->__m_ -= __dm; return *this; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr year_month& operator+=(const years& __dy) noexcept { this->__y_ += __dy; return *this; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr year_month& operator-=(const years& __dy) noexcept { this->__y_ -= __dy; return *this; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __y_.ok() && __m_.ok(); }
};
_LIBCPP_HIDE_FROM_ABI inline constexpr
@@ -52,25 +53,11 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr
bool operator==(const year_month& __lhs, const year_month& __rhs) noexcept
{ return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month(); }
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator!=(const year_month& __lhs, const year_month& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator< (const year_month& __lhs, const year_month& __rhs) noexcept
-{ return __lhs.year() != __rhs.year() ? __lhs.year() < __rhs.year() : __lhs.month() < __rhs.month(); }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator> (const year_month& __lhs, const year_month& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator<=(const year_month& __lhs, const year_month& __rhs) noexcept
-{ return !(__rhs < __lhs);}
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator>=(const year_month& __lhs, const year_month& __rhs) noexcept
-{ return !(__lhs < __rhs); }
+_LIBCPP_HIDE_FROM_ABI constexpr strong_ordering operator<=>(const year_month& __lhs, const year_month& __rhs) noexcept {
+ if (auto __c = __lhs.year() <=> __rhs.year(); __c != 0)
+ return __c;
+ return __lhs.month() <=> __rhs.month();
+}
_LIBCPP_HIDE_FROM_ABI constexpr
year_month operator+(const year_month& __lhs, const months& __rhs) noexcept
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/year_month_day.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/year_month_day.h
index 957716aab6..b74901470c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/year_month_day.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/year_month_day.h
@@ -20,6 +20,7 @@
#include <__chrono/year.h>
#include <__chrono/year_month.h>
#include <__config>
+#include <compare>
#include <limits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -37,14 +38,14 @@ class year_month_day_last;
class year_month_day {
private:
- chrono::year __y;
- chrono::month __m;
- chrono::day __d;
+ chrono::year __y_;
+ chrono::month __m_;
+ chrono::day __d_;
public:
_LIBCPP_HIDE_FROM_ABI year_month_day() = default;
_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day(
const chrono::year& __yval, const chrono::month& __mval, const chrono::day& __dval) noexcept
- : __y{__yval}, __m{__mval}, __d{__dval} {}
+ : __y_{__yval}, __m_{__mval}, __d_{__dval} {}
_LIBCPP_HIDE_FROM_ABI constexpr year_month_day(const year_month_day_last& __ymdl) noexcept;
_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day(const sys_days& __sysd) noexcept
: year_month_day(__from_days(__sysd.time_since_epoch())) {}
@@ -56,9 +57,9 @@ public:
_LIBCPP_HIDE_FROM_ABI constexpr year_month_day& operator+=(const years& __dy) noexcept;
_LIBCPP_HIDE_FROM_ABI constexpr year_month_day& operator-=(const years& __dy) noexcept;
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::day day() const noexcept { return __d; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::day day() const noexcept { return __d_; }
_LIBCPP_HIDE_FROM_ABI inline constexpr operator sys_days() const noexcept { return sys_days{__to_days()}; }
_LIBCPP_HIDE_FROM_ABI inline explicit constexpr operator local_days() const noexcept { return local_days{__to_days()}; }
@@ -94,9 +95,9 @@ days year_month_day::__to_days() const noexcept
static_assert(numeric_limits<unsigned>::digits >= 18, "");
static_assert(numeric_limits<int>::digits >= 20 , "");
- const int __yr = static_cast<int>(__y) - (__m <= February);
- const unsigned __mth = static_cast<unsigned>(__m);
- const unsigned __dy = static_cast<unsigned>(__d);
+ const int __yr = static_cast<int>(__y_) - (__m_ <= February);
+ const unsigned __mth = static_cast<unsigned>(__m_);
+ const unsigned __dy = static_cast<unsigned>(__d_);
const int __era = (__yr >= 0 ? __yr : __yr - 399) / 400;
const unsigned __yoe = static_cast<unsigned>(__yr - __era * 400); // [0, 399]
@@ -109,33 +110,16 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr
bool operator==(const year_month_day& __lhs, const year_month_day& __rhs) noexcept
{ return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month() && __lhs.day() == __rhs.day(); }
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator!=(const year_month_day& __lhs, const year_month_day& __rhs) noexcept
-{ return !(__lhs == __rhs); }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator< (const year_month_day& __lhs, const year_month_day& __rhs) noexcept
-{
- if (__lhs.year() < __rhs.year()) return true;
- if (__lhs.year() > __rhs.year()) return false;
- if (__lhs.month() < __rhs.month()) return true;
- if (__lhs.month() > __rhs.month()) return false;
- return __lhs.day() < __rhs.day();
+_LIBCPP_HIDE_FROM_ABI constexpr strong_ordering
+operator<=>(const year_month_day& __lhs, const year_month_day& __rhs) noexcept {
+ if (auto __c = __lhs.year() <=> __rhs.year(); __c != 0)
+ return __c;
+ if (auto __c = __lhs.month() <=> __rhs.month(); __c != 0)
+ return __c;
+ return __lhs.day() <=> __rhs.day();
}
_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator> (const year_month_day& __lhs, const year_month_day& __rhs) noexcept
-{ return __rhs < __lhs; }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator<=(const year_month_day& __lhs, const year_month_day& __rhs) noexcept
-{ return !(__rhs < __lhs);}
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
-bool operator>=(const year_month_day& __lhs, const year_month_day& __rhs) noexcept
-{ return !(__lhs < __rhs); }
-
-_LIBCPP_HIDE_FROM_ABI inline constexpr
year_month_day operator/(const year_month& __lhs, const day& __rhs) noexcept
{ return year_month_day{__lhs.year(), __lhs.month(), __rhs}; }
@@ -191,24 +175,24 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day& year_month_day::operator-
class year_month_day_last {
private:
- chrono::year __y;
- chrono::month_day_last __mdl;
+ chrono::year __y_;
+ chrono::month_day_last __mdl_;
public:
_LIBCPP_HIDE_FROM_ABI constexpr year_month_day_last(const year& __yval, const month_day_last& __mdlval) noexcept
- : __y{__yval}, __mdl{__mdlval} {}
+ : __y_{__yval}, __mdl_{__mdlval} {}
_LIBCPP_HIDE_FROM_ABI constexpr year_month_day_last& operator+=(const months& __m) noexcept;
_LIBCPP_HIDE_FROM_ABI constexpr year_month_day_last& operator-=(const months& __m) noexcept;
_LIBCPP_HIDE_FROM_ABI constexpr year_month_day_last& operator+=(const years& __y) noexcept;
_LIBCPP_HIDE_FROM_ABI constexpr year_month_day_last& operator-=(const years& __y) noexcept;
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __mdl.month(); }
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month_day_last month_day_last() const noexcept { return __mdl; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __mdl_.month(); }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month_day_last month_day_last() const noexcept { return __mdl_; }
_LIBCPP_HIDE_FROM_ABI constexpr chrono::day day() const noexcept;
_LIBCPP_HIDE_FROM_ABI inline constexpr operator sys_days() const noexcept { return sys_days{year()/month()/day()}; }
_LIBCPP_HIDE_FROM_ABI inline explicit constexpr operator local_days() const noexcept { return local_days{year()/month()/day()}; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __y.ok() && __mdl.ok(); }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __y_.ok() && __mdl_.ok(); }
};
_LIBCPP_HIDE_FROM_ABI inline constexpr
@@ -221,7 +205,7 @@ chrono::day year_month_day_last::day() const noexcept
chrono::day(31), chrono::day(31), chrono::day(30),
chrono::day(31), chrono::day(30), chrono::day(31)
};
- return (month() != February || !__y.is_leap()) && month().ok() ?
+ return (month() != February || !__y_.is_leap()) && month().ok() ?
__d[static_cast<unsigned>(month()) - 1] : chrono::day{29};
}
@@ -305,13 +289,13 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day_last& year_month_day_last:
_LIBCPP_HIDE_FROM_ABI inline constexpr
year_month_day::year_month_day(const year_month_day_last& __ymdl) noexcept
- : __y{__ymdl.year()}, __m{__ymdl.month()}, __d{__ymdl.day()} {}
+ : __y_{__ymdl.year()}, __m_{__ymdl.month()}, __d_{__ymdl.day()} {}
_LIBCPP_HIDE_FROM_ABI inline constexpr
bool year_month_day::ok() const noexcept
{
- if (!__y.ok() || !__m.ok()) return false;
- return chrono::day{1} <= __d && __d <= (__y / __m / last).day();
+ if (!__y_.ok() || !__m_.ok()) return false;
+ return chrono::day{1} <= __d_ && __d_ <= (__y_ / __m_ / last).day();
}
} // namespace chrono
diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/year_month_weekday.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/year_month_weekday.h
index b69b77152f..6604deaf12 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__chrono/year_month_weekday.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/year_month_weekday.h
@@ -35,14 +35,14 @@ namespace chrono
{
class year_month_weekday {
- chrono::year __y;
- chrono::month __m;
- chrono::weekday_indexed __wdi;
+ chrono::year __y_;
+ chrono::month __m_;
+ chrono::weekday_indexed __wdi_;
public:
_LIBCPP_HIDE_FROM_ABI year_month_weekday() = default;
_LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday(const chrono::year& __yval, const chrono::month& __mval,
const chrono::weekday_indexed& __wdival) noexcept
- : __y{__yval}, __m{__mval}, __wdi{__wdival} {}
+ : __y_{__yval}, __m_{__mval}, __wdi_{__wdival} {}
_LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday(const sys_days& __sysd) noexcept
: year_month_weekday(__from_days(__sysd.time_since_epoch())) {}
_LIBCPP_HIDE_FROM_ABI inline explicit constexpr year_month_weekday(const local_days& __locd) noexcept
@@ -52,24 +52,24 @@ public:
_LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday& operator+=(const years&) noexcept;
_LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday& operator-=(const years&) noexcept;
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday weekday() const noexcept { return __wdi.weekday(); }
- _LIBCPP_HIDE_FROM_ABI inline constexpr unsigned index() const noexcept { return __wdi.index(); }
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday_indexed weekday_indexed() const noexcept { return __wdi; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday weekday() const noexcept { return __wdi_.weekday(); }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr unsigned index() const noexcept { return __wdi_.index(); }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday_indexed weekday_indexed() const noexcept { return __wdi_; }
_LIBCPP_HIDE_FROM_ABI inline constexpr operator sys_days() const noexcept { return sys_days{__to_days()}; }
_LIBCPP_HIDE_FROM_ABI inline explicit constexpr operator local_days() const noexcept { return local_days{__to_days()}; }
_LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept
{
- if (!__y.ok() || !__m.ok() || !__wdi.ok()) return false;
- if (__wdi.index() <= 4) return true;
+ if (!__y_.ok() || !__m_.ok() || !__wdi_.ok()) return false;
+ if (__wdi_.index() <= 4) return true;
auto __nth_weekday_day =
- __wdi.weekday() -
- chrono::weekday{static_cast<sys_days>(__y / __m / 1)} +
- days{(__wdi.index() - 1) * 7 + 1};
+ __wdi_.weekday() -
+ chrono::weekday{static_cast<sys_days>(__y_ / __m_ / 1)} +
+ days{(__wdi_.index() - 1) * 7 + 1};
return static_cast<unsigned>(__nth_weekday_day.count()) <=
- static_cast<unsigned>((__y / __m / last).day());
+ static_cast<unsigned>((__y_ / __m_ / last).day());
}
_LIBCPP_HIDE_FROM_ABI static constexpr year_month_weekday __from_days(days __d) noexcept;
@@ -89,8 +89,8 @@ year_month_weekday year_month_weekday::__from_days(days __d) noexcept
_LIBCPP_HIDE_FROM_ABI inline constexpr
days year_month_weekday::__to_days() const noexcept
{
- const sys_days __sysd = sys_days(__y/__m/1);
- return (__sysd + (__wdi.weekday() - chrono::weekday(__sysd) + days{(__wdi.index()-1)*7}))
+ const sys_days __sysd = sys_days(__y_/__m_/1);
+ return (__sysd + (__wdi_.weekday() - chrono::weekday(__sysd) + days{(__wdi_.index()-1)*7}))
.time_since_epoch();
}
@@ -155,25 +155,25 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr year_month_weekday& year_month_weekday::o
class year_month_weekday_last {
private:
- chrono::year __y;
- chrono::month __m;
- chrono::weekday_last __wdl;
+ chrono::year __y_;
+ chrono::month __m_;
+ chrono::weekday_last __wdl_;
public:
_LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday_last(const chrono::year& __yval, const chrono::month& __mval,
const chrono::weekday_last& __wdlval) noexcept
- : __y{__yval}, __m{__mval}, __wdl{__wdlval} {}
+ : __y_{__yval}, __m_{__mval}, __wdl_{__wdlval} {}
_LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday_last& operator+=(const months& __dm) noexcept;
_LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday_last& operator-=(const months& __dm) noexcept;
_LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday_last& operator+=(const years& __dy) noexcept;
_LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday_last& operator-=(const years& __dy) noexcept;
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday weekday() const noexcept { return __wdl.weekday(); }
- _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday_last weekday_last() const noexcept { return __wdl; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m_; }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday weekday() const noexcept { return __wdl_.weekday(); }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday_last weekday_last() const noexcept { return __wdl_; }
_LIBCPP_HIDE_FROM_ABI inline constexpr operator sys_days() const noexcept { return sys_days{__to_days()}; }
_LIBCPP_HIDE_FROM_ABI inline explicit constexpr operator local_days() const noexcept { return local_days{__to_days()}; }
- _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __y.ok() && __m.ok() && __wdl.ok(); }
+ _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __y_.ok() && __m_.ok() && __wdl_.ok(); }
_LIBCPP_HIDE_FROM_ABI constexpr days __to_days() const noexcept;
@@ -182,8 +182,8 @@ public:
_LIBCPP_HIDE_FROM_ABI inline constexpr
days year_month_weekday_last::__to_days() const noexcept
{
- const sys_days __last = sys_days{__y/__m/last};
- return (__last - (chrono::weekday{__last} - __wdl.weekday())).time_since_epoch();
+ const sys_days __last = sys_days{__y_/__m_/last};
+ return (__last - (chrono::weekday{__last} - __wdl_.weekday())).time_since_epoch();
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__compare/compare_three_way_result.h b/contrib/libs/cxxsupp/libcxx/include/__compare/compare_three_way_result.h
index 7b03597ab1..3047f5bd2a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__compare/compare_three_way_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__compare/compare_three_way_result.h
@@ -10,6 +10,7 @@
#define _LIBCPP___COMPARE_COMPARE_THREE_WAY_RESULT_H
#include <__config>
+#include <__type_traits/make_const_lvalue_ref.h>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__compare/ordering.h b/contrib/libs/cxxsupp/libcxx/include/__compare/ordering.h
index 1d466d669e..ab35a598a8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__compare/ordering.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__compare/ordering.h
@@ -312,6 +312,12 @@ inline constexpr strong_ordering strong_ordering::equal(_OrdResult::__equiv);
inline constexpr strong_ordering strong_ordering::equivalent(_OrdResult::__equiv);
inline constexpr strong_ordering strong_ordering::greater(_OrdResult::__greater);
+/// [cmp.categories.pre]/1
+/// The types partial_ordering, weak_ordering, and strong_ordering are
+/// collectively termed the comparison category types.
+template <class _Tp>
+concept __comparison_category = __one_of_v<_Tp, partial_ordering, weak_ordering, strong_ordering>;
+
#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__compare/three_way_comparable.h b/contrib/libs/cxxsupp/libcxx/include/__compare/three_way_comparable.h
index b317d75059..cab2cb2896 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__compare/three_way_comparable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__compare/three_way_comparable.h
@@ -16,6 +16,7 @@
#include <__concepts/same_as.h>
#include <__concepts/totally_ordered.h>
#include <__config>
+#include <__type_traits/make_const_lvalue_ref.h>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/assignable.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/assignable.h
index 7f187a39f8..db09e5a0a5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/assignable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/assignable.h
@@ -12,6 +12,7 @@
#include <__concepts/common_reference_with.h>
#include <__concepts/same_as.h>
#include <__config>
+#include <__type_traits/make_const_lvalue_ref.h>
#include <__utility/forward.h>
#include <type_traits>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/class_or_enum.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/class_or_enum.h
index 9fd62ba892..6287c52992 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/class_or_enum.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/class_or_enum.h
@@ -28,7 +28,7 @@ concept __class_or_enum = is_class_v<_Tp> || is_union_v<_Tp> || is_enum_v<_Tp>;
// Work around Clang bug https://llvm.org/PR52970
// TODO: remove this workaround once libc++ no longer has to support Clang 13 (it was fixed in Clang 14).
template<class _Tp>
-concept __workaround_52970 = is_class_v<__uncvref_t<_Tp>> || is_union_v<__uncvref_t<_Tp>>;
+concept __workaround_52970 = is_class_v<__remove_cvref_t<_Tp>> || is_union_v<__remove_cvref_t<_Tp>>;
#endif // _LIBCPP_STD_VER > 17
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/equality_comparable.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/equality_comparable.h
index 7c750c5937..c2293d5cd0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/equality_comparable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/equality_comparable.h
@@ -12,6 +12,7 @@
#include <__concepts/boolean_testable.h>
#include <__concepts/common_reference_with.h>
#include <__config>
+#include <__type_traits/make_const_lvalue_ref.h>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/swappable.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/swappable.h
index fef940f21f..dbb4283645 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/swappable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/swappable.h
@@ -17,6 +17,7 @@
#include <__utility/exchange.h>
#include <__utility/forward.h>
#include <__utility/move.h>
+#include <__utility/swap.h>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__config b/contrib/libs/cxxsupp/libcxx/include/__config
index 19ed81476c..b5dd7efc5a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__config
+++ b/contrib/libs/cxxsupp/libcxx/include/__config
@@ -22,6 +22,16 @@
# pragma GCC system_header
#endif
+#if defined(__apple_build_version__)
+# define _LIBCPP_COMPILER_CLANG_BASED
+# define _LIBCPP_APPLE_CLANG_VER (__apple_build_version__ / 10000)
+#elif defined(__clang__)
+# define _LIBCPP_COMPILER_CLANG_BASED
+# define _LIBCPP_CLANG_VER (__clang_major__ * 100 + __clang_minor__)
+#elif defined(__GNUC__)
+# define _LIBCPP_COMPILER_GCC
+#endif
+
// Move outside #ifdef __cplusplus because this needs to work in both C and C++ headers.
#if defined(__apple_build_version__)
# define _LIBCPP_COMPILER_CLANG_BASED
@@ -46,7 +56,10 @@
#ifdef __cplusplus
-# define _LIBCPP_VERSION 15000
+// _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM.
+// Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 16.0.1 == 16.00.01), _LIBCPP_VERSION is
+// defined to XXYYZZ.
+# define _LIBCPP_VERSION 160000
# define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y
# define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y)
@@ -69,7 +82,8 @@
# elif __cplusplus <= 202002L
# define _LIBCPP_STD_VER 20
# else
-# define _LIBCPP_STD_VER 22 // current year, or date of c++2b ratification
+// Expected release year of the next C++ standard
+# define _LIBCPP_STD_VER 23
# endif
# endif // _LIBCPP_STD_VER
@@ -182,7 +196,7 @@
# define _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
# endif
-# define _LIBCPP_TOSTRING2(x) # x
+# define _LIBCPP_TOSTRING2(x) #x
# define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)
# if __cplusplus < 201103L
@@ -229,12 +243,6 @@
# error "libc++ only supports C++03 with Clang-based compilers. Please enable C++11"
# endif
-# ifdef _LIBCPP_COMPILER_MSVC
-# error If you successfully use libc++ with MSVC please tell the libc++ developers and consider upstreaming your \
-changes. We are not aware of anybody using this configuration and know that at least some code is currently broken. \
-If there are users of this configuration we are happy to provide support.
-# endif
-
// FIXME: ABI detection should be done via compiler builtin macros. This
// is just a placeholder until Clang implements such macros. For now assume
// that Windows compilers pretending to be MSVC++ target the Microsoft ABI,
@@ -268,7 +276,6 @@ If there are users of this configuration we are happy to provide support.
// easier to grep for target specific flags once the feature is complete.
# if !defined(_LIBCPP_ENABLE_EXPERIMENTAL) && !defined(_LIBCPP_BUILDING_LIBRARY)
//# define _LIBCPP_HAS_NO_INCOMPLETE_FORMAT
-//# define _LIBCPP_HAS_NO_INCOMPLETE_RANGES
# endif
// Need to detect which libc we're using if we're on Linux.
@@ -433,17 +440,21 @@ If there are users of this configuration we are happy to provide support.
# define _LIBCPP_NORETURN [[noreturn]]
# define _NOEXCEPT noexcept
# define _NOEXCEPT_(x) noexcept(x)
+# define _LIBCPP_CONSTEXPR constexpr
# else
# define _LIBCPP_ALIGNOF(_Tp) _Alignof(_Tp)
# define _ALIGNAS_TYPE(x) __attribute__((__aligned__(_LIBCPP_ALIGNOF(x))))
# define _ALIGNAS(x) __attribute__((__aligned__(x)))
-# define _LIBCPP_NORETURN __attribute__((noreturn))
+# define _LIBCPP_NORETURN __attribute__((__noreturn__))
# define _LIBCPP_HAS_NO_NOEXCEPT
# define nullptr __nullptr
# define _NOEXCEPT throw()
# define _NOEXCEPT_(x)
+# define static_assert(...) _Static_assert(__VA_ARGS__)
+# define decltype(...) __decltype(__VA_ARGS__)
+# define _LIBCPP_CONSTEXPR
typedef __char16_t char16_t;
typedef __char32_t char32_t;
@@ -502,27 +513,7 @@ typedef __char32_t char32_t;
# define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__
-# elif defined(_LIBCPP_COMPILER_MSVC)
-
-# define _LIBCPP_WARNING(x) __pragma(message(__FILE__ "(" _LIBCPP_TOSTRING(__LINE__) ") : warning note: " x))
-
-# if _MSC_VER < 1900
-# error "MSVC versions prior to Visual Studio 2015 are not supported"
-# endif
-
-# define _LIBCPP_NORETURN __declspec(noreturn)
-
-# define _LIBCPP_WEAK
-
-# define _LIBCPP_HAS_NO_ASAN
-
-# define _LIBCPP_ALWAYS_INLINE __forceinline
-
-# define _LIBCPP_HAS_NO_VECTOR_EXTENSION
-
-# define _LIBCPP_DISABLE_EXTENSION_WARNING
-
-# endif // _LIBCPP_COMPILER_[CLANG|GCC|MSVC]
+# endif // _LIBCPP_COMPILER_[CLANG|GCC]
# if defined(_LIBCPP_OBJECT_FORMAT_COFF)
@@ -695,31 +686,20 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
# define _LIBCPP_HAS_NO_INT128
# endif
-# ifdef _LIBCPP_CXX03_LANG
-# define static_assert(...) _Static_assert(__VA_ARGS__)
-# define decltype(...) __decltype(__VA_ARGS__)
-# endif // _LIBCPP_CXX03_LANG
-
-# ifdef _LIBCPP_CXX03_LANG
-# define _LIBCPP_CONSTEXPR
-# else
-# define _LIBCPP_CONSTEXPR constexpr
-# endif
-
# ifndef __cpp_consteval
# define _LIBCPP_CONSTEVAL _LIBCPP_CONSTEXPR
# else
# define _LIBCPP_CONSTEVAL consteval
# endif
-# ifdef __GNUC__
+# if __has_attribute(__malloc__)
# define _LIBCPP_NOALIAS __attribute__((__malloc__))
# else
# define _LIBCPP_NOALIAS
# endif
-# if __has_attribute(using_if_exists)
-# define _LIBCPP_USING_IF_EXISTS __attribute__((using_if_exists))
+# if __has_attribute(__using_if_exists__)
+# define _LIBCPP_USING_IF_EXISTS __attribute__((__using_if_exists__))
# else
# define _LIBCPP_USING_IF_EXISTS
# endif
@@ -786,7 +766,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
# if !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
# if __has_attribute(deprecated)
# define _LIBCPP_DEPRECATED __attribute__((deprecated))
-# define _LIBCPP_DEPRECATED_(m) __attribute__((deprected(m)))
+# define _LIBCPP_DEPRECATED_(m) __attribute__((deprecated(m)))
# elif _LIBCPP_STD_VER > 11
# define _LIBCPP_DEPRECATED [[deprecated]]
# define _LIBCPP_DEPRECATED_(m) [[deprecated(m)]]
@@ -847,27 +827,31 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
# endif
# if _LIBCPP_STD_VER > 11
-# define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr
+# define _LIBCPP_CONSTEXPR_SINCE_CXX14 constexpr
# else
-# define _LIBCPP_CONSTEXPR_AFTER_CXX11
+# define _LIBCPP_CONSTEXPR_SINCE_CXX14
# endif
# if _LIBCPP_STD_VER > 14
-# define _LIBCPP_CONSTEXPR_AFTER_CXX14 constexpr
+# define _LIBCPP_CONSTEXPR_SINCE_CXX17 constexpr
# else
-# define _LIBCPP_CONSTEXPR_AFTER_CXX14
+# define _LIBCPP_CONSTEXPR_SINCE_CXX17
# endif
# if _LIBCPP_STD_VER > 17
-# define _LIBCPP_CONSTEXPR_AFTER_CXX17 constexpr
+# define _LIBCPP_CONSTEXPR_SINCE_CXX20 constexpr
# else
-# define _LIBCPP_CONSTEXPR_AFTER_CXX17
+# define _LIBCPP_CONSTEXPR_SINCE_CXX20
# endif
-# if __has_cpp_attribute(nodiscard) || defined(_LIBCPP_COMPILER_MSVC)
+# if _LIBCPP_STD_VER > 20
+# define _LIBCPP_CONSTEXPR_SINCE_CXX23 constexpr
+# else
+# define _LIBCPP_CONSTEXPR_SINCE_CXX23
+# endif
+
+# if __has_cpp_attribute(nodiscard)
# define _LIBCPP_NODISCARD [[nodiscard]]
-# elif defined(_LIBCPP_COMPILER_CLANG_BASED) && !defined(_LIBCPP_CXX03_LANG)
-# define _LIBCPP_NODISCARD [[clang::warn_unused_result]]
# else
// We can't use GCC's [[gnu::warn_unused_result]] and
// __attribute__((warn_unused_result)), because GCC does not silence them via
@@ -877,19 +861,19 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
// _LIBCPP_NODISCARD_EXT may be used to apply [[nodiscard]] to entities not
// specified as such as an extension.
-# if defined(_LIBCPP_ENABLE_NODISCARD) && !defined(_LIBCPP_DISABLE_NODISCARD_EXT)
+# if !defined(_LIBCPP_DISABLE_NODISCARD_EXT)
# define _LIBCPP_NODISCARD_EXT _LIBCPP_NODISCARD
# else
# define _LIBCPP_NODISCARD_EXT
# endif
-# if !defined(_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17) && (_LIBCPP_STD_VER > 17 || defined(_LIBCPP_ENABLE_NODISCARD))
+# if _LIBCPP_STD_VER > 17 || !defined(_LIBCPP_DISABLE_NODISCARD_EXT)
# define _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_NODISCARD
# else
# define _LIBCPP_NODISCARD_AFTER_CXX17
# endif
-# if __has_attribute(no_destroy)
+# if __has_attribute(__no_destroy__)
# define _LIBCPP_NO_DESTROY __attribute__((__no_destroy__))
# else
# define _LIBCPP_NO_DESTROY
@@ -1052,7 +1036,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
# if _LIBCPP_STD_VER > 17
# define _LIBCPP_CONSTINIT constinit
-# elif __has_attribute(require_constant_initialization)
+# elif __has_attribute(__require_constant_initialization__)
# define _LIBCPP_CONSTINIT __attribute__((__require_constant_initialization__))
# else
# define _LIBCPP_CONSTINIT
@@ -1062,12 +1046,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
# define _LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED
# endif
-# if __has_attribute(diagnose_if) && !defined(_LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS)
-# define _LIBCPP_DIAGNOSE_WARNING(...) __attribute__((diagnose_if(__VA_ARGS__, "warning")))
-# define _LIBCPP_DIAGNOSE_ERROR(...) __attribute__((diagnose_if(__VA_ARGS__, "error")))
+# if __has_attribute(__diagnose_if__) && !defined(_LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS)
+# define _LIBCPP_DIAGNOSE_WARNING(...) __attribute__((__diagnose_if__(__VA_ARGS__, "warning")))
# else
# define _LIBCPP_DIAGNOSE_WARNING(...)
-# define _LIBCPP_DIAGNOSE_ERROR(...)
# endif
// Use a function like macro to imply that it must be followed by a semicolon
@@ -1113,8 +1095,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
# define _LIBCPP_IF_WIDE_CHARACTERS(...) __VA_ARGS__
# endif
-# if defined(_LIBCPP_ABI_MICROSOFT) && (defined(_LIBCPP_COMPILER_MSVC) || __has_declspec_attribute(empty_bases)) && \
- !defined(__CUDACC__)
+# if defined(_LIBCPP_ABI_MICROSOFT) && __has_declspec_attribute(empty_bases) && !defined(__CUDACC__)
# define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases)
# else
# define _LIBCPP_DECLSPEC_EMPTY_BASES
@@ -1137,10 +1118,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
# define _LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS
# endif // _LIBCPP_ENABLE_CXX20_REMOVED_FEATURES
-# if !defined(__cpp_impl_coroutine) || __cpp_impl_coroutine < 201902L
-# define _LIBCPP_HAS_NO_CXX20_COROUTINES
-# endif
-
// Yandex-specific: We build our own libc++, so it has everything available
# define _LIBCPP_DISABLE_AVAILABILITY
// End of Yandex-specific
@@ -1176,19 +1153,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
# define _LIBCPP_HAS_NO_FGETPOS_FSETPOS
# endif
-# if __has_attribute(init_priority)
-// TODO: Remove this once we drop support for building libc++ with old Clangs
-# if (defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER < 1200) || \
- (defined(__apple_build_version__) && __apple_build_version__ < 13000000)
-# define _LIBCPP_INIT_PRIORITY_MAX __attribute__((init_priority(101)))
-# else
-# define _LIBCPP_INIT_PRIORITY_MAX __attribute__((init_priority(100)))
-# endif
+# if __has_attribute(__init_priority__)
+# define _LIBCPP_INIT_PRIORITY_MAX __attribute__((__init_priority__(100)))
# else
# define _LIBCPP_INIT_PRIORITY_MAX
# endif
-# if defined(__GNUC__) || defined(__clang__)
+# if __has_attribute(__format__)
// The attribute uses 1-based indices for ordinary and static member functions.
// The attribute uses 2-based indices for non-static member functions.
# define _LIBCPP_ATTRIBUTE_FORMAT(archetype, format_string_index, first_format_arg_index) \
@@ -1250,6 +1221,35 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
# define _LIBCPP_PACKED
# endif
+// c8rtomb() and mbrtoc8() were added in C++20 and C23. Support for these
+// functions is gradually being added to existing C libraries. The conditions
+// below check for known C library versions and conditions under which these
+// functions are declared by the C library.
+# define _LIBCPP_HAS_NO_C8RTOMB_MBRTOC8
+// GNU libc 2.36 and newer declare c8rtomb() and mbrtoc8() in C++ modes if
+// __cpp_char8_t is defined or if C2X extensions are enabled. Unfortunately,
+// determining the latter depends on internal GNU libc details. If the
+// __cpp_char8_t feature test macro is not defined, then a char8_t typedef
+// will be declared as well.
+# if defined(_LIBCPP_GLIBC_PREREQ) && defined(__GLIBC_USE)
+# if _LIBCPP_GLIBC_PREREQ(2, 36) && (defined(__cpp_char8_t) || __GLIBC_USE(ISOC2X))
+# undef _LIBCPP_HAS_NO_C8RTOMB_MBRTOC8
+# endif
+# endif
+
+// There are a handful of public standard library types that are intended to
+// support CTAD but don't need any explicit deduction guides to do so. This
+// macro is used to mark them as such, which suppresses the
+// '-Wctad-maybe-unsupported' compiler warning when CTAD is used in user code
+// with these classes.
+#if _LIBCPP_STD_VER >= 17
+# define _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(_ClassName) \
+ template <class ..._Tag> \
+ _ClassName(typename _Tag::__allow_ctad...) -> _ClassName<_Tag...>
+#else
+# define _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(_ClassName) static_assert(true, "")
+#endif
+
#endif // __cplusplus
#endif // _LIBCPP___CONFIG
diff --git a/contrib/libs/cxxsupp/libcxx/include/__config_site b/contrib/libs/cxxsupp/libcxx/include/__config_site
index eaa5d522af..99cd2c3ccf 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__config_site
+++ b/contrib/libs/cxxsupp/libcxx/include/__config_site
@@ -3,9 +3,7 @@
#define _LIBCPP_ABI_VERSION 1
#define _LIBCPP_ABI_NAMESPACE __y1
-#if !defined(NDEBUG) && !defined(_LIBCPP_DEBUG)
-# define _LIBCPP_DEBUG 0
-#endif
+#define _LIBCPP_DISABLE_NODISCARD_EXT
#ifndef _YNDX_LIBCPP_ENABLE_EXTENSIONS
# define _YNDX_LIBCPP_ENABLE_EXTENSIONS 1
diff --git a/contrib/libs/cxxsupp/libcxx/include/__coroutine/coroutine_handle.h b/contrib/libs/cxxsupp/libcxx/include/__coroutine/coroutine_handle.h
index 4bf3237892..8f7ed2ee48 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__coroutine/coroutine_handle.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__coroutine/coroutine_handle.h
@@ -20,7 +20,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -115,7 +115,7 @@ public:
_LIBCPP_HIDE_FROM_ABI
static coroutine_handle from_promise(_Promise& __promise) {
- using _RawPromise = typename remove_cv<_Promise>::type;
+ using _RawPromise = __remove_cv_t<_Promise>;
coroutine_handle __tmp;
__tmp.__handle_ =
__builtin_coro_promise(_VSTD::addressof(const_cast<_RawPromise&>(__promise)), alignof(_Promise), true);
@@ -197,6 +197,6 @@ struct hash<coroutine_handle<_Tp>> {
_LIBCPP_END_NAMESPACE_STD
-#endif // __LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#endif // __LIBCPP_STD_VER > 17
#endif // _LIBCPP___COROUTINE_COROUTINE_HANDLE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__coroutine/coroutine_traits.h b/contrib/libs/cxxsupp/libcxx/include/__coroutine/coroutine_traits.h
index 0a5229b459..87eb21830a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__coroutine/coroutine_traits.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__coroutine/coroutine_traits.h
@@ -16,7 +16,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -35,7 +35,7 @@ struct __coroutine_traits_sfinae {};
template <class _Tp>
struct __coroutine_traits_sfinae<
- _Tp, typename __void_t<typename _Tp::promise_type>::type>
+ _Tp, __void_t<typename _Tp::promise_type> >
{
using promise_type = typename _Tp::promise_type;
};
@@ -48,6 +48,6 @@ struct coroutine_traits
_LIBCPP_END_NAMESPACE_STD
-#endif // __LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#endif // __LIBCPP_STD_VER > 17
#endif // _LIBCPP___COROUTINE_COROUTINE_TRAITS_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__coroutine/noop_coroutine_handle.h b/contrib/libs/cxxsupp/libcxx/include/__coroutine/noop_coroutine_handle.h
index 7a2c672057..299304794c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__coroutine/noop_coroutine_handle.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__coroutine/noop_coroutine_handle.h
@@ -16,7 +16,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -107,6 +107,6 @@ noop_coroutine_handle noop_coroutine() noexcept { return noop_coroutine_handle()
_LIBCPP_END_NAMESPACE_STD
-#endif // __LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#endif // __LIBCPP_STD_VER > 17
#endif // _LIBCPP___COROUTINE_NOOP_COROUTINE_HANDLE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__coroutine/trivial_awaitables.h b/contrib/libs/cxxsupp/libcxx/include/__coroutine/trivial_awaitables.h
index 31399ab29a..bbbae7a47f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__coroutine/trivial_awaitables.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__coroutine/trivial_awaitables.h
@@ -16,7 +16,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -41,6 +41,6 @@ struct suspend_always {
_LIBCPP_END_NAMESPACE_STD
-#endif // __LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#endif // __LIBCPP_STD_VER > 17
#endif // __LIBCPP___COROUTINE_TRIVIAL_AWAITABLES_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__debug b/contrib/libs/cxxsupp/libcxx/include/__debug
index 59e85cb7d1..ae0c1a5af0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__debug
+++ b/contrib/libs/cxxsupp/libcxx/include/__debug
@@ -19,15 +19,14 @@
# pragma GCC system_header
#endif
-// Catch invalid uses of the legacy _LIBCPP_DEBUG toggle.
-#if defined(_LIBCPP_DEBUG) && _LIBCPP_DEBUG != 0 && !defined(_LIBCPP_ENABLE_DEBUG_MODE)
-# error "Enabling the debug mode now requires having configured the library with support for the debug mode"
-#endif
-
#if defined(_LIBCPP_ENABLE_DEBUG_MODE) && !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY)
# define _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
#endif
+#if defined(_LIBCPP_ENABLE_DEBUG_MODE) && !defined(_LIBCPP_DEBUG_ITERATOR_BOUNDS_CHECKING)
+# define _LIBCPP_DEBUG_ITERATOR_BOUNDS_CHECKING
+#endif
+
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
# define _LIBCPP_DEBUG_ASSERT(x, m) _LIBCPP_ASSERT(::std::__libcpp_is_constant_evaluated() || (x), m)
#else
@@ -87,10 +86,10 @@ struct _C_node
explicit _C_node(void* __c, __c_node* __n)
: __c_node(__c, __n) {}
- virtual bool __dereferenceable(const void*) const;
- virtual bool __decrementable(const void*) const;
- virtual bool __addable(const void*, ptrdiff_t) const;
- virtual bool __subscriptable(const void*, ptrdiff_t) const;
+ bool __dereferenceable(const void*) const override;
+ bool __decrementable(const void*) const override;
+ bool __addable(const void*, ptrdiff_t) const override;
+ bool __subscriptable(const void*, ptrdiff_t) const override;
};
template <class _Cont>
@@ -212,7 +211,7 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_insert_c(_Tp* __c) {
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 inline void __debug_db_insert_c(_Tp* __c) {
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
if (!__libcpp_is_constant_evaluated())
__get_db()->__insert_c(__c);
@@ -222,7 +221,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_inser
}
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_insert_i(_Tp* __i) {
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 inline void __debug_db_insert_i(_Tp* __i) {
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
if (!__libcpp_is_constant_evaluated())
__get_db()->__insert_i(__i);
@@ -232,7 +231,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_inser
}
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_erase_c(_Tp* __c) {
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 inline void __debug_db_erase_c(_Tp* __c) {
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
if (!__libcpp_is_constant_evaluated())
__get_db()->__erase_c(__c);
@@ -242,7 +241,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_erase
}
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_swap(_Tp* __lhs, _Tp* __rhs) {
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 inline void __debug_db_swap(_Tp* __lhs, _Tp* __rhs) {
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
if (!__libcpp_is_constant_evaluated())
__get_db()->swap(__lhs, __rhs);
@@ -253,7 +252,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_swap(
}
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_invalidate_all(_Tp* __c) {
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 inline void __debug_db_invalidate_all(_Tp* __c) {
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
if (!__libcpp_is_constant_evaluated())
__get_db()->__invalidate_all(__c);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__debug_utils/randomize_range.h b/contrib/libs/cxxsupp/libcxx/include/__debug_utils/randomize_range.h
index 9843709019..dce61923bc 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__debug_utils/randomize_range.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__debug_utils/randomize_range.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Iterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void __debug_randomize_range(_Iterator __first, _Sentinel __last) {
#ifdef _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
# ifdef _LIBCPP_CXX03_LANG
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h
index 5ba3ef96de..b17eaaab4c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h
@@ -215,22 +215,24 @@ public:
return __get_symlink_status(&__ec);
}
- _LIBCPP_INLINE_VISIBILITY
- bool operator<(directory_entry const& __rhs) const noexcept {
- return __p_ < __rhs.__p_;
- }
_LIBCPP_INLINE_VISIBILITY
bool operator==(directory_entry const& __rhs) const noexcept {
return __p_ == __rhs.__p_;
}
+#if _LIBCPP_STD_VER <= 17
_LIBCPP_INLINE_VISIBILITY
bool operator!=(directory_entry const& __rhs) const noexcept {
return __p_ != __rhs.__p_;
}
_LIBCPP_INLINE_VISIBILITY
+ bool operator<(directory_entry const& __rhs) const noexcept {
+ return __p_ < __rhs.__p_;
+ }
+
+ _LIBCPP_INLINE_VISIBILITY
bool operator<=(directory_entry const& __rhs) const noexcept {
return __p_ <= __rhs.__p_;
}
@@ -245,6 +247,15 @@ public:
return __p_ >= __rhs.__p_;
}
+#else // _LIBCPP_STD_VER <= 17
+
+ _LIBCPP_HIDE_FROM_ABI
+ strong_ordering operator<=>(const directory_entry& __rhs) const noexcept {
+ return __p_ <=> __rhs.__p_;
+ }
+
+#endif // _LIBCPP_STD_VER <= 17
+
template <class _CharT, class _Traits>
_LIBCPP_INLINE_VISIBILITY
friend basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const directory_entry& __d) {
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/filesystem_error.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/filesystem_error.h
index e32b14c1b7..eb5c38ad12 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/filesystem_error.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/filesystem_error.h
@@ -14,6 +14,7 @@
#include <__config>
#include <__filesystem/path.h>
#include <__memory/shared_ptr.h>
+#include <__utility/forward.h>
#include <iosfwd>
#include <new>
#include <system_error>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h
index 8fafd72c7e..7d1a784403 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h
@@ -141,15 +141,15 @@ struct __is_pathable_string<
template <class _Source, class _DS = typename decay<_Source>::type,
class _UnqualPtrType =
- typename remove_const<typename remove_pointer<_DS>::type>::type,
+ __remove_const_t<__remove_pointer_t<_DS> >,
bool _IsCharPtr = is_pointer<_DS>::value&&
__can_convert_char<_UnqualPtrType>::value>
struct __is_pathable_char_array : false_type {};
template <class _Source, class _ECharT, class _UPtr>
struct __is_pathable_char_array<_Source, _ECharT*, _UPtr, true>
- : __can_convert_char<typename remove_const<_ECharT>::type> {
- using _Base = __can_convert_char<typename remove_const<_ECharT>::type>;
+ : __can_convert_char<__remove_const_t<_ECharT> > {
+ using _Base = __can_convert_char<__remove_const_t<_ECharT> >;
_LIBCPP_HIDE_FROM_ABI
static _ECharT const* __range_begin(const _ECharT* __b) { return __b; }
@@ -732,6 +732,37 @@ public:
path& replace_extension(const path& __replacement = path());
+ friend _LIBCPP_HIDE_FROM_ABI bool operator==(const path& __lhs, const path& __rhs) noexcept {
+ return __lhs.__compare(__rhs.__pn_) == 0;
+ }
+# if _LIBCPP_STD_VER <= 17
+ friend _LIBCPP_HIDE_FROM_ABI bool operator!=(const path& __lhs, const path& __rhs) noexcept {
+ return __lhs.__compare(__rhs.__pn_) != 0;
+ }
+ friend _LIBCPP_HIDE_FROM_ABI bool operator<(const path& __lhs, const path& __rhs) noexcept {
+ return __lhs.__compare(__rhs.__pn_) < 0;
+ }
+ friend _LIBCPP_HIDE_FROM_ABI bool operator<=(const path& __lhs, const path& __rhs) noexcept {
+ return __lhs.__compare(__rhs.__pn_) <= 0;
+ }
+ friend _LIBCPP_HIDE_FROM_ABI bool operator>(const path& __lhs, const path& __rhs) noexcept {
+ return __lhs.__compare(__rhs.__pn_) > 0;
+ }
+ friend _LIBCPP_HIDE_FROM_ABI bool operator>=(const path& __lhs, const path& __rhs) noexcept {
+ return __lhs.__compare(__rhs.__pn_) >= 0;
+ }
+# else // _LIBCPP_STD_VER <= 17
+ friend _LIBCPP_HIDE_FROM_ABI strong_ordering operator<=>(const path& __lhs, const path& __rhs) noexcept {
+ return __lhs.__compare(__rhs.__pn_) <=> 0;
+ }
+# endif // _LIBCPP_STD_VER <= 17
+
+ friend _LIBCPP_HIDE_FROM_ABI path operator/(const path& __lhs, const path& __rhs) {
+ path __result(__lhs);
+ __result /= __rhs;
+ return __result;
+ }
+
_LIBCPP_HIDE_FROM_ABI
void swap(path& __rhs) noexcept { __pn_.swap(__rhs.__pn_); }
@@ -1035,30 +1066,6 @@ public:
}
#endif // !_LIBCPP_HAS_NO_LOCALIZATION
- friend _LIBCPP_HIDE_FROM_ABI bool operator==(const path& __lhs, const path& __rhs) noexcept {
- return __lhs.__compare(__rhs.__pn_) == 0;
- }
- friend _LIBCPP_HIDE_FROM_ABI bool operator!=(const path& __lhs, const path& __rhs) noexcept {
- return __lhs.__compare(__rhs.__pn_) != 0;
- }
- friend _LIBCPP_HIDE_FROM_ABI bool operator<(const path& __lhs, const path& __rhs) noexcept {
- return __lhs.__compare(__rhs.__pn_) < 0;
- }
- friend _LIBCPP_HIDE_FROM_ABI bool operator<=(const path& __lhs, const path& __rhs) noexcept {
- return __lhs.__compare(__rhs.__pn_) <= 0;
- }
- friend _LIBCPP_HIDE_FROM_ABI bool operator>(const path& __lhs, const path& __rhs) noexcept {
- return __lhs.__compare(__rhs.__pn_) > 0;
- }
- friend _LIBCPP_HIDE_FROM_ABI bool operator>=(const path& __lhs, const path& __rhs) noexcept {
- return __lhs.__compare(__rhs.__pn_) >= 0;
- }
-
- friend _LIBCPP_HIDE_FROM_ABI path operator/(const path& __lhs, const path& __rhs) {
- path __result(__lhs);
- __result /= __rhs;
- return __result;
- }
private:
inline _LIBCPP_HIDE_FROM_ABI path&
__assign_view(__string_view const& __s) noexcept {
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/space_info.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/space_info.h
index d7dc03af75..d0747e35eb 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/space_info.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/space_info.h
@@ -28,6 +28,10 @@ struct _LIBCPP_TYPE_VIS space_info {
uintmax_t capacity;
uintmax_t free;
uintmax_t available;
+
+# if _LIBCPP_STD_VER > 17
+ friend _LIBCPP_HIDE_FROM_ABI bool operator==(const space_info&, const space_info&) = default;
+# endif
};
_LIBCPP_AVAILABILITY_FILESYSTEM_POP
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/buffer.h b/contrib/libs/cxxsupp/libcxx/include/__format/buffer.h
index d9b08064df..60c1f8093c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/buffer.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/buffer.h
@@ -11,21 +11,25 @@
#define _LIBCPP___FORMAT_BUFFER_H
#include <__algorithm/copy_n.h>
+#include <__algorithm/fill_n.h>
#include <__algorithm/max.h>
#include <__algorithm/min.h>
+#include <__algorithm/ranges_copy_n.h>
+#include <__algorithm/transform.h>
#include <__algorithm/unwrap_iter.h>
+#include <__concepts/same_as.h>
#include <__config>
+#include <__format/concepts.h>
#include <__format/enable_insertable.h>
#include <__format/format_to_n_result.h>
-#include <__format/formatter.h> // for __char_type TODO FMT Move the concept?
#include <__iterator/back_insert_iterator.h>
#include <__iterator/concepts.h>
#include <__iterator/incrementable_traits.h>
#include <__iterator/iterator_traits.h>
#include <__iterator/wrap_iter.h>
#include <__utility/move.h>
-#include <concepts>
#include <cstddef>
+#include <string_view>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -46,41 +50,125 @@ namespace __format {
/// This helper is used together with the @ref back_insert_iterator to offer
/// type-erasure for the formatting functions. This reduces the number to
/// template instantiations.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
class _LIBCPP_TEMPLATE_VIS __output_buffer {
public:
using value_type = _CharT;
template <class _Tp>
- _LIBCPP_HIDE_FROM_ABI explicit __output_buffer(_CharT* __ptr,
- size_t __capacity, _Tp* __obj)
- : __ptr_(__ptr), __capacity_(__capacity),
- __flush_([](_CharT* __p, size_t __size, void* __o) {
- static_cast<_Tp*>(__o)->flush(__p, __size);
- }),
+ _LIBCPP_HIDE_FROM_ABI explicit __output_buffer(_CharT* __ptr, size_t __capacity, _Tp* __obj)
+ : __ptr_(__ptr),
+ __capacity_(__capacity),
+ __flush_([](_CharT* __p, size_t __n, void* __o) { static_cast<_Tp*>(__o)->__flush(__p, __n); }),
__obj_(__obj) {}
- _LIBCPP_HIDE_FROM_ABI void reset(_CharT* __ptr, size_t __capacity) {
+ _LIBCPP_HIDE_FROM_ABI void __reset(_CharT* __ptr, size_t __capacity) {
__ptr_ = __ptr;
__capacity_ = __capacity;
}
- _LIBCPP_HIDE_FROM_ABI auto make_output_iterator() {
- return back_insert_iterator{*this};
- }
+ _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return std::back_insert_iterator{*this}; }
- // TODO FMT It would be nice to have an overload taking a
- // basic_string_view<_CharT> and append it directly.
+ // Used in std::back_insert_iterator.
_LIBCPP_HIDE_FROM_ABI void push_back(_CharT __c) {
__ptr_[__size_++] = __c;
// Profiling showed flushing after adding is more efficient than flushing
// when entering the function.
if (__size_ == __capacity_)
- flush();
+ __flush();
+ }
+
+ /// Copies the input __str to the buffer.
+ ///
+ /// Since some of the input is generated by std::to_chars, there needs to be a
+ /// conversion when _CharT is wchar_t.
+ template <__fmt_char_type _InCharT>
+ _LIBCPP_HIDE_FROM_ABI void __copy(basic_string_view<_InCharT> __str) {
+ // When the underlying iterator is a simple iterator the __capacity_ is
+ // infinite. For a string or container back_inserter it isn't. This means
+ // adding a large string the the buffer can cause some overhead. In that
+ // case a better approach could be:
+ // - flush the buffer
+ // - container.append(__str.begin(), __str.end());
+ // The same holds true for the fill.
+ // For transform it might be slightly harder, however the use case for
+ // transform is slightly less common; it converts hexadecimal values to
+ // upper case. For integral these strings are short.
+ // TODO FMT Look at the improvements above.
+ size_t __n = __str.size();
+
+ __flush_on_overflow(__n);
+ if (__n <= __capacity_) {
+ _VSTD::copy_n(__str.data(), __n, _VSTD::addressof(__ptr_[__size_]));
+ __size_ += __n;
+ return;
+ }
+
+ // The output doesn't fit in the internal buffer.
+ // Copy the data in "__capacity_" sized chunks.
+ _LIBCPP_ASSERT(__size_ == 0, "the buffer should be flushed by __flush_on_overflow");
+ const _InCharT* __first = __str.data();
+ do {
+ size_t __chunk = _VSTD::min(__n, __capacity_);
+ _VSTD::copy_n(__first, __chunk, _VSTD::addressof(__ptr_[__size_]));
+ __size_ = __chunk;
+ __first += __chunk;
+ __n -= __chunk;
+ __flush();
+ } while (__n);
+ }
+
+ /// A std::transform wrapper.
+ ///
+ /// Like @ref __copy it may need to do type conversion.
+ template <__fmt_char_type _InCharT, class _UnaryOperation>
+ _LIBCPP_HIDE_FROM_ABI void __transform(const _InCharT* __first, const _InCharT* __last, _UnaryOperation __operation) {
+ _LIBCPP_ASSERT(__first <= __last, "not a valid range");
+
+ size_t __n = static_cast<size_t>(__last - __first);
+ __flush_on_overflow(__n);
+ if (__n <= __capacity_) {
+ _VSTD::transform(__first, __last, _VSTD::addressof(__ptr_[__size_]), _VSTD::move(__operation));
+ __size_ += __n;
+ return;
+ }
+
+ // The output doesn't fit in the internal buffer.
+ // Transform the data in "__capacity_" sized chunks.
+ _LIBCPP_ASSERT(__size_ == 0, "the buffer should be flushed by __flush_on_overflow");
+ do {
+ size_t __chunk = _VSTD::min(__n, __capacity_);
+ _VSTD::transform(__first, __first + __chunk, _VSTD::addressof(__ptr_[__size_]), __operation);
+ __size_ = __chunk;
+ __first += __chunk;
+ __n -= __chunk;
+ __flush();
+ } while (__n);
}
- _LIBCPP_HIDE_FROM_ABI void flush() {
+ /// A \c fill_n wrapper.
+ _LIBCPP_HIDE_FROM_ABI void __fill(size_t __n, _CharT __value) {
+ __flush_on_overflow(__n);
+ if (__n <= __capacity_) {
+ _VSTD::fill_n(_VSTD::addressof(__ptr_[__size_]), __n, __value);
+ __size_ += __n;
+ return;
+ }
+
+ // The output doesn't fit in the internal buffer.
+ // Fill the buffer in "__capacity_" sized chunks.
+ _LIBCPP_ASSERT(__size_ == 0, "the buffer should be flushed by __flush_on_overflow");
+ do {
+ size_t __chunk = _VSTD::min(__n, __capacity_);
+ _VSTD::fill_n(_VSTD::addressof(__ptr_[__size_]), __chunk, __value);
+ __size_ = __chunk;
+ __n -= __chunk;
+ __flush();
+ } while (__n);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI void __flush() {
__flush_(__ptr_, __size_, __obj_);
__size_ = 0;
}
@@ -91,16 +179,54 @@ private:
size_t __size_{0};
void (*__flush_)(_CharT*, size_t, void*);
void* __obj_;
+
+ /// Flushes the buffer when the output operation would overflow the buffer.
+ ///
+ /// A simple approach for the overflow detection would be something along the
+ /// lines:
+ /// \code
+ /// // The internal buffer is large enough.
+ /// if (__n <= __capacity_) {
+ /// // Flush when we really would overflow.
+ /// if (__size_ + __n >= __capacity_)
+ /// __flush();
+ /// ...
+ /// }
+ /// \endcode
+ ///
+ /// This approach works for all cases but one:
+ /// A __format_to_n_buffer_base where \ref __enable_direct_output is true.
+ /// In that case the \ref __capacity_ of the buffer changes during the first
+ /// \ref __flush. During that operation the output buffer switches from its
+ /// __writer_ to its __storage_. The \ref __capacity_ of the former depends
+ /// on the value of n, of the latter is a fixed size. For example:
+ /// - a format_to_n call with a 10'000 char buffer,
+ /// - the buffer is filled with 9'500 chars,
+ /// - adding 1'000 elements would overflow the buffer so the buffer gets
+ /// changed and the \ref __capacity_ decreases from 10'000 to
+ /// __buffer_size (256 at the time of writing).
+ ///
+ /// This means that the \ref __flush for this class may need to copy a part of
+ /// the internal buffer to the proper output. In this example there will be
+ /// 500 characters that need this copy operation.
+ ///
+ /// Note it would be more efficient to write 500 chars directly and then swap
+ /// the buffers. This would make the code more complex and \ref format_to_n is
+ /// not the most common use case. Therefore the optimization isn't done.
+ _LIBCPP_HIDE_FROM_ABI void __flush_on_overflow(size_t __n) {
+ if (__size_ + __n >= __capacity_)
+ __flush();
+ }
};
/// A storage using an internal buffer.
///
/// This storage is used when writing a single element to the output iterator
/// is expensive.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
class _LIBCPP_TEMPLATE_VIS __internal_storage {
public:
- _LIBCPP_HIDE_FROM_ABI _CharT* begin() { return __buffer_; }
+ _LIBCPP_HIDE_FROM_ABI _CharT* __begin() { return __buffer_; }
static constexpr size_t __buffer_size = 256 / sizeof(_CharT);
@@ -113,11 +239,11 @@ private:
/// This requires the storage to be a contiguous buffer of \a _CharT.
/// Since the output is directly written to the underlying storage this class
/// is just an empty class.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
class _LIBCPP_TEMPLATE_VIS __direct_storage {};
template <class _OutIt, class _CharT>
-concept __enable_direct_output = __formatter::__char_type<_CharT> &&
+concept __enable_direct_output = __fmt_char_type<_CharT> &&
(same_as<_OutIt, _CharT*>
#ifndef _LIBCPP_ENABLE_DEBUG_MODE
|| same_as<_OutIt, __wrap_iter<_CharT*>>
@@ -125,18 +251,18 @@ concept __enable_direct_output = __formatter::__char_type<_CharT> &&
);
/// Write policy for directly writing to the underlying output.
-template <class _OutIt, __formatter::__char_type _CharT>
+template <class _OutIt, __fmt_char_type _CharT>
class _LIBCPP_TEMPLATE_VIS __writer_direct {
public:
_LIBCPP_HIDE_FROM_ABI explicit __writer_direct(_OutIt __out_it)
: __out_it_(__out_it) {}
- _LIBCPP_HIDE_FROM_ABI auto out() { return __out_it_; }
+ _LIBCPP_HIDE_FROM_ABI _OutIt __out_it() { return __out_it_; }
- _LIBCPP_HIDE_FROM_ABI void flush(_CharT*, size_t __size) {
+ _LIBCPP_HIDE_FROM_ABI void __flush(_CharT*, size_t __n) {
// _OutIt can be a __wrap_iter<CharT*>. Therefore the original iterator
// is adjusted.
- __out_it_ += __size;
+ __out_it_ += __n;
}
private:
@@ -144,16 +270,16 @@ private:
};
/// Write policy for copying the buffer to the output.
-template <class _OutIt, __formatter::__char_type _CharT>
+template <class _OutIt, __fmt_char_type _CharT>
class _LIBCPP_TEMPLATE_VIS __writer_iterator {
public:
_LIBCPP_HIDE_FROM_ABI explicit __writer_iterator(_OutIt __out_it)
: __out_it_{_VSTD::move(__out_it)} {}
- _LIBCPP_HIDE_FROM_ABI auto out() { return __out_it_; }
+ _LIBCPP_HIDE_FROM_ABI _OutIt __out_it() && { return std::move(__out_it_); }
- _LIBCPP_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
- __out_it_ = _VSTD::copy_n(__ptr, __size, _VSTD::move(__out_it_));
+ _LIBCPP_HIDE_FROM_ABI void __flush(_CharT* __ptr, size_t __n) {
+ __out_it_ = std::ranges::copy_n(__ptr, __n, std::move(__out_it_)).out;
}
private:
@@ -169,7 +295,7 @@ private:
/// \ref __enable_insertable.
template <class _Container>
concept __insertable =
- __enable_insertable<_Container> && __formatter::__char_type<typename _Container::value_type> &&
+ __enable_insertable<_Container> && __fmt_char_type<typename _Container::value_type> &&
requires(_Container& __t, add_pointer_t<typename _Container::value_type> __first,
add_pointer_t<typename _Container::value_type> __last) { __t.insert(__t.end(), __first, __last); };
@@ -193,10 +319,10 @@ public:
_LIBCPP_HIDE_FROM_ABI explicit __writer_container(back_insert_iterator<_Container> __out_it)
: __container_{__out_it.__get_container()} {}
- _LIBCPP_HIDE_FROM_ABI auto out() { return back_inserter(*__container_); }
+ _LIBCPP_HIDE_FROM_ABI auto __out_it() { return std::back_inserter(*__container_); }
- _LIBCPP_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
- __container_->insert(__container_->end(), __ptr, __ptr + __size);
+ _LIBCPP_HIDE_FROM_ABI void __flush(_CharT* __ptr, size_t __n) {
+ __container_->insert(__container_->end(), __ptr, __ptr + __n);
}
private:
@@ -215,7 +341,7 @@ public:
};
/// The generic formatting buffer.
-template <class _OutIt, __formatter::__char_type _CharT>
+template <class _OutIt, __fmt_char_type _CharT>
requires(output_iterator<_OutIt, const _CharT&>) class _LIBCPP_TEMPLATE_VIS
__format_buffer {
using _Storage =
@@ -225,24 +351,20 @@ requires(output_iterator<_OutIt, const _CharT&>) class _LIBCPP_TEMPLATE_VIS
public:
_LIBCPP_HIDE_FROM_ABI explicit __format_buffer(_OutIt __out_it)
requires(same_as<_Storage, __internal_storage<_CharT>>)
- : __output_(__storage_.begin(), __storage_.__buffer_size, this), __writer_(_VSTD::move(__out_it)) {}
+ : __output_(__storage_.__begin(), __storage_.__buffer_size, this), __writer_(_VSTD::move(__out_it)) {}
_LIBCPP_HIDE_FROM_ABI explicit __format_buffer(_OutIt __out_it) requires(
same_as<_Storage, __direct_storage<_CharT>>)
: __output_(_VSTD::__unwrap_iter(__out_it), size_t(-1), this),
__writer_(_VSTD::move(__out_it)) {}
- _LIBCPP_HIDE_FROM_ABI auto make_output_iterator() {
- return __output_.make_output_iterator();
- }
+ _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return __output_.__make_output_iterator(); }
- _LIBCPP_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
- __writer_.flush(__ptr, __size);
- }
+ _LIBCPP_HIDE_FROM_ABI void __flush(_CharT* __ptr, size_t __n) { __writer_.__flush(__ptr, __n); }
- _LIBCPP_HIDE_FROM_ABI _OutIt out() && {
- __output_.flush();
- return _VSTD::move(__writer_).out();
+ _LIBCPP_HIDE_FROM_ABI _OutIt __out_it() && {
+ __output_.__flush();
+ return _VSTD::move(__writer_).__out_it();
}
private:
@@ -255,46 +377,46 @@ private:
///
/// Since \ref formatted_size only needs to know the size, the output itself is
/// discarded.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
class _LIBCPP_TEMPLATE_VIS __formatted_size_buffer {
public:
- _LIBCPP_HIDE_FROM_ABI auto make_output_iterator() { return __output_.make_output_iterator(); }
+ _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return __output_.__make_output_iterator(); }
- _LIBCPP_HIDE_FROM_ABI void flush(const _CharT*, size_t __size) { __size_ += __size; }
+ _LIBCPP_HIDE_FROM_ABI void __flush(const _CharT*, size_t __n) { __size_ += __n; }
- _LIBCPP_HIDE_FROM_ABI size_t result() && {
- __output_.flush();
+ _LIBCPP_HIDE_FROM_ABI size_t __result() && {
+ __output_.__flush();
return __size_;
}
private:
__internal_storage<_CharT> __storage_;
- __output_buffer<_CharT> __output_{__storage_.begin(), __storage_.__buffer_size, this};
+ __output_buffer<_CharT> __output_{__storage_.__begin(), __storage_.__buffer_size, this};
size_t __size_{0};
};
/// The base of a buffer that counts and limits the number of insertions.
-template <class _OutIt, __formatter::__char_type _CharT, bool>
+template <class _OutIt, __fmt_char_type _CharT, bool>
requires(output_iterator<_OutIt, const _CharT&>)
struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base {
using _Size = iter_difference_t<_OutIt>;
public:
- _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __n)
- : __writer_(_VSTD::move(__out_it)), __n_(_VSTD::max(_Size(0), __n)) {}
+ _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __max_size)
+ : __writer_(_VSTD::move(__out_it)), __max_size_(_VSTD::max(_Size(0), __max_size)) {}
- _LIBCPP_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
- if (_Size(__size_) <= __n_)
- __writer_.flush(__ptr, _VSTD::min(_Size(__size), __n_ - __size_));
- __size_ += __size;
+ _LIBCPP_HIDE_FROM_ABI void __flush(_CharT* __ptr, size_t __n) {
+ if (_Size(__size_) <= __max_size_)
+ __writer_.__flush(__ptr, _VSTD::min(_Size(__n), __max_size_ - __size_));
+ __size_ += __n;
}
protected:
__internal_storage<_CharT> __storage_;
- __output_buffer<_CharT> __output_{__storage_.begin(), __storage_.__buffer_size, this};
+ __output_buffer<_CharT> __output_{__storage_.__begin(), __storage_.__buffer_size, this};
typename __writer_selector<_OutIt, _CharT>::type __writer_;
- _Size __n_;
+ _Size __max_size_;
_Size __size_{0};
};
@@ -302,35 +424,46 @@ protected:
///
/// This version is used when \c __enable_direct_output<_OutIt, _CharT> == true.
///
-/// This class limits the size available the the direct writer so it will not
+/// This class limits the size available to the direct writer so it will not
/// exceed the maximum number of code units.
-template <class _OutIt, __formatter::__char_type _CharT>
+template <class _OutIt, __fmt_char_type _CharT>
requires(output_iterator<_OutIt, const _CharT&>)
class _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base<_OutIt, _CharT, true> {
using _Size = iter_difference_t<_OutIt>;
public:
- _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __n)
- : __output_(_VSTD::__unwrap_iter(__out_it), __n, this), __writer_(_VSTD::move(__out_it)) {
- if (__n <= 0) [[unlikely]]
- __output_.reset(__storage_.begin(), __storage_.__buffer_size);
+ _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __max_size)
+ : __output_(_VSTD::__unwrap_iter(__out_it), __max_size, this),
+ __writer_(_VSTD::move(__out_it)),
+ __max_size_(__max_size) {
+ if (__max_size <= 0) [[unlikely]]
+ __output_.__reset(__storage_.__begin(), __storage_.__buffer_size);
}
- _LIBCPP_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
- // A flush to the direct writer happens in two occasions:
+ _LIBCPP_HIDE_FROM_ABI void __flush(_CharT* __ptr, size_t __n) {
+ // A __flush to the direct writer happens in the following occasions:
// - The format function has written the maximum number of allowed code
// units. At this point it's no longer valid to write to this writer. So
// switch to the internal storage. This internal storage doesn't need to
- // be written anywhere so the flush for that storage writes no output.
+ // be written anywhere so the __flush for that storage writes no output.
+ // - Like above, but the next "mass write" operation would overflow the
+ // buffer. In that case the buffer is pre-emptively switched. The still
+ // valid code units will be written separately.
// - The format_to_n function is finished. In this case there's no need to
// switch the buffer, but for simplicity the buffers are still switched.
- // When the __n <= 0 the constructor already switched the buffers.
- if (__size_ == 0 && __ptr != __storage_.begin()) {
- __writer_.flush(__ptr, __size);
- __output_.reset(__storage_.begin(), __storage_.__buffer_size);
+ // When the __max_size <= 0 the constructor already switched the buffers.
+ if (__size_ == 0 && __ptr != __storage_.__begin()) {
+ __writer_.__flush(__ptr, __n);
+ __output_.__reset(__storage_.__begin(), __storage_.__buffer_size);
+ } else if (__size_ < __max_size_) {
+ // Copies a part of the internal buffer to the output up to n characters.
+ // See __output_buffer<_CharT>::__flush_on_overflow for more information.
+ _Size __s = _VSTD::min(_Size(__n), __max_size_ - __size_);
+ std::copy_n(__ptr, __s, __writer_.__out_it());
+ __writer_.__flush(__ptr, __s);
}
- __size_ += __size;
+ __size_ += __n;
}
protected:
@@ -338,11 +471,12 @@ protected:
__output_buffer<_CharT> __output_;
__writer_direct<_OutIt, _CharT> __writer_;
+ _Size __max_size_;
_Size __size_{0};
};
/// The buffer that counts and limits the number of insertions.
-template <class _OutIt, __formatter::__char_type _CharT>
+template <class _OutIt, __fmt_char_type _CharT>
requires(output_iterator<_OutIt, const _CharT&>)
struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer final
: public __format_to_n_buffer_base< _OutIt, _CharT, __enable_direct_output<_OutIt, _CharT>> {
@@ -350,12 +484,13 @@ struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer final
using _Size = iter_difference_t<_OutIt>;
public:
- _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer(_OutIt __out_it, _Size __n) : _Base(_VSTD::move(__out_it), __n) {}
- _LIBCPP_HIDE_FROM_ABI auto make_output_iterator() { return this->__output_.make_output_iterator(); }
+ _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer(_OutIt __out_it, _Size __max_size)
+ : _Base(_VSTD::move(__out_it), __max_size) {}
+ _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return this->__output_.__make_output_iterator(); }
- _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> result() && {
- this->__output_.flush();
- return {_VSTD::move(this->__writer_).out(), this->__size_};
+ _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __result() && {
+ this->__output_.__flush();
+ return {_VSTD::move(this->__writer_).__out_it(), this->__size_};
}
};
} // namespace __format
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/concepts.h b/contrib/libs/cxxsupp/libcxx/include/__format/concepts.h
index 8df6493b0a..5407feebf7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/concepts.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/concepts.h
@@ -25,6 +25,15 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
+/// The character type specializations of \ref formatter.
+template <class _CharT>
+concept __fmt_char_type =
+ same_as<_CharT, char>
+# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+ || same_as<_CharT, wchar_t>
+# endif
+ ;
+
// The output iterator isn't specified. A formatter should accept any
// output_iterator. This iterator is a minimal iterator to test the concept.
// (Note testing for (w)format_context would be a valid choice, but requires
@@ -32,20 +41,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT>
using __fmt_iter_for = _CharT*;
-// The concept is based on P2286R6
-// It lacks the const of __cf as required by, the not yet accepted, LWG-3636.
-// The current formatters can't be easily adapted, but that is WIP.
-// TODO FMT properly implement this concepts once accepted.
template <class _Tp, class _CharT>
-concept __formattable = (semiregular<formatter<remove_cvref_t<_Tp>, _CharT>>) &&
- requires(formatter<remove_cvref_t<_Tp>, _CharT> __f,
- formatter<remove_cvref_t<_Tp>, _CharT> __cf, _Tp __t,
- basic_format_context<__fmt_iter_for<_CharT>, _CharT> __fc,
- basic_format_parse_context<_CharT> __pc) {
- { __f.parse(__pc) } -> same_as<typename basic_format_parse_context<_CharT>::iterator>;
- { __cf.format(__t, __fc) } -> same_as<__fmt_iter_for<_CharT>>;
- };
+concept __formattable =
+ (semiregular<formatter<remove_cvref_t<_Tp>, _CharT>>) &&
+ requires(formatter<remove_cvref_t<_Tp>, _CharT> __f,
+ const formatter<remove_cvref_t<_Tp>, _CharT> __cf,
+ _Tp __t,
+ basic_format_context<__fmt_iter_for<_CharT>, _CharT> __fc,
+ basic_format_parse_context<_CharT> __pc) {
+ { __f.parse(__pc) } -> same_as<typename basic_format_parse_context<_CharT>::iterator>;
+ { __cf.format(__t, __fc) } -> same_as<__fmt_iter_for<_CharT>>;
+ };
+# if _LIBCPP_STD_VER > 20
+template <class _Tp, class _CharT>
+concept formattable = __formattable<_Tp, _CharT>;
+# endif //_LIBCPP_STD_VER > 20
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/escaped_output_table.h b/contrib/libs/cxxsupp/libcxx/include/__format/escaped_output_table.h
new file mode 100644
index 0000000000..bd2994bdc6
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/escaped_output_table.h
@@ -0,0 +1,1038 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// WARNING, this entire header is generated by
+// utils/generate_escaped_output_table.py
+// DO NOT MODIFY!
+
+// UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
+//
+// See Terms of Use <https://www.unicode.org/copyright.html>
+// for definitions of Unicode Inc.'s Data Files and Software.
+//
+// NOTICE TO USER: Carefully read the following legal agreement.
+// BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
+// DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
+// YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+// TERMS AND CONDITIONS OF THIS AGREEMENT.
+// IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
+// THE DATA FILES OR SOFTWARE.
+//
+// COPYRIGHT AND PERMISSION NOTICE
+//
+// Copyright (c) 1991-2022 Unicode, Inc. All rights reserved.
+// Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of the Unicode data files and any associated documentation
+// (the "Data Files") or Unicode software and any associated documentation
+// (the "Software") to deal in the Data Files or Software
+// without restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, and/or sell copies of
+// the Data Files or Software, and to permit persons to whom the Data Files
+// or Software are furnished to do so, provided that either
+// (a) this copyright and permission notice appear with all copies
+// of the Data Files or Software, or
+// (b) this copyright and permission notice appear in associated
+// Documentation.
+//
+// THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+// IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+// NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+// DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+// DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+// TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+//
+// Except as contained in this notice, the name of a copyright holder
+// shall not be used in advertising or otherwise to promote the sale,
+// use or other dealings in these Data Files or Software without prior
+// written authorization of the copyright holder.
+
+#ifndef _LIBCPP___FORMAT_ESCAPED_OUTPUT_TABLE_H
+#define _LIBCPP___FORMAT_ESCAPED_OUTPUT_TABLE_H
+
+#include <__algorithm/ranges_upper_bound.h>
+#include <__config>
+#include <cstddef>
+#include <cstdint>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 20
+
+namespace __escaped_output_table {
+
+/// The entries of the characters to escape in format's debug string.
+///
+/// Contains the entries for [format.string.escaped]/2.2.1.2.1
+/// CE is a Unicode encoding and C corresponds to either a UCS scalar value
+/// whose Unicode property General_Category has a value in the groups
+/// Separator (Z) or Other (C) or to a UCS scalar value which has the Unicode
+/// property Grapheme_Extend=Yes, as described by table 12 of UAX #44
+///
+/// Separator (Z) consists of General_Category
+/// - Space_Separator,
+/// - Line_Separator,
+/// - Paragraph_Separator.
+///
+/// Other (C) consists of General_Category
+/// - Control,
+/// - Format,
+/// - Surrogate,
+/// - Private_Use,
+/// - Unassigned.
+///
+/// The data is generated from
+/// - https://www.unicode.org/Public/UCD/latest/ucd/DerivedCoreProperties.txt
+/// - https://www.unicode.org/Public/UCD/latest/ucd/extracted/DerivedGeneralCategory.txt
+///
+/// The table is similar to the table
+/// __extended_grapheme_custer_property_boundary::__entries
+/// which explains the details of these classes. The only difference is this
+/// table lacks a property, thus having more bits available for the size.
+///
+/// The data has 2 values:
+/// - bits [0, 10] The size of the range, allowing 2048 elements.
+/// - bits [11, 31] The lower bound code point of the range. The upper bound of
+/// the range is lower bound + size.
+inline constexpr uint32_t __entries[893] = {
+ 0x00000020,
+ 0x0003f821,
+ 0x00056800,
+ 0x0018006f,
+ 0x001bc001,
+ 0x001c0003,
+ 0x001c5800,
+ 0x001c6800,
+ 0x001d1000,
+ 0x00241806,
+ 0x00298000,
+ 0x002ab801,
+ 0x002c5801,
+ 0x002c802d,
+ 0x002df800,
+ 0x002e0801,
+ 0x002e2001,
+ 0x002e3808,
+ 0x002f5803,
+ 0x002fa810,
+ 0x0030800a,
+ 0x0030e000,
+ 0x00325814,
+ 0x00338000,
+ 0x0036b007,
+ 0x0036f805,
+ 0x00373801,
+ 0x00375003,
+ 0x00387001,
+ 0x00388800,
+ 0x0039801c,
+ 0x003d300a,
+ 0x003d900d,
+ 0x003f5808,
+ 0x003fd802,
+ 0x0040b003,
+ 0x0040d808,
+ 0x00412802,
+ 0x00414806,
+ 0x0041f800,
+ 0x0042c804,
+ 0x0042f800,
+ 0x00435804,
+ 0x00447810,
+ 0x00465038,
+ 0x0049d000,
+ 0x0049e000,
+ 0x004a0807,
+ 0x004a6800,
+ 0x004a8806,
+ 0x004b1001,
+ 0x004c0800,
+ 0x004c2000,
+ 0x004c6801,
+ 0x004c8801,
+ 0x004d4800,
+ 0x004d8800,
+ 0x004d9802,
+ 0x004dd002,
+ 0x004df000,
+ 0x004e0805,
+ 0x004e4801,
+ 0x004e6800,
+ 0x004e780c,
+ 0x004ef000,
+ 0x004f1003,
+ 0x004ff004,
+ 0x00502000,
+ 0x00505803,
+ 0x00508801,
+ 0x00514800,
+ 0x00518800,
+ 0x0051a000,
+ 0x0051b800,
+ 0x0051d003,
+ 0x00520817,
+ 0x0052e800,
+ 0x0052f806,
+ 0x00538001,
+ 0x0053a800,
+ 0x0053b80b,
+ 0x00542000,
+ 0x00547000,
+ 0x00549000,
+ 0x00554800,
+ 0x00558800,
+ 0x0055a000,
+ 0x0055d002,
+ 0x00560807,
+ 0x00565000,
+ 0x00566802,
+ 0x0056880e,
+ 0x00571003,
+ 0x00579006,
+ 0x0057d007,
+ 0x00582000,
+ 0x00586801,
+ 0x00588801,
+ 0x00594800,
+ 0x00598800,
+ 0x0059a000,
+ 0x0059d002,
+ 0x0059f001,
+ 0x005a0805,
+ 0x005a4801,
+ 0x005a680e,
+ 0x005af000,
+ 0x005b1003,
+ 0x005bc00a,
+ 0x005c2000,
+ 0x005c5802,
+ 0x005c8800,
+ 0x005cb002,
+ 0x005cd800,
+ 0x005ce800,
+ 0x005d0002,
+ 0x005d2802,
+ 0x005d5802,
+ 0x005dd004,
+ 0x005e0000,
+ 0x005e1802,
+ 0x005e4800,
+ 0x005e6802,
+ 0x005e8814,
+ 0x005fd805,
+ 0x00602000,
+ 0x00606800,
+ 0x00608800,
+ 0x00614800,
+ 0x0061d002,
+ 0x0061f002,
+ 0x00622812,
+ 0x0062d801,
+ 0x0062f001,
+ 0x00631003,
+ 0x00638006,
+ 0x00640800,
+ 0x00646800,
+ 0x00648800,
+ 0x00654800,
+ 0x0065a000,
+ 0x0065d002,
+ 0x0065f800,
+ 0x00661000,
+ 0x00662801,
+ 0x00664800,
+ 0x00666010,
+ 0x0066f800,
+ 0x00671003,
+ 0x00678000,
+ 0x0067a00d,
+ 0x00686800,
+ 0x00688800,
+ 0x0069d801,
+ 0x0069f000,
+ 0x006a0804,
+ 0x006a4800,
+ 0x006a6800,
+ 0x006a8003,
+ 0x006ab800,
+ 0x006b1003,
+ 0x006c0001,
+ 0x006c2000,
+ 0x006cb802,
+ 0x006d9000,
+ 0x006de000,
+ 0x006df001,
+ 0x006e3808,
+ 0x006e9005,
+ 0x006ef806,
+ 0x006f8001,
+ 0x006fa80b,
+ 0x00718800,
+ 0x0071a00a,
+ 0x00723807,
+ 0x0072e024,
+ 0x00741800,
+ 0x00742800,
+ 0x00745800,
+ 0x00752000,
+ 0x00753000,
+ 0x00758800,
+ 0x0075a008,
+ 0x0075f001,
+ 0x00762800,
+ 0x00763808,
+ 0x0076d001,
+ 0x0077001f,
+ 0x0078c001,
+ 0x0079a800,
+ 0x0079b800,
+ 0x0079c800,
+ 0x007a4000,
+ 0x007b6811,
+ 0x007c0004,
+ 0x007c3001,
+ 0x007c6830,
+ 0x007e3000,
+ 0x007e6800,
+ 0x007ed824,
+ 0x00816803,
+ 0x00819005,
+ 0x0081c801,
+ 0x0081e801,
+ 0x0082c001,
+ 0x0082f002,
+ 0x00838803,
+ 0x00841000,
+ 0x00842801,
+ 0x00846800,
+ 0x0084e800,
+ 0x00863000,
+ 0x00864004,
+ 0x00867001,
+ 0x00924800,
+ 0x00927001,
+ 0x0092b800,
+ 0x0092c800,
+ 0x0092f001,
+ 0x00944800,
+ 0x00947001,
+ 0x00958800,
+ 0x0095b001,
+ 0x0095f800,
+ 0x00960800,
+ 0x00963001,
+ 0x0096b800,
+ 0x00988800,
+ 0x0098b001,
+ 0x009ad804,
+ 0x009be802,
+ 0x009cd005,
+ 0x009fb001,
+ 0x009ff001,
+ 0x00b40000,
+ 0x00b4e802,
+ 0x00b7c806,
+ 0x00b89002,
+ 0x00b8b008,
+ 0x00b99001,
+ 0x00b9b808,
+ 0x00ba900d,
+ 0x00bb6800,
+ 0x00bb880e,
+ 0x00bda001,
+ 0x00bdb806,
+ 0x00be3000,
+ 0x00be480a,
+ 0x00bee802,
+ 0x00bf5005,
+ 0x00bfd005,
+ 0x00c05804,
+ 0x00c0d005,
+ 0x00c3c806,
+ 0x00c42801,
+ 0x00c54800,
+ 0x00c55804,
+ 0x00c7b009,
+ 0x00c8f803,
+ 0x00c93801,
+ 0x00c96003,
+ 0x00c99000,
+ 0x00c9c806,
+ 0x00ca0802,
+ 0x00cb7001,
+ 0x00cba80a,
+ 0x00cd6003,
+ 0x00ce5005,
+ 0x00ced802,
+ 0x00d0b801,
+ 0x00d0d802,
+ 0x00d2b000,
+ 0x00d2c008,
+ 0x00d31000,
+ 0x00d32807,
+ 0x00d3980c,
+ 0x00d45005,
+ 0x00d4d005,
+ 0x00d57055,
+ 0x00d9a006,
+ 0x00d9e000,
+ 0x00da1000,
+ 0x00da6802,
+ 0x00db5808,
+ 0x00dbf802,
+ 0x00dd1003,
+ 0x00dd4001,
+ 0x00dd5802,
+ 0x00df3000,
+ 0x00df4001,
+ 0x00df6800,
+ 0x00df7802,
+ 0x00dfa007,
+ 0x00e16007,
+ 0x00e1b004,
+ 0x00e25002,
+ 0x00e44806,
+ 0x00e5d801,
+ 0x00e6400a,
+ 0x00e6a00c,
+ 0x00e71006,
+ 0x00e76800,
+ 0x00e7a000,
+ 0x00e7c001,
+ 0x00e7d804,
+ 0x00ee003f,
+ 0x00f8b001,
+ 0x00f8f001,
+ 0x00fa3001,
+ 0x00fa7001,
+ 0x00fac000,
+ 0x00fad000,
+ 0x00fae000,
+ 0x00faf000,
+ 0x00fbf001,
+ 0x00fda800,
+ 0x00fe2800,
+ 0x00fea001,
+ 0x00fee000,
+ 0x00ff8001,
+ 0x00ffa800,
+ 0x00fff810,
+ 0x01014007,
+ 0x0102f810,
+ 0x01039001,
+ 0x01047800,
+ 0x0104e802,
+ 0x0106083e,
+ 0x010c6003,
+ 0x01213818,
+ 0x01225814,
+ 0x015ba001,
+ 0x015cb000,
+ 0x01677802,
+ 0x0167a004,
+ 0x01693000,
+ 0x01694004,
+ 0x01697001,
+ 0x016b4006,
+ 0x016b880e,
+ 0x016cb808,
+ 0x016d3800,
+ 0x016d7800,
+ 0x016db800,
+ 0x016df800,
+ 0x016e3800,
+ 0x016e7800,
+ 0x016eb800,
+ 0x016ef820,
+ 0x0172f021,
+ 0x0174d000,
+ 0x0177a00b,
+ 0x017eb019,
+ 0x017fe004,
+ 0x01815005,
+ 0x01820000,
+ 0x0184b803,
+ 0x01880004,
+ 0x01898000,
+ 0x018c7800,
+ 0x018f200b,
+ 0x0190f800,
+ 0x05246802,
+ 0x05263808,
+ 0x05316013,
+ 0x05337803,
+ 0x0533a009,
+ 0x0534f001,
+ 0x05378001,
+ 0x0537c007,
+ 0x053e5804,
+ 0x053e9000,
+ 0x053ea000,
+ 0x053ed017,
+ 0x05401000,
+ 0x05403000,
+ 0x05405800,
+ 0x05412801,
+ 0x05416003,
+ 0x0541d005,
+ 0x0543c007,
+ 0x05462009,
+ 0x0546d017,
+ 0x0547f800,
+ 0x05493007,
+ 0x054a380a,
+ 0x054aa00a,
+ 0x054be805,
+ 0x054d9800,
+ 0x054db003,
+ 0x054de001,
+ 0x054e7000,
+ 0x054ed003,
+ 0x054f2800,
+ 0x054ff800,
+ 0x05514805,
+ 0x05518801,
+ 0x0551a80a,
+ 0x05521800,
+ 0x05526000,
+ 0x05527001,
+ 0x0552d001,
+ 0x0553e000,
+ 0x05558000,
+ 0x05559002,
+ 0x0555b801,
+ 0x0555f001,
+ 0x05560800,
+ 0x05561817,
+ 0x05576001,
+ 0x0557b00a,
+ 0x05583801,
+ 0x05587801,
+ 0x0558b808,
+ 0x05593800,
+ 0x05597800,
+ 0x055b6003,
+ 0x055f2800,
+ 0x055f4000,
+ 0x055f6802,
+ 0x055fd005,
+ 0x06bd200b,
+ 0x06be3803,
+ 0x06bfe7ff,
+ 0x06ffe7ff,
+ 0x073fe7ff,
+ 0x077fe7ff,
+ 0x07bfe103,
+ 0x07d37001,
+ 0x07d6d025,
+ 0x07d8380b,
+ 0x07d8c004,
+ 0x07d8f000,
+ 0x07d9b800,
+ 0x07d9e800,
+ 0x07d9f800,
+ 0x07da1000,
+ 0x07da2800,
+ 0x07de180f,
+ 0x07ec8001,
+ 0x07ee4006,
+ 0x07ee801f,
+ 0x07f0000f,
+ 0x07f0d015,
+ 0x07f29800,
+ 0x07f33800,
+ 0x07f36003,
+ 0x07f3a800,
+ 0x07f7e803,
+ 0x07fcf001,
+ 0x07fdf802,
+ 0x07fe4001,
+ 0x07fe8001,
+ 0x07fec001,
+ 0x07fee802,
+ 0x07ff3800,
+ 0x07ff780c,
+ 0x07fff001,
+ 0x08006000,
+ 0x08013800,
+ 0x0801d800,
+ 0x0801f000,
+ 0x08027001,
+ 0x0802f021,
+ 0x0807d804,
+ 0x08081803,
+ 0x0809a002,
+ 0x080c7800,
+ 0x080ce802,
+ 0x080d082e,
+ 0x080fe882,
+ 0x0814e802,
+ 0x0816880f,
+ 0x0817e003,
+ 0x08192008,
+ 0x081a5804,
+ 0x081bb009,
+ 0x081cf000,
+ 0x081e2003,
+ 0x081eb029,
+ 0x0824f001,
+ 0x08255005,
+ 0x0826a003,
+ 0x0827e003,
+ 0x08294007,
+ 0x082b200a,
+ 0x082bd800,
+ 0x082c5800,
+ 0x082c9800,
+ 0x082cb000,
+ 0x082d1000,
+ 0x082d9000,
+ 0x082dd000,
+ 0x082de842,
+ 0x0839b808,
+ 0x083ab009,
+ 0x083b4017,
+ 0x083c3000,
+ 0x083d8800,
+ 0x083dd844,
+ 0x08403001,
+ 0x08404800,
+ 0x0841b000,
+ 0x0841c802,
+ 0x0841e801,
+ 0x0842b000,
+ 0x0844f807,
+ 0x0845802f,
+ 0x08479800,
+ 0x0847b004,
+ 0x0848e002,
+ 0x0849d004,
+ 0x084a003f,
+ 0x084dc003,
+ 0x084e8001,
+ 0x0850080e,
+ 0x0850a000,
+ 0x0850c000,
+ 0x0851b009,
+ 0x08524806,
+ 0x0852c806,
+ 0x0855001f,
+ 0x08572805,
+ 0x0857b808,
+ 0x0859b002,
+ 0x085ab001,
+ 0x085b9804,
+ 0x085c9006,
+ 0x085ce80b,
+ 0x085d804f,
+ 0x08624836,
+ 0x0865980c,
+ 0x08679806,
+ 0x0869200b,
+ 0x0869d125,
+ 0x0873f800,
+ 0x08755002,
+ 0x08757001,
+ 0x0875904d,
+ 0x08794007,
+ 0x087a300a,
+ 0x087ad015,
+ 0x087c1003,
+ 0x087c5025,
+ 0x087e6013,
+ 0x087fb808,
+ 0x08800800,
+ 0x0881c00e,
+ 0x08827003,
+ 0x08838000,
+ 0x08839801,
+ 0x0883b00b,
+ 0x08859803,
+ 0x0885c801,
+ 0x0885e800,
+ 0x0886100d,
+ 0x08874806,
+ 0x0887d008,
+ 0x08893804,
+ 0x08896808,
+ 0x088a4007,
+ 0x088b9800,
+ 0x088bb80a,
+ 0x088db008,
+ 0x088e4803,
+ 0x088e7800,
+ 0x088f0000,
+ 0x088fa80a,
+ 0x08909000,
+ 0x08917802,
+ 0x0891a000,
+ 0x0891b001,
+ 0x0891f000,
+ 0x0892083e,
+ 0x08943800,
+ 0x08944800,
+ 0x08947000,
+ 0x0894f000,
+ 0x08955005,
+ 0x0896f800,
+ 0x0897180c,
+ 0x0897d007,
+ 0x08982000,
+ 0x08986801,
+ 0x08988801,
+ 0x08994800,
+ 0x08998800,
+ 0x0899a000,
+ 0x0899d002,
+ 0x0899f000,
+ 0x089a0000,
+ 0x089a2801,
+ 0x089a4801,
+ 0x089a7001,
+ 0x089a880b,
+ 0x089b209b,
+ 0x08a1c007,
+ 0x08a21002,
+ 0x08a23000,
+ 0x08a2e000,
+ 0x08a2f000,
+ 0x08a3101d,
+ 0x08a58000,
+ 0x08a59805,
+ 0x08a5d000,
+ 0x08a5e800,
+ 0x08a5f801,
+ 0x08a61001,
+ 0x08a64007,
+ 0x08a6d0a5,
+ 0x08ad7800,
+ 0x08ad9005,
+ 0x08ade001,
+ 0x08adf801,
+ 0x08aee023,
+ 0x08b19807,
+ 0x08b1e800,
+ 0x08b1f801,
+ 0x08b2280a,
+ 0x08b2d005,
+ 0x08b36812,
+ 0x08b55800,
+ 0x08b56800,
+ 0x08b58005,
+ 0x08b5b800,
+ 0x08b5d005,
+ 0x08b65035,
+ 0x08b8d804,
+ 0x08b91003,
+ 0x08b93808,
+ 0x08ba38b8,
+ 0x08c17808,
+ 0x08c1c801,
+ 0x08c1e063,
+ 0x08c7980b,
+ 0x08c83801,
+ 0x08c85001,
+ 0x08c8a000,
+ 0x08c8b800,
+ 0x08c98000,
+ 0x08c9b000,
+ 0x08c9c803,
+ 0x08c9f000,
+ 0x08ca1800,
+ 0x08ca3808,
+ 0x08cad045,
+ 0x08cd4001,
+ 0x08cea007,
+ 0x08cf0000,
+ 0x08cf281a,
+ 0x08d00809,
+ 0x08d19805,
+ 0x08d1d803,
+ 0x08d23808,
+ 0x08d28805,
+ 0x08d2c802,
+ 0x08d4500c,
+ 0x08d4c001,
+ 0x08d5180c,
+ 0x08d7c806,
+ 0x08d850f5,
+ 0x08e04800,
+ 0x08e1800d,
+ 0x08e1f800,
+ 0x08e23009,
+ 0x08e36802,
+ 0x08e48018,
+ 0x08e55006,
+ 0x08e59001,
+ 0x08e5a84a,
+ 0x08e83800,
+ 0x08e85000,
+ 0x08e98814,
+ 0x08ea3808,
+ 0x08ead005,
+ 0x08eb3000,
+ 0x08eb4800,
+ 0x08ec7803,
+ 0x08eca800,
+ 0x08ecb800,
+ 0x08ecc806,
+ 0x08ed5135,
+ 0x08f79801,
+ 0x08f7c808,
+ 0x08f88800,
+ 0x08f9b007,
+ 0x08fa0000,
+ 0x08fa1000,
+ 0x08fad055,
+ 0x08fd880e,
+ 0x08ff900c,
+ 0x091cd065,
+ 0x09237800,
+ 0x0923a80a,
+ 0x092a27ff,
+ 0x096a224b,
+ 0x097f980c,
+ 0x09a18010,
+ 0x09a23fff,
+ 0x09e23fb8,
+ 0x0a323fff,
+ 0x0a723fff,
+ 0x0ab23fff,
+ 0x0af23fff,
+ 0x0b3239b8,
+ 0x0b51c806,
+ 0x0b52f800,
+ 0x0b535003,
+ 0x0b55f800,
+ 0x0b565005,
+ 0x0b577006,
+ 0x0b57b009,
+ 0x0b598006,
+ 0x0b5a3009,
+ 0x0b5ad000,
+ 0x0b5b1000,
+ 0x0b5bc004,
+ 0x0b5c82af,
+ 0x0b74d864,
+ 0x0b7a5804,
+ 0x0b7c400a,
+ 0x0b7d003f,
+ 0x0b7f200b,
+ 0x0b7f900d,
+ 0x0c3fc007,
+ 0x0c66b029,
+ 0x0c684fff,
+ 0x0ca84fff,
+ 0x0ce84fff,
+ 0x0d284fff,
+ 0x0d684ae6,
+ 0x0d7fa000,
+ 0x0d7fe000,
+ 0x0d7ff800,
+ 0x0d89180e,
+ 0x0d89981c,
+ 0x0d8a9801,
+ 0x0d8ab00d,
+ 0x0d8b4007,
+ 0x0d97e7ff,
+ 0x0dd7e103,
+ 0x0de35804,
+ 0x0de3e802,
+ 0x0de44806,
+ 0x0de4d001,
+ 0x0de4e801,
+ 0x0de507ff,
+ 0x0e2507ff,
+ 0x0e6502af,
+ 0x0e7e203b,
+ 0x0e87b009,
+ 0x0e893801,
+ 0x0e8b2800,
+ 0x0e8b3802,
+ 0x0e8b7014,
+ 0x0e8c2806,
+ 0x0e8d5003,
+ 0x0e8f5814,
+ 0x0e921002,
+ 0x0e923079,
+ 0x0e96a00b,
+ 0x0e97a00b,
+ 0x0e9ab808,
+ 0x0e9bc886,
+ 0x0ea2a800,
+ 0x0ea4e800,
+ 0x0ea50001,
+ 0x0ea51801,
+ 0x0ea53801,
+ 0x0ea56800,
+ 0x0ea5d000,
+ 0x0ea5e000,
+ 0x0ea62000,
+ 0x0ea83000,
+ 0x0ea85801,
+ 0x0ea8a800,
+ 0x0ea8e800,
+ 0x0ea9d000,
+ 0x0ea9f800,
+ 0x0eaa2800,
+ 0x0eaa3802,
+ 0x0eaa8800,
+ 0x0eb53001,
+ 0x0ebe6001,
+ 0x0ed00036,
+ 0x0ed1d831,
+ 0x0ed3a800,
+ 0x0ed42000,
+ 0x0ed46473,
+ 0x0ef8f805,
+ 0x0ef95904,
+ 0x0f037091,
+ 0x0f096809,
+ 0x0f09f001,
+ 0x0f0a5003,
+ 0x0f0a813f,
+ 0x0f157011,
+ 0x0f176003,
+ 0x0f17d004,
+ 0x0f1801cf,
+ 0x0f276003,
+ 0x0f27d2e5,
+ 0x0f3f3800,
+ 0x0f3f6000,
+ 0x0f3f7800,
+ 0x0f3ff800,
+ 0x0f462801,
+ 0x0f46802f,
+ 0x0f4a2006,
+ 0x0f4a6003,
+ 0x0f4ad003,
+ 0x0f4b0310,
+ 0x0f65a84b,
+ 0x0f69f0c1,
+ 0x0f702000,
+ 0x0f710000,
+ 0x0f711800,
+ 0x0f712801,
+ 0x0f714000,
+ 0x0f719800,
+ 0x0f71c000,
+ 0x0f71d000,
+ 0x0f71e005,
+ 0x0f721803,
+ 0x0f724000,
+ 0x0f725000,
+ 0x0f726000,
+ 0x0f728000,
+ 0x0f729800,
+ 0x0f72a801,
+ 0x0f72c000,
+ 0x0f72d000,
+ 0x0f72e000,
+ 0x0f72f000,
+ 0x0f730000,
+ 0x0f731800,
+ 0x0f732801,
+ 0x0f735800,
+ 0x0f739800,
+ 0x0f73c000,
+ 0x0f73e800,
+ 0x0f73f800,
+ 0x0f745000,
+ 0x0f74e004,
+ 0x0f752000,
+ 0x0f755000,
+ 0x0f75e033,
+ 0x0f77910d,
+ 0x0f816003,
+ 0x0f84a00b,
+ 0x0f857801,
+ 0x0f860000,
+ 0x0f868000,
+ 0x0f87b009,
+ 0x0f8d7037,
+ 0x0f90180c,
+ 0x0f91e003,
+ 0x0f924806,
+ 0x0f92900d,
+ 0x0f933099,
+ 0x0fb6c003,
+ 0x0fb76802,
+ 0x0fb7e802,
+ 0x0fbbb803,
+ 0x0fbed005,
+ 0x0fbf6003,
+ 0x0fbf880e,
+ 0x0fc06003,
+ 0x0fc24007,
+ 0x0fc2d005,
+ 0x0fc44007,
+ 0x0fc57001,
+ 0x0fc5904d,
+ 0x0fd2a00b,
+ 0x0fd37001,
+ 0x0fd3e802,
+ 0x0fd44806,
+ 0x0fd5f000,
+ 0x0fd63007,
+ 0x0fd6e003,
+ 0x0fd74806,
+ 0x0fd7c806,
+ 0x0fdc9800,
+ 0x0fde5824,
+ 0x0fdfd405,
+ 0x1537001f,
+ 0x15b9d005,
+ 0x15c0f001,
+ 0x1675100d,
+ 0x175f0fff,
+ 0x179f0c1e,
+ 0x17d0f5e1,
+ 0x189a5804};
+
+/// At the end of the valid Unicode code points space a lot of code points are
+/// either reserved or a noncharacter. Adding all these entries to the
+/// lookup table would add 446 entries to the table (in Unicode 14).
+/// Instead the only the start of the region is stored, every code point in
+/// this region needs to be escaped.
+inline constexpr uint32_t __unallocated_region_lower_bound = 0x000323b0;
+
+/// Returns whether the code unit needs to be escaped.
+///
+/// \pre The code point is a valid Unicode code point.
+[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool __needs_escape(const char32_t __code_point) noexcept {
+ // Since __unallocated_region_lower_bound contains the unshifted range do the
+ // comparison without shifting.
+ if (__code_point >= __unallocated_region_lower_bound)
+ return true;
+
+ ptrdiff_t __i = std::ranges::upper_bound(__entries, (__code_point << 11) | 0x7ffu) - __entries;
+ if (__i == 0)
+ return false;
+
+ --__i;
+ uint32_t __upper_bound = (__entries[__i] >> 11) + (__entries[__i] & 0x7ffu);
+ return __code_point <= __upper_bound;
+}
+
+} // namespace __escaped_output_table
+
+#endif //_LIBCPP_STD_VER > 20
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___FORMAT_ESCAPED_OUTPUT_TABLE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/extended_grapheme_cluster_table.h b/contrib/libs/cxxsupp/libcxx/include/__format/extended_grapheme_cluster_table.h
index 00cd0e91cd..0e00670df7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/extended_grapheme_cluster_table.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/extended_grapheme_cluster_table.h
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
// WARNING, this entire header is generated by
-// utiles/generate_extended_grapheme_cluster_table.py
+// utils/generate_extended_grapheme_cluster_table.py
// DO NOT MODIFY!
// UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
@@ -61,7 +61,7 @@
#ifndef _LIBCPP___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
#define _LIBCPP___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
-#include <__algorithm/upper_bound.h>
+#include <__algorithm/ranges_upper_bound.h>
#include <__config>
#include <__iterator/access.h>
#include <cstddef>
@@ -124,177 +124,1506 @@ enum class __property : uint8_t {
/// this approach uses less space for the data and is about 4% faster in the
/// following benchmark.
/// libcxx/benchmarks/std_format_spec_string_unicode.bench.cpp
-inline constexpr uint32_t __entries[1480] = {
- 0x00000091, 0x00005005, 0x00005811, 0x00006800, 0x00007111, 0x0003fa01, 0x00054803, 0x00056801, 0x00057003,
- 0x001806f2, 0x00241862, 0x002c8ac2, 0x002df802, 0x002e0812, 0x002e2012, 0x002e3802, 0x00300058, 0x003080a2,
- 0x0030e001, 0x00325942, 0x00338002, 0x0036b062, 0x0036e808, 0x0036f852, 0x00373812, 0x00375032, 0x00387808,
- 0x00388802, 0x003981a2, 0x003d30a2, 0x003f5882, 0x003fe802, 0x0040b032, 0x0040d882, 0x00412822, 0x00414842,
- 0x0042c822, 0x00448018, 0x0044c072, 0x00465172, 0x00471008, 0x004719f2, 0x0048180a, 0x0049d002, 0x0049d80a,
- 0x0049e002, 0x0049f02a, 0x004a0872, 0x004a483a, 0x004a6802, 0x004a701a, 0x004a8862, 0x004b1012, 0x004c0802,
- 0x004c101a, 0x004de002, 0x004df002, 0x004df81a, 0x004e0832, 0x004e381a, 0x004e581a, 0x004e6802, 0x004eb802,
- 0x004f1012, 0x004ff002, 0x00500812, 0x0050180a, 0x0051e002, 0x0051f02a, 0x00520812, 0x00523812, 0x00525822,
- 0x00528802, 0x00538012, 0x0053a802, 0x00540812, 0x0054180a, 0x0055e002, 0x0055f02a, 0x00560842, 0x00563812,
- 0x0056480a, 0x0056581a, 0x00566802, 0x00571012, 0x0057d052, 0x00580802, 0x0058101a, 0x0059e002, 0x0059f012,
- 0x005a000a, 0x005a0832, 0x005a381a, 0x005a581a, 0x005a6802, 0x005aa822, 0x005b1012, 0x005c1002, 0x005df002,
- 0x005df80a, 0x005e0002, 0x005e081a, 0x005e302a, 0x005e502a, 0x005e6802, 0x005eb802, 0x00600002, 0x0060082a,
- 0x00602002, 0x0061e002, 0x0061f022, 0x0062083a, 0x00623022, 0x00625032, 0x0062a812, 0x00631012, 0x00640802,
- 0x0064101a, 0x0065e002, 0x0065f00a, 0x0065f802, 0x0066001a, 0x00661002, 0x0066181a, 0x00663002, 0x0066381a,
- 0x0066501a, 0x00666012, 0x0066a812, 0x00671012, 0x00680012, 0x0068101a, 0x0069d812, 0x0069f002, 0x0069f81a,
- 0x006a0832, 0x006a302a, 0x006a502a, 0x006a6802, 0x006a7008, 0x006ab802, 0x006b1012, 0x006c0802, 0x006c101a,
- 0x006e5002, 0x006e7802, 0x006e801a, 0x006e9022, 0x006eb002, 0x006ec06a, 0x006ef802, 0x006f901a, 0x00718802,
- 0x0071980a, 0x0071a062, 0x00723872, 0x00758802, 0x0075980a, 0x0075a082, 0x00764052, 0x0078c012, 0x0079a802,
- 0x0079b802, 0x0079c802, 0x0079f01a, 0x007b88d2, 0x007bf80a, 0x007c0042, 0x007c3012, 0x007c68a2, 0x007cca32,
- 0x007e3002, 0x00816832, 0x0081880a, 0x00819052, 0x0081c812, 0x0081d81a, 0x0081e812, 0x0082b01a, 0x0082c012,
- 0x0082f022, 0x00838832, 0x00841002, 0x0084200a, 0x00842812, 0x00846802, 0x0084e802, 0x008805f4, 0x008b047c,
- 0x008d457b, 0x009ae822, 0x00b89022, 0x00b8a80a, 0x00b99012, 0x00b9a00a, 0x00ba9012, 0x00bb9012, 0x00bda012,
- 0x00bdb00a, 0x00bdb862, 0x00bdf07a, 0x00be3002, 0x00be381a, 0x00be48a2, 0x00bee802, 0x00c05822, 0x00c07001,
- 0x00c07802, 0x00c42812, 0x00c54802, 0x00c90022, 0x00c9183a, 0x00c93812, 0x00c9482a, 0x00c9801a, 0x00c99002,
- 0x00c9985a, 0x00c9c822, 0x00d0b812, 0x00d0c81a, 0x00d0d802, 0x00d2a80a, 0x00d2b002, 0x00d2b80a, 0x00d2c062,
- 0x00d30002, 0x00d31002, 0x00d32872, 0x00d3685a, 0x00d39892, 0x00d3f802, 0x00d581e2, 0x00d80032, 0x00d8200a,
- 0x00d9a062, 0x00d9d80a, 0x00d9e002, 0x00d9e84a, 0x00da1002, 0x00da181a, 0x00db5882, 0x00dc0012, 0x00dc100a,
- 0x00dd080a, 0x00dd1032, 0x00dd301a, 0x00dd4012, 0x00dd500a, 0x00dd5822, 0x00df3002, 0x00df380a, 0x00df4012,
- 0x00df502a, 0x00df6802, 0x00df700a, 0x00df7822, 0x00df901a, 0x00e1207a, 0x00e16072, 0x00e1a01a, 0x00e1b012,
- 0x00e68022, 0x00e6a0c2, 0x00e7080a, 0x00e71062, 0x00e76802, 0x00e7a002, 0x00e7b80a, 0x00e7c012, 0x00ee03f2,
- 0x01005801, 0x01006002, 0x0100680d, 0x01007011, 0x01014061, 0x0101e003, 0x01024803, 0x010300f1, 0x01068202,
- 0x01091003, 0x0109c803, 0x010ca053, 0x010d4813, 0x0118d013, 0x01194003, 0x011c4003, 0x011e7803, 0x011f48a3,
- 0x011fc023, 0x01261003, 0x012d5013, 0x012db003, 0x012e0003, 0x012fd833, 0x01300053, 0x013038b3, 0x0130a713,
- 0x01348753, 0x013840a3, 0x0138a003, 0x0138b003, 0x0138e803, 0x01390803, 0x01394003, 0x01399813, 0x013a2003,
- 0x013a3803, 0x013a6003, 0x013a7003, 0x013a9823, 0x013ab803, 0x013b1843, 0x013ca823, 0x013d0803, 0x013d8003,
- 0x013df803, 0x0149a013, 0x01582823, 0x0158d813, 0x015a8003, 0x015aa803, 0x01677822, 0x016bf802, 0x016f01f2,
- 0x01815052, 0x01818003, 0x0181e803, 0x0184c812, 0x0194b803, 0x0194c803, 0x05337832, 0x0533a092, 0x0534f012,
- 0x05378012, 0x05401002, 0x05403002, 0x05405802, 0x0541181a, 0x05412812, 0x0541380a, 0x05416002, 0x0544001a,
- 0x0545a0fa, 0x05462012, 0x05470112, 0x0547f802, 0x05493072, 0x054a38a2, 0x054a901a, 0x054b01c4, 0x054c0022,
- 0x054c180a, 0x054d9802, 0x054da01a, 0x054db032, 0x054dd01a, 0x054de012, 0x054df02a, 0x054f2802, 0x05514852,
- 0x0551781a, 0x05518812, 0x0551981a, 0x0551a812, 0x05521802, 0x05526002, 0x0552680a, 0x0553e002, 0x05558002,
- 0x05559022, 0x0555b812, 0x0555f012, 0x05560802, 0x0557580a, 0x05576012, 0x0557701a, 0x0557a80a, 0x0557b002,
- 0x055f181a, 0x055f2802, 0x055f301a, 0x055f4002, 0x055f481a, 0x055f600a, 0x055f6802, 0x05600006, 0x056009a7,
- 0x0560e006, 0x0560e9a7, 0x0561c006, 0x0561c9a7, 0x0562a006, 0x0562a9a7, 0x05638006, 0x056389a7, 0x05646006,
- 0x056469a7, 0x05654006, 0x056549a7, 0x05662006, 0x056629a7, 0x05670006, 0x056709a7, 0x0567e006, 0x0567e9a7,
- 0x0568c006, 0x0568c9a7, 0x0569a006, 0x0569a9a7, 0x056a8006, 0x056a89a7, 0x056b6006, 0x056b69a7, 0x056c4006,
- 0x056c49a7, 0x056d2006, 0x056d29a7, 0x056e0006, 0x056e09a7, 0x056ee006, 0x056ee9a7, 0x056fc006, 0x056fc9a7,
- 0x0570a006, 0x0570a9a7, 0x05718006, 0x057189a7, 0x05726006, 0x057269a7, 0x05734006, 0x057349a7, 0x05742006,
- 0x057429a7, 0x05750006, 0x057509a7, 0x0575e006, 0x0575e9a7, 0x0576c006, 0x0576c9a7, 0x0577a006, 0x0577a9a7,
- 0x05788006, 0x057889a7, 0x05796006, 0x057969a7, 0x057a4006, 0x057a49a7, 0x057b2006, 0x057b29a7, 0x057c0006,
- 0x057c09a7, 0x057ce006, 0x057ce9a7, 0x057dc006, 0x057dc9a7, 0x057ea006, 0x057ea9a7, 0x057f8006, 0x057f89a7,
- 0x05806006, 0x058069a7, 0x05814006, 0x058149a7, 0x05822006, 0x058229a7, 0x05830006, 0x058309a7, 0x0583e006,
- 0x0583e9a7, 0x0584c006, 0x0584c9a7, 0x0585a006, 0x0585a9a7, 0x05868006, 0x058689a7, 0x05876006, 0x058769a7,
- 0x05884006, 0x058849a7, 0x05892006, 0x058929a7, 0x058a0006, 0x058a09a7, 0x058ae006, 0x058ae9a7, 0x058bc006,
- 0x058bc9a7, 0x058ca006, 0x058ca9a7, 0x058d8006, 0x058d89a7, 0x058e6006, 0x058e69a7, 0x058f4006, 0x058f49a7,
- 0x05902006, 0x059029a7, 0x05910006, 0x059109a7, 0x0591e006, 0x0591e9a7, 0x0592c006, 0x0592c9a7, 0x0593a006,
- 0x0593a9a7, 0x05948006, 0x059489a7, 0x05956006, 0x059569a7, 0x05964006, 0x059649a7, 0x05972006, 0x059729a7,
- 0x05980006, 0x059809a7, 0x0598e006, 0x0598e9a7, 0x0599c006, 0x0599c9a7, 0x059aa006, 0x059aa9a7, 0x059b8006,
- 0x059b89a7, 0x059c6006, 0x059c69a7, 0x059d4006, 0x059d49a7, 0x059e2006, 0x059e29a7, 0x059f0006, 0x059f09a7,
- 0x059fe006, 0x059fe9a7, 0x05a0c006, 0x05a0c9a7, 0x05a1a006, 0x05a1a9a7, 0x05a28006, 0x05a289a7, 0x05a36006,
- 0x05a369a7, 0x05a44006, 0x05a449a7, 0x05a52006, 0x05a529a7, 0x05a60006, 0x05a609a7, 0x05a6e006, 0x05a6e9a7,
- 0x05a7c006, 0x05a7c9a7, 0x05a8a006, 0x05a8a9a7, 0x05a98006, 0x05a989a7, 0x05aa6006, 0x05aa69a7, 0x05ab4006,
- 0x05ab49a7, 0x05ac2006, 0x05ac29a7, 0x05ad0006, 0x05ad09a7, 0x05ade006, 0x05ade9a7, 0x05aec006, 0x05aec9a7,
- 0x05afa006, 0x05afa9a7, 0x05b08006, 0x05b089a7, 0x05b16006, 0x05b169a7, 0x05b24006, 0x05b249a7, 0x05b32006,
- 0x05b329a7, 0x05b40006, 0x05b409a7, 0x05b4e006, 0x05b4e9a7, 0x05b5c006, 0x05b5c9a7, 0x05b6a006, 0x05b6a9a7,
- 0x05b78006, 0x05b789a7, 0x05b86006, 0x05b869a7, 0x05b94006, 0x05b949a7, 0x05ba2006, 0x05ba29a7, 0x05bb0006,
- 0x05bb09a7, 0x05bbe006, 0x05bbe9a7, 0x05bcc006, 0x05bcc9a7, 0x05bda006, 0x05bda9a7, 0x05be8006, 0x05be89a7,
- 0x05bf6006, 0x05bf69a7, 0x05c04006, 0x05c049a7, 0x05c12006, 0x05c129a7, 0x05c20006, 0x05c209a7, 0x05c2e006,
- 0x05c2e9a7, 0x05c3c006, 0x05c3c9a7, 0x05c4a006, 0x05c4a9a7, 0x05c58006, 0x05c589a7, 0x05c66006, 0x05c669a7,
- 0x05c74006, 0x05c749a7, 0x05c82006, 0x05c829a7, 0x05c90006, 0x05c909a7, 0x05c9e006, 0x05c9e9a7, 0x05cac006,
- 0x05cac9a7, 0x05cba006, 0x05cba9a7, 0x05cc8006, 0x05cc89a7, 0x05cd6006, 0x05cd69a7, 0x05ce4006, 0x05ce49a7,
- 0x05cf2006, 0x05cf29a7, 0x05d00006, 0x05d009a7, 0x05d0e006, 0x05d0e9a7, 0x05d1c006, 0x05d1c9a7, 0x05d2a006,
- 0x05d2a9a7, 0x05d38006, 0x05d389a7, 0x05d46006, 0x05d469a7, 0x05d54006, 0x05d549a7, 0x05d62006, 0x05d629a7,
- 0x05d70006, 0x05d709a7, 0x05d7e006, 0x05d7e9a7, 0x05d8c006, 0x05d8c9a7, 0x05d9a006, 0x05d9a9a7, 0x05da8006,
- 0x05da89a7, 0x05db6006, 0x05db69a7, 0x05dc4006, 0x05dc49a7, 0x05dd2006, 0x05dd29a7, 0x05de0006, 0x05de09a7,
- 0x05dee006, 0x05dee9a7, 0x05dfc006, 0x05dfc9a7, 0x05e0a006, 0x05e0a9a7, 0x05e18006, 0x05e189a7, 0x05e26006,
- 0x05e269a7, 0x05e34006, 0x05e349a7, 0x05e42006, 0x05e429a7, 0x05e50006, 0x05e509a7, 0x05e5e006, 0x05e5e9a7,
- 0x05e6c006, 0x05e6c9a7, 0x05e7a006, 0x05e7a9a7, 0x05e88006, 0x05e889a7, 0x05e96006, 0x05e969a7, 0x05ea4006,
- 0x05ea49a7, 0x05eb2006, 0x05eb29a7, 0x05ec0006, 0x05ec09a7, 0x05ece006, 0x05ece9a7, 0x05edc006, 0x05edc9a7,
- 0x05eea006, 0x05eea9a7, 0x05ef8006, 0x05ef89a7, 0x05f06006, 0x05f069a7, 0x05f14006, 0x05f149a7, 0x05f22006,
- 0x05f229a7, 0x05f30006, 0x05f309a7, 0x05f3e006, 0x05f3e9a7, 0x05f4c006, 0x05f4c9a7, 0x05f5a006, 0x05f5a9a7,
- 0x05f68006, 0x05f689a7, 0x05f76006, 0x05f769a7, 0x05f84006, 0x05f849a7, 0x05f92006, 0x05f929a7, 0x05fa0006,
- 0x05fa09a7, 0x05fae006, 0x05fae9a7, 0x05fbc006, 0x05fbc9a7, 0x05fca006, 0x05fca9a7, 0x05fd8006, 0x05fd89a7,
- 0x05fe6006, 0x05fe69a7, 0x05ff4006, 0x05ff49a7, 0x06002006, 0x060029a7, 0x06010006, 0x060109a7, 0x0601e006,
- 0x0601e9a7, 0x0602c006, 0x0602c9a7, 0x0603a006, 0x0603a9a7, 0x06048006, 0x060489a7, 0x06056006, 0x060569a7,
- 0x06064006, 0x060649a7, 0x06072006, 0x060729a7, 0x06080006, 0x060809a7, 0x0608e006, 0x0608e9a7, 0x0609c006,
- 0x0609c9a7, 0x060aa006, 0x060aa9a7, 0x060b8006, 0x060b89a7, 0x060c6006, 0x060c69a7, 0x060d4006, 0x060d49a7,
- 0x060e2006, 0x060e29a7, 0x060f0006, 0x060f09a7, 0x060fe006, 0x060fe9a7, 0x0610c006, 0x0610c9a7, 0x0611a006,
- 0x0611a9a7, 0x06128006, 0x061289a7, 0x06136006, 0x061369a7, 0x06144006, 0x061449a7, 0x06152006, 0x061529a7,
- 0x06160006, 0x061609a7, 0x0616e006, 0x0616e9a7, 0x0617c006, 0x0617c9a7, 0x0618a006, 0x0618a9a7, 0x06198006,
- 0x061989a7, 0x061a6006, 0x061a69a7, 0x061b4006, 0x061b49a7, 0x061c2006, 0x061c29a7, 0x061d0006, 0x061d09a7,
- 0x061de006, 0x061de9a7, 0x061ec006, 0x061ec9a7, 0x061fa006, 0x061fa9a7, 0x06208006, 0x062089a7, 0x06216006,
- 0x062169a7, 0x06224006, 0x062249a7, 0x06232006, 0x062329a7, 0x06240006, 0x062409a7, 0x0624e006, 0x0624e9a7,
- 0x0625c006, 0x0625c9a7, 0x0626a006, 0x0626a9a7, 0x06278006, 0x062789a7, 0x06286006, 0x062869a7, 0x06294006,
- 0x062949a7, 0x062a2006, 0x062a29a7, 0x062b0006, 0x062b09a7, 0x062be006, 0x062be9a7, 0x062cc006, 0x062cc9a7,
- 0x062da006, 0x062da9a7, 0x062e8006, 0x062e89a7, 0x062f6006, 0x062f69a7, 0x06304006, 0x063049a7, 0x06312006,
- 0x063129a7, 0x06320006, 0x063209a7, 0x0632e006, 0x0632e9a7, 0x0633c006, 0x0633c9a7, 0x0634a006, 0x0634a9a7,
- 0x06358006, 0x063589a7, 0x06366006, 0x063669a7, 0x06374006, 0x063749a7, 0x06382006, 0x063829a7, 0x06390006,
- 0x063909a7, 0x0639e006, 0x0639e9a7, 0x063ac006, 0x063ac9a7, 0x063ba006, 0x063ba9a7, 0x063c8006, 0x063c89a7,
- 0x063d6006, 0x063d69a7, 0x063e4006, 0x063e49a7, 0x063f2006, 0x063f29a7, 0x06400006, 0x064009a7, 0x0640e006,
- 0x0640e9a7, 0x0641c006, 0x0641c9a7, 0x0642a006, 0x0642a9a7, 0x06438006, 0x064389a7, 0x06446006, 0x064469a7,
- 0x06454006, 0x064549a7, 0x06462006, 0x064629a7, 0x06470006, 0x064709a7, 0x0647e006, 0x0647e9a7, 0x0648c006,
- 0x0648c9a7, 0x0649a006, 0x0649a9a7, 0x064a8006, 0x064a89a7, 0x064b6006, 0x064b69a7, 0x064c4006, 0x064c49a7,
- 0x064d2006, 0x064d29a7, 0x064e0006, 0x064e09a7, 0x064ee006, 0x064ee9a7, 0x064fc006, 0x064fc9a7, 0x0650a006,
- 0x0650a9a7, 0x06518006, 0x065189a7, 0x06526006, 0x065269a7, 0x06534006, 0x065349a7, 0x06542006, 0x065429a7,
- 0x06550006, 0x065509a7, 0x0655e006, 0x0655e9a7, 0x0656c006, 0x0656c9a7, 0x0657a006, 0x0657a9a7, 0x06588006,
- 0x065889a7, 0x06596006, 0x065969a7, 0x065a4006, 0x065a49a7, 0x065b2006, 0x065b29a7, 0x065c0006, 0x065c09a7,
- 0x065ce006, 0x065ce9a7, 0x065dc006, 0x065dc9a7, 0x065ea006, 0x065ea9a7, 0x065f8006, 0x065f89a7, 0x06606006,
- 0x066069a7, 0x06614006, 0x066149a7, 0x06622006, 0x066229a7, 0x06630006, 0x066309a7, 0x0663e006, 0x0663e9a7,
- 0x0664c006, 0x0664c9a7, 0x0665a006, 0x0665a9a7, 0x06668006, 0x066689a7, 0x06676006, 0x066769a7, 0x06684006,
- 0x066849a7, 0x06692006, 0x066929a7, 0x066a0006, 0x066a09a7, 0x066ae006, 0x066ae9a7, 0x066bc006, 0x066bc9a7,
- 0x066ca006, 0x066ca9a7, 0x066d8006, 0x066d89a7, 0x066e6006, 0x066e69a7, 0x066f4006, 0x066f49a7, 0x06702006,
- 0x067029a7, 0x06710006, 0x067109a7, 0x0671e006, 0x0671e9a7, 0x0672c006, 0x0672c9a7, 0x0673a006, 0x0673a9a7,
- 0x06748006, 0x067489a7, 0x06756006, 0x067569a7, 0x06764006, 0x067649a7, 0x06772006, 0x067729a7, 0x06780006,
- 0x067809a7, 0x0678e006, 0x0678e9a7, 0x0679c006, 0x0679c9a7, 0x067aa006, 0x067aa9a7, 0x067b8006, 0x067b89a7,
- 0x067c6006, 0x067c69a7, 0x067d4006, 0x067d49a7, 0x067e2006, 0x067e29a7, 0x067f0006, 0x067f09a7, 0x067fe006,
- 0x067fe9a7, 0x0680c006, 0x0680c9a7, 0x0681a006, 0x0681a9a7, 0x06828006, 0x068289a7, 0x06836006, 0x068369a7,
- 0x06844006, 0x068449a7, 0x06852006, 0x068529a7, 0x06860006, 0x068609a7, 0x0686e006, 0x0686e9a7, 0x0687c006,
- 0x0687c9a7, 0x0688a006, 0x0688a9a7, 0x06898006, 0x068989a7, 0x068a6006, 0x068a69a7, 0x068b4006, 0x068b49a7,
- 0x068c2006, 0x068c29a7, 0x068d0006, 0x068d09a7, 0x068de006, 0x068de9a7, 0x068ec006, 0x068ec9a7, 0x068fa006,
- 0x068fa9a7, 0x06908006, 0x069089a7, 0x06916006, 0x069169a7, 0x06924006, 0x069249a7, 0x06932006, 0x069329a7,
- 0x06940006, 0x069409a7, 0x0694e006, 0x0694e9a7, 0x0695c006, 0x0695c9a7, 0x0696a006, 0x0696a9a7, 0x06978006,
- 0x069789a7, 0x06986006, 0x069869a7, 0x06994006, 0x069949a7, 0x069a2006, 0x069a29a7, 0x069b0006, 0x069b09a7,
- 0x069be006, 0x069be9a7, 0x069cc006, 0x069cc9a7, 0x069da006, 0x069da9a7, 0x069e8006, 0x069e89a7, 0x069f6006,
- 0x069f69a7, 0x06a04006, 0x06a049a7, 0x06a12006, 0x06a129a7, 0x06a20006, 0x06a209a7, 0x06a2e006, 0x06a2e9a7,
- 0x06a3c006, 0x06a3c9a7, 0x06a4a006, 0x06a4a9a7, 0x06a58006, 0x06a589a7, 0x06a66006, 0x06a669a7, 0x06a74006,
- 0x06a749a7, 0x06a82006, 0x06a829a7, 0x06a90006, 0x06a909a7, 0x06a9e006, 0x06a9e9a7, 0x06aac006, 0x06aac9a7,
- 0x06aba006, 0x06aba9a7, 0x06ac8006, 0x06ac89a7, 0x06ad6006, 0x06ad69a7, 0x06ae4006, 0x06ae49a7, 0x06af2006,
- 0x06af29a7, 0x06b00006, 0x06b009a7, 0x06b0e006, 0x06b0e9a7, 0x06b1c006, 0x06b1c9a7, 0x06b2a006, 0x06b2a9a7,
- 0x06b38006, 0x06b389a7, 0x06b46006, 0x06b469a7, 0x06b54006, 0x06b549a7, 0x06b62006, 0x06b629a7, 0x06b70006,
- 0x06b709a7, 0x06b7e006, 0x06b7e9a7, 0x06b8c006, 0x06b8c9a7, 0x06b9a006, 0x06b9a9a7, 0x06ba8006, 0x06ba89a7,
- 0x06bb6006, 0x06bb69a7, 0x06bc4006, 0x06bc49a7, 0x06bd816c, 0x06be5b0b, 0x07d8f002, 0x07f000f2, 0x07f100f2,
- 0x07f7f801, 0x07fcf012, 0x07ff80b1, 0x080fe802, 0x08170002, 0x081bb042, 0x08500822, 0x08502812, 0x08506032,
- 0x0851c022, 0x0851f802, 0x08572812, 0x08692032, 0x08755812, 0x087a30a2, 0x087c1032, 0x0880000a, 0x08800802,
- 0x0880100a, 0x0881c0e2, 0x08838002, 0x08839812, 0x0883f822, 0x0884100a, 0x0885802a, 0x08859832, 0x0885b81a,
- 0x0885c812, 0x0885e808, 0x08861002, 0x08866808, 0x08880022, 0x08893842, 0x0889600a, 0x08896872, 0x088a281a,
- 0x088b9802, 0x088c0012, 0x088c100a, 0x088d982a, 0x088db082, 0x088df81a, 0x088e1018, 0x088e4832, 0x088e700a,
- 0x088e7802, 0x0891602a, 0x08917822, 0x0891901a, 0x0891a002, 0x0891a80a, 0x0891b012, 0x0891f002, 0x0896f802,
- 0x0897002a, 0x08971872, 0x08980012, 0x0898101a, 0x0899d812, 0x0899f002, 0x0899f80a, 0x089a0002, 0x089a083a,
- 0x089a381a, 0x089a582a, 0x089ab802, 0x089b101a, 0x089b3062, 0x089b8042, 0x08a1a82a, 0x08a1c072, 0x08a2001a,
- 0x08a21022, 0x08a2280a, 0x08a23002, 0x08a2f002, 0x08a58002, 0x08a5881a, 0x08a59852, 0x08a5c80a, 0x08a5d002,
- 0x08a5d81a, 0x08a5e802, 0x08a5f00a, 0x08a5f812, 0x08a6080a, 0x08a61012, 0x08ad7802, 0x08ad801a, 0x08ad9032,
- 0x08adc03a, 0x08ade012, 0x08adf00a, 0x08adf812, 0x08aee012, 0x08b1802a, 0x08b19872, 0x08b1d81a, 0x08b1e802,
- 0x08b1f00a, 0x08b1f812, 0x08b55802, 0x08b5600a, 0x08b56802, 0x08b5701a, 0x08b58052, 0x08b5b00a, 0x08b5b802,
- 0x08b8e822, 0x08b91032, 0x08b9300a, 0x08b93842, 0x08c1602a, 0x08c17882, 0x08c1c00a, 0x08c1c812, 0x08c98002,
- 0x08c9884a, 0x08c9b81a, 0x08c9d812, 0x08c9e80a, 0x08c9f002, 0x08c9f808, 0x08ca000a, 0x08ca0808, 0x08ca100a,
- 0x08ca1802, 0x08ce882a, 0x08cea032, 0x08ced012, 0x08cee03a, 0x08cf0002, 0x08cf200a, 0x08d00892, 0x08d19852,
- 0x08d1c80a, 0x08d1d008, 0x08d1d832, 0x08d23802, 0x08d28852, 0x08d2b81a, 0x08d2c822, 0x08d42058, 0x08d450c2,
- 0x08d4b80a, 0x08d4c012, 0x08e1780a, 0x08e18062, 0x08e1c052, 0x08e1f00a, 0x08e1f802, 0x08e49152, 0x08e5480a,
- 0x08e55062, 0x08e5880a, 0x08e59012, 0x08e5a00a, 0x08e5a812, 0x08e98852, 0x08e9d002, 0x08e9e012, 0x08e9f862,
- 0x08ea3008, 0x08ea3802, 0x08ec504a, 0x08ec8012, 0x08ec981a, 0x08eca802, 0x08ecb00a, 0x08ecb802, 0x08f79812,
- 0x08f7a81a, 0x09a18081, 0x0b578042, 0x0b598062, 0x0b7a7802, 0x0b7a8b6a, 0x0b7c7832, 0x0b7f2002, 0x0b7f801a,
- 0x0de4e812, 0x0de50031, 0x0e7802d2, 0x0e798162, 0x0e8b2802, 0x0e8b300a, 0x0e8b3822, 0x0e8b680a, 0x0e8b7042,
- 0x0e8b9871, 0x0e8bd872, 0x0e8c2862, 0x0e8d5032, 0x0e921022, 0x0ed00362, 0x0ed1db12, 0x0ed3a802, 0x0ed42002,
- 0x0ed4d842, 0x0ed508e2, 0x0f000062, 0x0f004102, 0x0f00d862, 0x0f011812, 0x0f013042, 0x0f098062, 0x0f157002,
- 0x0f176032, 0x0f468062, 0x0f4a2062, 0x0f8007f3, 0x0f8407f3, 0x0f886823, 0x0f897803, 0x0f8b6053, 0x0f8bf013,
- 0x0f8c7003, 0x0f8c8893, 0x0f8d6b83, 0x0f8f3199, 0x0f9008e3, 0x0f90d003, 0x0f917803, 0x0f919083, 0x0f91e033,
- 0x0f924ff3, 0x0f964ff3, 0x0f9a4ff3, 0x0f9e4b13, 0x0f9fd842, 0x0fa007f3, 0x0fa407f3, 0x0fa803d3, 0x0faa37f3,
- 0x0fae37f3, 0x0fb23093, 0x0fb407f3, 0x0fbba0b3, 0x0fbeaaa3, 0x0fc06033, 0x0fc24073, 0x0fc2d053, 0x0fc44073,
- 0x0fc57513, 0x0fc862e3, 0x0fc9e093, 0x0fca3ff3, 0x0fce3ff3, 0x0fd23ff3, 0x0fd63b83, 0x0fe007f3, 0x0fe407f3,
- 0x0fe807f3, 0x0fec07f3, 0x0ff007f3, 0x0ff407f3, 0x0ff807f3, 0x0ffc07d3, 0x700001f1, 0x700105f2, 0x700407f1,
- 0x700807f2, 0x700c06f2, 0x700f87f1, 0x701387f1, 0x701787f1, 0x701b87f1, 0x701f87f1, 0x702387f1, 0x702787f1,
- 0x702b87f1, 0x702f87f1, 0x703387f1, 0x703787f1, 0x703b87f1, 0x703f87f1, 0x704387f1, 0x704787f1, 0x704b87f1,
- 0x704f87f1, 0x705387f1, 0x705787f1, 0x705b87f1, 0x705f87f1, 0x706387f1, 0x706787f1, 0x706b87f1, 0x706f87f1,
- 0x707387f1, 0x707787f1, 0x707b87f1, 0x707f80f1};
+inline constexpr uint32_t __entries[1496] = {
+ 0x00000091,
+ 0x00005005,
+ 0x00005811,
+ 0x00006800,
+ 0x00007111,
+ 0x0003fa01,
+ 0x00054803,
+ 0x00056801,
+ 0x00057003,
+ 0x001806f2,
+ 0x00241862,
+ 0x002c8ac2,
+ 0x002df802,
+ 0x002e0812,
+ 0x002e2012,
+ 0x002e3802,
+ 0x00300058,
+ 0x003080a2,
+ 0x0030e001,
+ 0x00325942,
+ 0x00338002,
+ 0x0036b062,
+ 0x0036e808,
+ 0x0036f852,
+ 0x00373812,
+ 0x00375032,
+ 0x00387808,
+ 0x00388802,
+ 0x003981a2,
+ 0x003d30a2,
+ 0x003f5882,
+ 0x003fe802,
+ 0x0040b032,
+ 0x0040d882,
+ 0x00412822,
+ 0x00414842,
+ 0x0042c822,
+ 0x00448018,
+ 0x0044c072,
+ 0x00465172,
+ 0x00471008,
+ 0x004719f2,
+ 0x0048180a,
+ 0x0049d002,
+ 0x0049d80a,
+ 0x0049e002,
+ 0x0049f02a,
+ 0x004a0872,
+ 0x004a483a,
+ 0x004a6802,
+ 0x004a701a,
+ 0x004a8862,
+ 0x004b1012,
+ 0x004c0802,
+ 0x004c101a,
+ 0x004de002,
+ 0x004df002,
+ 0x004df81a,
+ 0x004e0832,
+ 0x004e381a,
+ 0x004e581a,
+ 0x004e6802,
+ 0x004eb802,
+ 0x004f1012,
+ 0x004ff002,
+ 0x00500812,
+ 0x0050180a,
+ 0x0051e002,
+ 0x0051f02a,
+ 0x00520812,
+ 0x00523812,
+ 0x00525822,
+ 0x00528802,
+ 0x00538012,
+ 0x0053a802,
+ 0x00540812,
+ 0x0054180a,
+ 0x0055e002,
+ 0x0055f02a,
+ 0x00560842,
+ 0x00563812,
+ 0x0056480a,
+ 0x0056581a,
+ 0x00566802,
+ 0x00571012,
+ 0x0057d052,
+ 0x00580802,
+ 0x0058101a,
+ 0x0059e002,
+ 0x0059f012,
+ 0x005a000a,
+ 0x005a0832,
+ 0x005a381a,
+ 0x005a581a,
+ 0x005a6802,
+ 0x005aa822,
+ 0x005b1012,
+ 0x005c1002,
+ 0x005df002,
+ 0x005df80a,
+ 0x005e0002,
+ 0x005e081a,
+ 0x005e302a,
+ 0x005e502a,
+ 0x005e6802,
+ 0x005eb802,
+ 0x00600002,
+ 0x0060082a,
+ 0x00602002,
+ 0x0061e002,
+ 0x0061f022,
+ 0x0062083a,
+ 0x00623022,
+ 0x00625032,
+ 0x0062a812,
+ 0x00631012,
+ 0x00640802,
+ 0x0064101a,
+ 0x0065e002,
+ 0x0065f00a,
+ 0x0065f802,
+ 0x0066001a,
+ 0x00661002,
+ 0x0066181a,
+ 0x00663002,
+ 0x0066381a,
+ 0x0066501a,
+ 0x00666012,
+ 0x0066a812,
+ 0x00671012,
+ 0x0067980a,
+ 0x00680012,
+ 0x0068101a,
+ 0x0069d812,
+ 0x0069f002,
+ 0x0069f81a,
+ 0x006a0832,
+ 0x006a302a,
+ 0x006a502a,
+ 0x006a6802,
+ 0x006a7008,
+ 0x006ab802,
+ 0x006b1012,
+ 0x006c0802,
+ 0x006c101a,
+ 0x006e5002,
+ 0x006e7802,
+ 0x006e801a,
+ 0x006e9022,
+ 0x006eb002,
+ 0x006ec06a,
+ 0x006ef802,
+ 0x006f901a,
+ 0x00718802,
+ 0x0071980a,
+ 0x0071a062,
+ 0x00723872,
+ 0x00758802,
+ 0x0075980a,
+ 0x0075a082,
+ 0x00764062,
+ 0x0078c012,
+ 0x0079a802,
+ 0x0079b802,
+ 0x0079c802,
+ 0x0079f01a,
+ 0x007b88d2,
+ 0x007bf80a,
+ 0x007c0042,
+ 0x007c3012,
+ 0x007c68a2,
+ 0x007cca32,
+ 0x007e3002,
+ 0x00816832,
+ 0x0081880a,
+ 0x00819052,
+ 0x0081c812,
+ 0x0081d81a,
+ 0x0081e812,
+ 0x0082b01a,
+ 0x0082c012,
+ 0x0082f022,
+ 0x00838832,
+ 0x00841002,
+ 0x0084200a,
+ 0x00842812,
+ 0x00846802,
+ 0x0084e802,
+ 0x008805f4,
+ 0x008b047c,
+ 0x008d457b,
+ 0x009ae822,
+ 0x00b89022,
+ 0x00b8a80a,
+ 0x00b99012,
+ 0x00b9a00a,
+ 0x00ba9012,
+ 0x00bb9012,
+ 0x00bda012,
+ 0x00bdb00a,
+ 0x00bdb862,
+ 0x00bdf07a,
+ 0x00be3002,
+ 0x00be381a,
+ 0x00be48a2,
+ 0x00bee802,
+ 0x00c05822,
+ 0x00c07001,
+ 0x00c07802,
+ 0x00c42812,
+ 0x00c54802,
+ 0x00c90022,
+ 0x00c9183a,
+ 0x00c93812,
+ 0x00c9482a,
+ 0x00c9801a,
+ 0x00c99002,
+ 0x00c9985a,
+ 0x00c9c822,
+ 0x00d0b812,
+ 0x00d0c81a,
+ 0x00d0d802,
+ 0x00d2a80a,
+ 0x00d2b002,
+ 0x00d2b80a,
+ 0x00d2c062,
+ 0x00d30002,
+ 0x00d31002,
+ 0x00d32872,
+ 0x00d3685a,
+ 0x00d39892,
+ 0x00d3f802,
+ 0x00d581e2,
+ 0x00d80032,
+ 0x00d8200a,
+ 0x00d9a062,
+ 0x00d9d80a,
+ 0x00d9e002,
+ 0x00d9e84a,
+ 0x00da1002,
+ 0x00da181a,
+ 0x00db5882,
+ 0x00dc0012,
+ 0x00dc100a,
+ 0x00dd080a,
+ 0x00dd1032,
+ 0x00dd301a,
+ 0x00dd4012,
+ 0x00dd500a,
+ 0x00dd5822,
+ 0x00df3002,
+ 0x00df380a,
+ 0x00df4012,
+ 0x00df502a,
+ 0x00df6802,
+ 0x00df700a,
+ 0x00df7822,
+ 0x00df901a,
+ 0x00e1207a,
+ 0x00e16072,
+ 0x00e1a01a,
+ 0x00e1b012,
+ 0x00e68022,
+ 0x00e6a0c2,
+ 0x00e7080a,
+ 0x00e71062,
+ 0x00e76802,
+ 0x00e7a002,
+ 0x00e7b80a,
+ 0x00e7c012,
+ 0x00ee03f2,
+ 0x01005801,
+ 0x01006002,
+ 0x0100680d,
+ 0x01007011,
+ 0x01014061,
+ 0x0101e003,
+ 0x01024803,
+ 0x010300f1,
+ 0x01068202,
+ 0x01091003,
+ 0x0109c803,
+ 0x010ca053,
+ 0x010d4813,
+ 0x0118d013,
+ 0x01194003,
+ 0x011c4003,
+ 0x011e7803,
+ 0x011f48a3,
+ 0x011fc023,
+ 0x01261003,
+ 0x012d5013,
+ 0x012db003,
+ 0x012e0003,
+ 0x012fd833,
+ 0x01300053,
+ 0x013038b3,
+ 0x0130a713,
+ 0x01348753,
+ 0x013840a3,
+ 0x0138a003,
+ 0x0138b003,
+ 0x0138e803,
+ 0x01390803,
+ 0x01394003,
+ 0x01399813,
+ 0x013a2003,
+ 0x013a3803,
+ 0x013a6003,
+ 0x013a7003,
+ 0x013a9823,
+ 0x013ab803,
+ 0x013b1843,
+ 0x013ca823,
+ 0x013d0803,
+ 0x013d8003,
+ 0x013df803,
+ 0x0149a013,
+ 0x01582823,
+ 0x0158d813,
+ 0x015a8003,
+ 0x015aa803,
+ 0x01677822,
+ 0x016bf802,
+ 0x016f01f2,
+ 0x01815052,
+ 0x01818003,
+ 0x0181e803,
+ 0x0184c812,
+ 0x0194b803,
+ 0x0194c803,
+ 0x05337832,
+ 0x0533a092,
+ 0x0534f012,
+ 0x05378012,
+ 0x05401002,
+ 0x05403002,
+ 0x05405802,
+ 0x0541181a,
+ 0x05412812,
+ 0x0541380a,
+ 0x05416002,
+ 0x0544001a,
+ 0x0545a0fa,
+ 0x05462012,
+ 0x05470112,
+ 0x0547f802,
+ 0x05493072,
+ 0x054a38a2,
+ 0x054a901a,
+ 0x054b01c4,
+ 0x054c0022,
+ 0x054c180a,
+ 0x054d9802,
+ 0x054da01a,
+ 0x054db032,
+ 0x054dd01a,
+ 0x054de012,
+ 0x054df02a,
+ 0x054f2802,
+ 0x05514852,
+ 0x0551781a,
+ 0x05518812,
+ 0x0551981a,
+ 0x0551a812,
+ 0x05521802,
+ 0x05526002,
+ 0x0552680a,
+ 0x0553e002,
+ 0x05558002,
+ 0x05559022,
+ 0x0555b812,
+ 0x0555f012,
+ 0x05560802,
+ 0x0557580a,
+ 0x05576012,
+ 0x0557701a,
+ 0x0557a80a,
+ 0x0557b002,
+ 0x055f181a,
+ 0x055f2802,
+ 0x055f301a,
+ 0x055f4002,
+ 0x055f481a,
+ 0x055f600a,
+ 0x055f6802,
+ 0x05600006,
+ 0x056009a7,
+ 0x0560e006,
+ 0x0560e9a7,
+ 0x0561c006,
+ 0x0561c9a7,
+ 0x0562a006,
+ 0x0562a9a7,
+ 0x05638006,
+ 0x056389a7,
+ 0x05646006,
+ 0x056469a7,
+ 0x05654006,
+ 0x056549a7,
+ 0x05662006,
+ 0x056629a7,
+ 0x05670006,
+ 0x056709a7,
+ 0x0567e006,
+ 0x0567e9a7,
+ 0x0568c006,
+ 0x0568c9a7,
+ 0x0569a006,
+ 0x0569a9a7,
+ 0x056a8006,
+ 0x056a89a7,
+ 0x056b6006,
+ 0x056b69a7,
+ 0x056c4006,
+ 0x056c49a7,
+ 0x056d2006,
+ 0x056d29a7,
+ 0x056e0006,
+ 0x056e09a7,
+ 0x056ee006,
+ 0x056ee9a7,
+ 0x056fc006,
+ 0x056fc9a7,
+ 0x0570a006,
+ 0x0570a9a7,
+ 0x05718006,
+ 0x057189a7,
+ 0x05726006,
+ 0x057269a7,
+ 0x05734006,
+ 0x057349a7,
+ 0x05742006,
+ 0x057429a7,
+ 0x05750006,
+ 0x057509a7,
+ 0x0575e006,
+ 0x0575e9a7,
+ 0x0576c006,
+ 0x0576c9a7,
+ 0x0577a006,
+ 0x0577a9a7,
+ 0x05788006,
+ 0x057889a7,
+ 0x05796006,
+ 0x057969a7,
+ 0x057a4006,
+ 0x057a49a7,
+ 0x057b2006,
+ 0x057b29a7,
+ 0x057c0006,
+ 0x057c09a7,
+ 0x057ce006,
+ 0x057ce9a7,
+ 0x057dc006,
+ 0x057dc9a7,
+ 0x057ea006,
+ 0x057ea9a7,
+ 0x057f8006,
+ 0x057f89a7,
+ 0x05806006,
+ 0x058069a7,
+ 0x05814006,
+ 0x058149a7,
+ 0x05822006,
+ 0x058229a7,
+ 0x05830006,
+ 0x058309a7,
+ 0x0583e006,
+ 0x0583e9a7,
+ 0x0584c006,
+ 0x0584c9a7,
+ 0x0585a006,
+ 0x0585a9a7,
+ 0x05868006,
+ 0x058689a7,
+ 0x05876006,
+ 0x058769a7,
+ 0x05884006,
+ 0x058849a7,
+ 0x05892006,
+ 0x058929a7,
+ 0x058a0006,
+ 0x058a09a7,
+ 0x058ae006,
+ 0x058ae9a7,
+ 0x058bc006,
+ 0x058bc9a7,
+ 0x058ca006,
+ 0x058ca9a7,
+ 0x058d8006,
+ 0x058d89a7,
+ 0x058e6006,
+ 0x058e69a7,
+ 0x058f4006,
+ 0x058f49a7,
+ 0x05902006,
+ 0x059029a7,
+ 0x05910006,
+ 0x059109a7,
+ 0x0591e006,
+ 0x0591e9a7,
+ 0x0592c006,
+ 0x0592c9a7,
+ 0x0593a006,
+ 0x0593a9a7,
+ 0x05948006,
+ 0x059489a7,
+ 0x05956006,
+ 0x059569a7,
+ 0x05964006,
+ 0x059649a7,
+ 0x05972006,
+ 0x059729a7,
+ 0x05980006,
+ 0x059809a7,
+ 0x0598e006,
+ 0x0598e9a7,
+ 0x0599c006,
+ 0x0599c9a7,
+ 0x059aa006,
+ 0x059aa9a7,
+ 0x059b8006,
+ 0x059b89a7,
+ 0x059c6006,
+ 0x059c69a7,
+ 0x059d4006,
+ 0x059d49a7,
+ 0x059e2006,
+ 0x059e29a7,
+ 0x059f0006,
+ 0x059f09a7,
+ 0x059fe006,
+ 0x059fe9a7,
+ 0x05a0c006,
+ 0x05a0c9a7,
+ 0x05a1a006,
+ 0x05a1a9a7,
+ 0x05a28006,
+ 0x05a289a7,
+ 0x05a36006,
+ 0x05a369a7,
+ 0x05a44006,
+ 0x05a449a7,
+ 0x05a52006,
+ 0x05a529a7,
+ 0x05a60006,
+ 0x05a609a7,
+ 0x05a6e006,
+ 0x05a6e9a7,
+ 0x05a7c006,
+ 0x05a7c9a7,
+ 0x05a8a006,
+ 0x05a8a9a7,
+ 0x05a98006,
+ 0x05a989a7,
+ 0x05aa6006,
+ 0x05aa69a7,
+ 0x05ab4006,
+ 0x05ab49a7,
+ 0x05ac2006,
+ 0x05ac29a7,
+ 0x05ad0006,
+ 0x05ad09a7,
+ 0x05ade006,
+ 0x05ade9a7,
+ 0x05aec006,
+ 0x05aec9a7,
+ 0x05afa006,
+ 0x05afa9a7,
+ 0x05b08006,
+ 0x05b089a7,
+ 0x05b16006,
+ 0x05b169a7,
+ 0x05b24006,
+ 0x05b249a7,
+ 0x05b32006,
+ 0x05b329a7,
+ 0x05b40006,
+ 0x05b409a7,
+ 0x05b4e006,
+ 0x05b4e9a7,
+ 0x05b5c006,
+ 0x05b5c9a7,
+ 0x05b6a006,
+ 0x05b6a9a7,
+ 0x05b78006,
+ 0x05b789a7,
+ 0x05b86006,
+ 0x05b869a7,
+ 0x05b94006,
+ 0x05b949a7,
+ 0x05ba2006,
+ 0x05ba29a7,
+ 0x05bb0006,
+ 0x05bb09a7,
+ 0x05bbe006,
+ 0x05bbe9a7,
+ 0x05bcc006,
+ 0x05bcc9a7,
+ 0x05bda006,
+ 0x05bda9a7,
+ 0x05be8006,
+ 0x05be89a7,
+ 0x05bf6006,
+ 0x05bf69a7,
+ 0x05c04006,
+ 0x05c049a7,
+ 0x05c12006,
+ 0x05c129a7,
+ 0x05c20006,
+ 0x05c209a7,
+ 0x05c2e006,
+ 0x05c2e9a7,
+ 0x05c3c006,
+ 0x05c3c9a7,
+ 0x05c4a006,
+ 0x05c4a9a7,
+ 0x05c58006,
+ 0x05c589a7,
+ 0x05c66006,
+ 0x05c669a7,
+ 0x05c74006,
+ 0x05c749a7,
+ 0x05c82006,
+ 0x05c829a7,
+ 0x05c90006,
+ 0x05c909a7,
+ 0x05c9e006,
+ 0x05c9e9a7,
+ 0x05cac006,
+ 0x05cac9a7,
+ 0x05cba006,
+ 0x05cba9a7,
+ 0x05cc8006,
+ 0x05cc89a7,
+ 0x05cd6006,
+ 0x05cd69a7,
+ 0x05ce4006,
+ 0x05ce49a7,
+ 0x05cf2006,
+ 0x05cf29a7,
+ 0x05d00006,
+ 0x05d009a7,
+ 0x05d0e006,
+ 0x05d0e9a7,
+ 0x05d1c006,
+ 0x05d1c9a7,
+ 0x05d2a006,
+ 0x05d2a9a7,
+ 0x05d38006,
+ 0x05d389a7,
+ 0x05d46006,
+ 0x05d469a7,
+ 0x05d54006,
+ 0x05d549a7,
+ 0x05d62006,
+ 0x05d629a7,
+ 0x05d70006,
+ 0x05d709a7,
+ 0x05d7e006,
+ 0x05d7e9a7,
+ 0x05d8c006,
+ 0x05d8c9a7,
+ 0x05d9a006,
+ 0x05d9a9a7,
+ 0x05da8006,
+ 0x05da89a7,
+ 0x05db6006,
+ 0x05db69a7,
+ 0x05dc4006,
+ 0x05dc49a7,
+ 0x05dd2006,
+ 0x05dd29a7,
+ 0x05de0006,
+ 0x05de09a7,
+ 0x05dee006,
+ 0x05dee9a7,
+ 0x05dfc006,
+ 0x05dfc9a7,
+ 0x05e0a006,
+ 0x05e0a9a7,
+ 0x05e18006,
+ 0x05e189a7,
+ 0x05e26006,
+ 0x05e269a7,
+ 0x05e34006,
+ 0x05e349a7,
+ 0x05e42006,
+ 0x05e429a7,
+ 0x05e50006,
+ 0x05e509a7,
+ 0x05e5e006,
+ 0x05e5e9a7,
+ 0x05e6c006,
+ 0x05e6c9a7,
+ 0x05e7a006,
+ 0x05e7a9a7,
+ 0x05e88006,
+ 0x05e889a7,
+ 0x05e96006,
+ 0x05e969a7,
+ 0x05ea4006,
+ 0x05ea49a7,
+ 0x05eb2006,
+ 0x05eb29a7,
+ 0x05ec0006,
+ 0x05ec09a7,
+ 0x05ece006,
+ 0x05ece9a7,
+ 0x05edc006,
+ 0x05edc9a7,
+ 0x05eea006,
+ 0x05eea9a7,
+ 0x05ef8006,
+ 0x05ef89a7,
+ 0x05f06006,
+ 0x05f069a7,
+ 0x05f14006,
+ 0x05f149a7,
+ 0x05f22006,
+ 0x05f229a7,
+ 0x05f30006,
+ 0x05f309a7,
+ 0x05f3e006,
+ 0x05f3e9a7,
+ 0x05f4c006,
+ 0x05f4c9a7,
+ 0x05f5a006,
+ 0x05f5a9a7,
+ 0x05f68006,
+ 0x05f689a7,
+ 0x05f76006,
+ 0x05f769a7,
+ 0x05f84006,
+ 0x05f849a7,
+ 0x05f92006,
+ 0x05f929a7,
+ 0x05fa0006,
+ 0x05fa09a7,
+ 0x05fae006,
+ 0x05fae9a7,
+ 0x05fbc006,
+ 0x05fbc9a7,
+ 0x05fca006,
+ 0x05fca9a7,
+ 0x05fd8006,
+ 0x05fd89a7,
+ 0x05fe6006,
+ 0x05fe69a7,
+ 0x05ff4006,
+ 0x05ff49a7,
+ 0x06002006,
+ 0x060029a7,
+ 0x06010006,
+ 0x060109a7,
+ 0x0601e006,
+ 0x0601e9a7,
+ 0x0602c006,
+ 0x0602c9a7,
+ 0x0603a006,
+ 0x0603a9a7,
+ 0x06048006,
+ 0x060489a7,
+ 0x06056006,
+ 0x060569a7,
+ 0x06064006,
+ 0x060649a7,
+ 0x06072006,
+ 0x060729a7,
+ 0x06080006,
+ 0x060809a7,
+ 0x0608e006,
+ 0x0608e9a7,
+ 0x0609c006,
+ 0x0609c9a7,
+ 0x060aa006,
+ 0x060aa9a7,
+ 0x060b8006,
+ 0x060b89a7,
+ 0x060c6006,
+ 0x060c69a7,
+ 0x060d4006,
+ 0x060d49a7,
+ 0x060e2006,
+ 0x060e29a7,
+ 0x060f0006,
+ 0x060f09a7,
+ 0x060fe006,
+ 0x060fe9a7,
+ 0x0610c006,
+ 0x0610c9a7,
+ 0x0611a006,
+ 0x0611a9a7,
+ 0x06128006,
+ 0x061289a7,
+ 0x06136006,
+ 0x061369a7,
+ 0x06144006,
+ 0x061449a7,
+ 0x06152006,
+ 0x061529a7,
+ 0x06160006,
+ 0x061609a7,
+ 0x0616e006,
+ 0x0616e9a7,
+ 0x0617c006,
+ 0x0617c9a7,
+ 0x0618a006,
+ 0x0618a9a7,
+ 0x06198006,
+ 0x061989a7,
+ 0x061a6006,
+ 0x061a69a7,
+ 0x061b4006,
+ 0x061b49a7,
+ 0x061c2006,
+ 0x061c29a7,
+ 0x061d0006,
+ 0x061d09a7,
+ 0x061de006,
+ 0x061de9a7,
+ 0x061ec006,
+ 0x061ec9a7,
+ 0x061fa006,
+ 0x061fa9a7,
+ 0x06208006,
+ 0x062089a7,
+ 0x06216006,
+ 0x062169a7,
+ 0x06224006,
+ 0x062249a7,
+ 0x06232006,
+ 0x062329a7,
+ 0x06240006,
+ 0x062409a7,
+ 0x0624e006,
+ 0x0624e9a7,
+ 0x0625c006,
+ 0x0625c9a7,
+ 0x0626a006,
+ 0x0626a9a7,
+ 0x06278006,
+ 0x062789a7,
+ 0x06286006,
+ 0x062869a7,
+ 0x06294006,
+ 0x062949a7,
+ 0x062a2006,
+ 0x062a29a7,
+ 0x062b0006,
+ 0x062b09a7,
+ 0x062be006,
+ 0x062be9a7,
+ 0x062cc006,
+ 0x062cc9a7,
+ 0x062da006,
+ 0x062da9a7,
+ 0x062e8006,
+ 0x062e89a7,
+ 0x062f6006,
+ 0x062f69a7,
+ 0x06304006,
+ 0x063049a7,
+ 0x06312006,
+ 0x063129a7,
+ 0x06320006,
+ 0x063209a7,
+ 0x0632e006,
+ 0x0632e9a7,
+ 0x0633c006,
+ 0x0633c9a7,
+ 0x0634a006,
+ 0x0634a9a7,
+ 0x06358006,
+ 0x063589a7,
+ 0x06366006,
+ 0x063669a7,
+ 0x06374006,
+ 0x063749a7,
+ 0x06382006,
+ 0x063829a7,
+ 0x06390006,
+ 0x063909a7,
+ 0x0639e006,
+ 0x0639e9a7,
+ 0x063ac006,
+ 0x063ac9a7,
+ 0x063ba006,
+ 0x063ba9a7,
+ 0x063c8006,
+ 0x063c89a7,
+ 0x063d6006,
+ 0x063d69a7,
+ 0x063e4006,
+ 0x063e49a7,
+ 0x063f2006,
+ 0x063f29a7,
+ 0x06400006,
+ 0x064009a7,
+ 0x0640e006,
+ 0x0640e9a7,
+ 0x0641c006,
+ 0x0641c9a7,
+ 0x0642a006,
+ 0x0642a9a7,
+ 0x06438006,
+ 0x064389a7,
+ 0x06446006,
+ 0x064469a7,
+ 0x06454006,
+ 0x064549a7,
+ 0x06462006,
+ 0x064629a7,
+ 0x06470006,
+ 0x064709a7,
+ 0x0647e006,
+ 0x0647e9a7,
+ 0x0648c006,
+ 0x0648c9a7,
+ 0x0649a006,
+ 0x0649a9a7,
+ 0x064a8006,
+ 0x064a89a7,
+ 0x064b6006,
+ 0x064b69a7,
+ 0x064c4006,
+ 0x064c49a7,
+ 0x064d2006,
+ 0x064d29a7,
+ 0x064e0006,
+ 0x064e09a7,
+ 0x064ee006,
+ 0x064ee9a7,
+ 0x064fc006,
+ 0x064fc9a7,
+ 0x0650a006,
+ 0x0650a9a7,
+ 0x06518006,
+ 0x065189a7,
+ 0x06526006,
+ 0x065269a7,
+ 0x06534006,
+ 0x065349a7,
+ 0x06542006,
+ 0x065429a7,
+ 0x06550006,
+ 0x065509a7,
+ 0x0655e006,
+ 0x0655e9a7,
+ 0x0656c006,
+ 0x0656c9a7,
+ 0x0657a006,
+ 0x0657a9a7,
+ 0x06588006,
+ 0x065889a7,
+ 0x06596006,
+ 0x065969a7,
+ 0x065a4006,
+ 0x065a49a7,
+ 0x065b2006,
+ 0x065b29a7,
+ 0x065c0006,
+ 0x065c09a7,
+ 0x065ce006,
+ 0x065ce9a7,
+ 0x065dc006,
+ 0x065dc9a7,
+ 0x065ea006,
+ 0x065ea9a7,
+ 0x065f8006,
+ 0x065f89a7,
+ 0x06606006,
+ 0x066069a7,
+ 0x06614006,
+ 0x066149a7,
+ 0x06622006,
+ 0x066229a7,
+ 0x06630006,
+ 0x066309a7,
+ 0x0663e006,
+ 0x0663e9a7,
+ 0x0664c006,
+ 0x0664c9a7,
+ 0x0665a006,
+ 0x0665a9a7,
+ 0x06668006,
+ 0x066689a7,
+ 0x06676006,
+ 0x066769a7,
+ 0x06684006,
+ 0x066849a7,
+ 0x06692006,
+ 0x066929a7,
+ 0x066a0006,
+ 0x066a09a7,
+ 0x066ae006,
+ 0x066ae9a7,
+ 0x066bc006,
+ 0x066bc9a7,
+ 0x066ca006,
+ 0x066ca9a7,
+ 0x066d8006,
+ 0x066d89a7,
+ 0x066e6006,
+ 0x066e69a7,
+ 0x066f4006,
+ 0x066f49a7,
+ 0x06702006,
+ 0x067029a7,
+ 0x06710006,
+ 0x067109a7,
+ 0x0671e006,
+ 0x0671e9a7,
+ 0x0672c006,
+ 0x0672c9a7,
+ 0x0673a006,
+ 0x0673a9a7,
+ 0x06748006,
+ 0x067489a7,
+ 0x06756006,
+ 0x067569a7,
+ 0x06764006,
+ 0x067649a7,
+ 0x06772006,
+ 0x067729a7,
+ 0x06780006,
+ 0x067809a7,
+ 0x0678e006,
+ 0x0678e9a7,
+ 0x0679c006,
+ 0x0679c9a7,
+ 0x067aa006,
+ 0x067aa9a7,
+ 0x067b8006,
+ 0x067b89a7,
+ 0x067c6006,
+ 0x067c69a7,
+ 0x067d4006,
+ 0x067d49a7,
+ 0x067e2006,
+ 0x067e29a7,
+ 0x067f0006,
+ 0x067f09a7,
+ 0x067fe006,
+ 0x067fe9a7,
+ 0x0680c006,
+ 0x0680c9a7,
+ 0x0681a006,
+ 0x0681a9a7,
+ 0x06828006,
+ 0x068289a7,
+ 0x06836006,
+ 0x068369a7,
+ 0x06844006,
+ 0x068449a7,
+ 0x06852006,
+ 0x068529a7,
+ 0x06860006,
+ 0x068609a7,
+ 0x0686e006,
+ 0x0686e9a7,
+ 0x0687c006,
+ 0x0687c9a7,
+ 0x0688a006,
+ 0x0688a9a7,
+ 0x06898006,
+ 0x068989a7,
+ 0x068a6006,
+ 0x068a69a7,
+ 0x068b4006,
+ 0x068b49a7,
+ 0x068c2006,
+ 0x068c29a7,
+ 0x068d0006,
+ 0x068d09a7,
+ 0x068de006,
+ 0x068de9a7,
+ 0x068ec006,
+ 0x068ec9a7,
+ 0x068fa006,
+ 0x068fa9a7,
+ 0x06908006,
+ 0x069089a7,
+ 0x06916006,
+ 0x069169a7,
+ 0x06924006,
+ 0x069249a7,
+ 0x06932006,
+ 0x069329a7,
+ 0x06940006,
+ 0x069409a7,
+ 0x0694e006,
+ 0x0694e9a7,
+ 0x0695c006,
+ 0x0695c9a7,
+ 0x0696a006,
+ 0x0696a9a7,
+ 0x06978006,
+ 0x069789a7,
+ 0x06986006,
+ 0x069869a7,
+ 0x06994006,
+ 0x069949a7,
+ 0x069a2006,
+ 0x069a29a7,
+ 0x069b0006,
+ 0x069b09a7,
+ 0x069be006,
+ 0x069be9a7,
+ 0x069cc006,
+ 0x069cc9a7,
+ 0x069da006,
+ 0x069da9a7,
+ 0x069e8006,
+ 0x069e89a7,
+ 0x069f6006,
+ 0x069f69a7,
+ 0x06a04006,
+ 0x06a049a7,
+ 0x06a12006,
+ 0x06a129a7,
+ 0x06a20006,
+ 0x06a209a7,
+ 0x06a2e006,
+ 0x06a2e9a7,
+ 0x06a3c006,
+ 0x06a3c9a7,
+ 0x06a4a006,
+ 0x06a4a9a7,
+ 0x06a58006,
+ 0x06a589a7,
+ 0x06a66006,
+ 0x06a669a7,
+ 0x06a74006,
+ 0x06a749a7,
+ 0x06a82006,
+ 0x06a829a7,
+ 0x06a90006,
+ 0x06a909a7,
+ 0x06a9e006,
+ 0x06a9e9a7,
+ 0x06aac006,
+ 0x06aac9a7,
+ 0x06aba006,
+ 0x06aba9a7,
+ 0x06ac8006,
+ 0x06ac89a7,
+ 0x06ad6006,
+ 0x06ad69a7,
+ 0x06ae4006,
+ 0x06ae49a7,
+ 0x06af2006,
+ 0x06af29a7,
+ 0x06b00006,
+ 0x06b009a7,
+ 0x06b0e006,
+ 0x06b0e9a7,
+ 0x06b1c006,
+ 0x06b1c9a7,
+ 0x06b2a006,
+ 0x06b2a9a7,
+ 0x06b38006,
+ 0x06b389a7,
+ 0x06b46006,
+ 0x06b469a7,
+ 0x06b54006,
+ 0x06b549a7,
+ 0x06b62006,
+ 0x06b629a7,
+ 0x06b70006,
+ 0x06b709a7,
+ 0x06b7e006,
+ 0x06b7e9a7,
+ 0x06b8c006,
+ 0x06b8c9a7,
+ 0x06b9a006,
+ 0x06b9a9a7,
+ 0x06ba8006,
+ 0x06ba89a7,
+ 0x06bb6006,
+ 0x06bb69a7,
+ 0x06bc4006,
+ 0x06bc49a7,
+ 0x06bd816c,
+ 0x06be5b0b,
+ 0x07d8f002,
+ 0x07f000f2,
+ 0x07f100f2,
+ 0x07f7f801,
+ 0x07fcf012,
+ 0x07ff80b1,
+ 0x080fe802,
+ 0x08170002,
+ 0x081bb042,
+ 0x08500822,
+ 0x08502812,
+ 0x08506032,
+ 0x0851c022,
+ 0x0851f802,
+ 0x08572812,
+ 0x08692032,
+ 0x08755812,
+ 0x0877e822,
+ 0x087a30a2,
+ 0x087c1032,
+ 0x0880000a,
+ 0x08800802,
+ 0x0880100a,
+ 0x0881c0e2,
+ 0x08838002,
+ 0x08839812,
+ 0x0883f822,
+ 0x0884100a,
+ 0x0885802a,
+ 0x08859832,
+ 0x0885b81a,
+ 0x0885c812,
+ 0x0885e808,
+ 0x08861002,
+ 0x08866808,
+ 0x08880022,
+ 0x08893842,
+ 0x0889600a,
+ 0x08896872,
+ 0x088a281a,
+ 0x088b9802,
+ 0x088c0012,
+ 0x088c100a,
+ 0x088d982a,
+ 0x088db082,
+ 0x088df81a,
+ 0x088e1018,
+ 0x088e4832,
+ 0x088e700a,
+ 0x088e7802,
+ 0x0891602a,
+ 0x08917822,
+ 0x0891901a,
+ 0x0891a002,
+ 0x0891a80a,
+ 0x0891b012,
+ 0x0891f002,
+ 0x08920802,
+ 0x0896f802,
+ 0x0897002a,
+ 0x08971872,
+ 0x08980012,
+ 0x0898101a,
+ 0x0899d812,
+ 0x0899f002,
+ 0x0899f80a,
+ 0x089a0002,
+ 0x089a083a,
+ 0x089a381a,
+ 0x089a582a,
+ 0x089ab802,
+ 0x089b101a,
+ 0x089b3062,
+ 0x089b8042,
+ 0x08a1a82a,
+ 0x08a1c072,
+ 0x08a2001a,
+ 0x08a21022,
+ 0x08a2280a,
+ 0x08a23002,
+ 0x08a2f002,
+ 0x08a58002,
+ 0x08a5881a,
+ 0x08a59852,
+ 0x08a5c80a,
+ 0x08a5d002,
+ 0x08a5d81a,
+ 0x08a5e802,
+ 0x08a5f00a,
+ 0x08a5f812,
+ 0x08a6080a,
+ 0x08a61012,
+ 0x08ad7802,
+ 0x08ad801a,
+ 0x08ad9032,
+ 0x08adc03a,
+ 0x08ade012,
+ 0x08adf00a,
+ 0x08adf812,
+ 0x08aee012,
+ 0x08b1802a,
+ 0x08b19872,
+ 0x08b1d81a,
+ 0x08b1e802,
+ 0x08b1f00a,
+ 0x08b1f812,
+ 0x08b55802,
+ 0x08b5600a,
+ 0x08b56802,
+ 0x08b5701a,
+ 0x08b58052,
+ 0x08b5b00a,
+ 0x08b5b802,
+ 0x08b8e822,
+ 0x08b91032,
+ 0x08b9300a,
+ 0x08b93842,
+ 0x08c1602a,
+ 0x08c17882,
+ 0x08c1c00a,
+ 0x08c1c812,
+ 0x08c98002,
+ 0x08c9884a,
+ 0x08c9b81a,
+ 0x08c9d812,
+ 0x08c9e80a,
+ 0x08c9f002,
+ 0x08c9f808,
+ 0x08ca000a,
+ 0x08ca0808,
+ 0x08ca100a,
+ 0x08ca1802,
+ 0x08ce882a,
+ 0x08cea032,
+ 0x08ced012,
+ 0x08cee03a,
+ 0x08cf0002,
+ 0x08cf200a,
+ 0x08d00892,
+ 0x08d19852,
+ 0x08d1c80a,
+ 0x08d1d008,
+ 0x08d1d832,
+ 0x08d23802,
+ 0x08d28852,
+ 0x08d2b81a,
+ 0x08d2c822,
+ 0x08d42058,
+ 0x08d450c2,
+ 0x08d4b80a,
+ 0x08d4c012,
+ 0x08e1780a,
+ 0x08e18062,
+ 0x08e1c052,
+ 0x08e1f00a,
+ 0x08e1f802,
+ 0x08e49152,
+ 0x08e5480a,
+ 0x08e55062,
+ 0x08e5880a,
+ 0x08e59012,
+ 0x08e5a00a,
+ 0x08e5a812,
+ 0x08e98852,
+ 0x08e9d002,
+ 0x08e9e012,
+ 0x08e9f862,
+ 0x08ea3008,
+ 0x08ea3802,
+ 0x08ec504a,
+ 0x08ec8012,
+ 0x08ec981a,
+ 0x08eca802,
+ 0x08ecb00a,
+ 0x08ecb802,
+ 0x08f79812,
+ 0x08f7a81a,
+ 0x08f80012,
+ 0x08f81008,
+ 0x08f8180a,
+ 0x08f9a01a,
+ 0x08f9b042,
+ 0x08f9f01a,
+ 0x08fa0002,
+ 0x08fa080a,
+ 0x08fa1002,
+ 0x09a180f1,
+ 0x09a20002,
+ 0x09a238e2,
+ 0x0b578042,
+ 0x0b598062,
+ 0x0b7a7802,
+ 0x0b7a8b6a,
+ 0x0b7c7832,
+ 0x0b7f2002,
+ 0x0b7f801a,
+ 0x0de4e812,
+ 0x0de50031,
+ 0x0e7802d2,
+ 0x0e798162,
+ 0x0e8b2802,
+ 0x0e8b300a,
+ 0x0e8b3822,
+ 0x0e8b680a,
+ 0x0e8b7042,
+ 0x0e8b9871,
+ 0x0e8bd872,
+ 0x0e8c2862,
+ 0x0e8d5032,
+ 0x0e921022,
+ 0x0ed00362,
+ 0x0ed1db12,
+ 0x0ed3a802,
+ 0x0ed42002,
+ 0x0ed4d842,
+ 0x0ed508e2,
+ 0x0f000062,
+ 0x0f004102,
+ 0x0f00d862,
+ 0x0f011812,
+ 0x0f013042,
+ 0x0f047802,
+ 0x0f098062,
+ 0x0f157002,
+ 0x0f176032,
+ 0x0f276032,
+ 0x0f468062,
+ 0x0f4a2062,
+ 0x0f8007f3,
+ 0x0f8407f3,
+ 0x0f886823,
+ 0x0f897803,
+ 0x0f8b6053,
+ 0x0f8bf013,
+ 0x0f8c7003,
+ 0x0f8c8893,
+ 0x0f8d6b83,
+ 0x0f8f3199,
+ 0x0f9008e3,
+ 0x0f90d003,
+ 0x0f917803,
+ 0x0f919083,
+ 0x0f91e033,
+ 0x0f924ff3,
+ 0x0f964ff3,
+ 0x0f9a4ff3,
+ 0x0f9e4b13,
+ 0x0f9fd842,
+ 0x0fa007f3,
+ 0x0fa407f3,
+ 0x0fa803d3,
+ 0x0faa37f3,
+ 0x0fae37f3,
+ 0x0fb23093,
+ 0x0fb407f3,
+ 0x0fbba0b3,
+ 0x0fbeaaa3,
+ 0x0fc06033,
+ 0x0fc24073,
+ 0x0fc2d053,
+ 0x0fc44073,
+ 0x0fc57513,
+ 0x0fc862e3,
+ 0x0fc9e093,
+ 0x0fca3ff3,
+ 0x0fce3ff3,
+ 0x0fd23ff3,
+ 0x0fd63b83,
+ 0x0fe007f3,
+ 0x0fe407f3,
+ 0x0fe807f3,
+ 0x0fec07f3,
+ 0x0ff007f3,
+ 0x0ff407f3,
+ 0x0ff807f3,
+ 0x0ffc07d3,
+ 0x700001f1,
+ 0x700105f2,
+ 0x700407f1,
+ 0x700807f2,
+ 0x700c06f2,
+ 0x700f87f1,
+ 0x701387f1,
+ 0x701787f1,
+ 0x701b87f1,
+ 0x701f87f1,
+ 0x702387f1,
+ 0x702787f1,
+ 0x702b87f1,
+ 0x702f87f1,
+ 0x703387f1,
+ 0x703787f1,
+ 0x703b87f1,
+ 0x703f87f1,
+ 0x704387f1,
+ 0x704787f1,
+ 0x704b87f1,
+ 0x704f87f1,
+ 0x705387f1,
+ 0x705787f1,
+ 0x705b87f1,
+ 0x705f87f1,
+ 0x706387f1,
+ 0x706787f1,
+ 0x706b87f1,
+ 0x706f87f1,
+ 0x707387f1,
+ 0x707787f1,
+ 0x707b87f1,
+ 0x707f80f1};
/// Returns the extended grapheme cluster bondary property of a code point.
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __property __get_property(const char32_t __code_point) noexcept {
- // TODO FMT use std::ranges::upper_bound.
-
// The algorithm searches for the upper bound of the range and, when found,
// steps back one entry. This algorithm is used since the code point can be
// anywhere in the range. After a lower bound is found the next step is to
@@ -311,7 +1640,7 @@ inline constexpr uint32_t __entries[1480] = {
// size. Then the upper bound for code point 3 will return the entry after
// 0x1810. After moving to the previous entry the algorithm arrives at the
// correct entry.
- ptrdiff_t __i = std::upper_bound(__entries, std::end(__entries), (__code_point << 11) | 0x7ffu) - __entries;
+ ptrdiff_t __i = std::ranges::upper_bound(__entries, (__code_point << 11) | 0x7ffu) - __entries;
if (__i == 0)
return __property::__none;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h
index 4f93024b7c..33d931ad79 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h
@@ -45,16 +45,22 @@ namespace __format {
/// It could be packed in 4-bits but that means a new type directly becomes an
/// ABI break. The packed type is 64-bit so this reduces the maximum number of
/// packed elements from 16 to 12.
+///
+/// @note Some members of this enum are an extension. These extensions need
+/// special behaviour in visit_format_arg. There they need to be wrapped in a
+/// handle to satisfy the user observable behaviour. The internal function
+/// __visit_format_arg doesn't do this wrapping. So in the format functions
+/// this function is used to avoid unneeded overhead.
enum class _LIBCPP_ENUM_VIS __arg_t : uint8_t {
__none,
__boolean,
__char_type,
__int,
__long_long,
- __i128,
+ __i128, // extension
__unsigned,
__unsigned_long_long,
- __u128,
+ __u128, // extension
__float,
__double,
__long_double,
@@ -85,9 +91,11 @@ constexpr __arg_t __get_packed_type(uint64_t __types, size_t __id) {
} // namespace __format
+// This function is not user obervable, so it can directly use the non-standard
+// types of the "variant". See __arg_t for more details.
template <class _Visitor, class _Context>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT decltype(auto) visit_format_arg(_Visitor&& __vis,
- basic_format_arg<_Context> __arg) {
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT decltype(auto)
+__visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
switch (__arg.__type_) {
case __format::__arg_t::__none:
return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__monostate_);
@@ -265,6 +273,28 @@ private:
typename __basic_format_arg_value<_Context>::__handle& __handle_;
};
+// This function is user facing, so it must wrap the non-standard types of
+// the "variant" in a handle to stay conforming. See __arg_t for more details.
+template <class _Visitor, class _Context>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT decltype(auto)
+visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
+ switch (__arg.__type_) {
+# ifndef _LIBCPP_HAS_NO_INT128
+ case __format::__arg_t::__i128: {
+ typename __basic_format_arg_value<_Context>::__handle __h{__arg.__value_.__i128_};
+ return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), typename basic_format_arg<_Context>::handle{__h});
+ }
+
+ case __format::__arg_t::__u128: {
+ typename __basic_format_arg_value<_Context>::__handle __h{__arg.__value_.__u128_};
+ return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), typename basic_format_arg<_Context>::handle{__h});
+ }
+# endif
+ default:
+ return _VSTD::__visit_format_arg(_VSTD::forward<_Visitor>(__vis), __arg);
+ }
+}
+
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_arg_store.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_arg_store.h
index 26a5e71b93..1820c0387c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_arg_store.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_arg_store.h
@@ -19,6 +19,7 @@
#include <__config>
#include <__format/concepts.h>
#include <__format/format_arg.h>
+#include <__utility/forward.h>
#include <cstring>
#include <string>
#include <string_view>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_args.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_args.h
index d90dc50acb..8b8fbde92f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_args.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_args.h
@@ -71,6 +71,7 @@ private:
const basic_format_arg<_Context>* __args_;
};
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(basic_format_args);
#endif //_LIBCPP_STD_VER > 17
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h
index b9a41db05d..882a6049bb 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h
@@ -18,7 +18,6 @@
#include <__iterator/back_insert_iterator.h>
#include <__iterator/concepts.h>
#include <__utility/move.h>
-#include <concepts>
#include <cstddef>
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
@@ -50,8 +49,7 @@ __format_context_create(
_OutIt __out_it,
basic_format_args<basic_format_context<_OutIt, _CharT>> __args,
optional<_VSTD::locale>&& __loc = nullopt) {
- return _VSTD::basic_format_context(_VSTD::move(__out_it), __args,
- _VSTD::move(__loc));
+ return _VSTD::basic_format_context(_VSTD::move(__out_it), __args, _VSTD::move(__loc));
}
#else
template <class _OutIt, class _CharT>
@@ -87,9 +85,6 @@ public:
template <class _Tp>
using formatter_type = formatter<_Tp, _CharT>;
- basic_format_context(const basic_format_context&) = delete;
- basic_format_context& operator=(const basic_format_context&) = delete;
-
_LIBCPP_HIDE_FROM_ABI basic_format_arg<basic_format_context>
arg(size_t __id) const noexcept {
return __args_.get(__id);
@@ -101,8 +96,8 @@ public:
return *__loc_;
}
#endif
- _LIBCPP_HIDE_FROM_ABI iterator out() { return __out_it_; }
- _LIBCPP_HIDE_FROM_ABI void advance_to(iterator __it) { __out_it_ = __it; }
+ _LIBCPP_HIDE_FROM_ABI iterator out() { return std::move(__out_it_); }
+ _LIBCPP_HIDE_FROM_ABI void advance_to(iterator __it) { __out_it_ = std::move(__it); }
private:
iterator __out_it_;
@@ -143,6 +138,7 @@ private:
: __out_it_(_VSTD::move(__out_it)), __args_(__args) {}
#endif
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(basic_format_context);
#endif //_LIBCPP_STD_VER > 17
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_error.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_error.h
index 67ff41cbc3..002d1a40a2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_error.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_error.h
@@ -11,11 +11,8 @@
#define _LIBCPP___FORMAT_FORMAT_ERROR_H
#include <__config>
-#include <stdexcept>
-
-#ifdef _LIBCPP_NO_EXCEPTIONS
#include <cstdlib>
-#endif
+#include <stdexcept>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -31,7 +28,14 @@ public:
: runtime_error(__s) {}
_LIBCPP_HIDE_FROM_ABI explicit format_error(const char* __s)
: runtime_error(__s) {}
- virtual ~format_error() noexcept;
+ // TODO FMT Remove when format is no longer experimental.
+ // Avoids linker errors when building the Clang-cl Windows DLL which doesn't
+ // support the experimental library.
+# ifndef _LIBCPP_INLINE_FORMAT_ERROR_DTOR
+ ~format_error() noexcept override;
+# else
+ ~format_error() noexcept override {}
+# endif
};
_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_functions.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_functions.h
new file mode 100644
index 0000000000..8c8b54e808
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_functions.h
@@ -0,0 +1,663 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___FORMAT_FORMAT_FUNCTIONS
+#define _LIBCPP___FORMAT_FORMAT_FUNCTIONS
+
+// TODO FMT This is added to fix Apple back-deployment.
+#include <version>
+#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+
+#include <__algorithm/clamp.h>
+#include <__availability>
+#include <__concepts/convertible_to.h>
+#include <__concepts/same_as.h>
+#include <__config>
+#include <__debug>
+#include <__format/buffer.h>
+#include <__format/format_arg.h>
+#include <__format/format_arg_store.h>
+#include <__format/format_args.h>
+#include <__format/format_context.h>
+#include <__format/format_error.h>
+#include <__format/format_parse_context.h>
+#include <__format/format_string.h>
+#include <__format/format_to_n_result.h>
+#include <__format/formatter.h>
+#include <__format/formatter_bool.h>
+#include <__format/formatter_char.h>
+#include <__format/formatter_floating_point.h>
+#include <__format/formatter_integer.h>
+#include <__format/formatter_pointer.h>
+#include <__format/formatter_string.h>
+#include <__format/parser_std_format_spec.h>
+#include <__iterator/back_insert_iterator.h>
+#include <__iterator/incrementable_traits.h>
+#include <__variant/monostate.h>
+#include <array>
+#include <string>
+#include <string_view>
+
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#include <locale>
+#endif
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 17
+
+// TODO FMT Evaluate which templates should be external templates. This
+// improves the efficiency of the header. However since the header is still
+// under heavy development and not all classes are stable it makes no sense
+// to do this optimization now.
+
+using format_args = basic_format_args<format_context>;
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+using wformat_args = basic_format_args<wformat_context>;
+#endif
+
+template <class _Context = format_context, class... _Args>
+_LIBCPP_HIDE_FROM_ABI __format_arg_store<_Context, _Args...> make_format_args(_Args&&... __args) {
+ return _VSTD::__format_arg_store<_Context, _Args...>(__args...);
+}
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <class... _Args>
+_LIBCPP_HIDE_FROM_ABI __format_arg_store<wformat_context, _Args...> make_wformat_args(_Args&&... __args) {
+ return _VSTD::__format_arg_store<wformat_context, _Args...>(__args...);
+}
+#endif
+
+namespace __format {
+
+/// Helper class parse and handle argument.
+///
+/// When parsing a handle which is not enabled the code is ill-formed.
+/// This helper uses the parser of the appropriate formatter for the stored type.
+template <class _CharT>
+class _LIBCPP_TEMPLATE_VIS __compile_time_handle {
+public:
+ _LIBCPP_HIDE_FROM_ABI
+ constexpr void __parse(basic_format_parse_context<_CharT>& __parse_ctx) const { __parse_(__parse_ctx); }
+
+ template <class _Tp>
+ _LIBCPP_HIDE_FROM_ABI constexpr void __enable() {
+ __parse_ = [](basic_format_parse_context<_CharT>& __parse_ctx) {
+ formatter<_Tp, _CharT> __f;
+ __parse_ctx.advance_to(__f.parse(__parse_ctx));
+ };
+ }
+
+ // Before calling __parse the proper handler needs to be set with __enable.
+ // The default handler isn't a core constant expression.
+ _LIBCPP_HIDE_FROM_ABI constexpr __compile_time_handle()
+ : __parse_([](basic_format_parse_context<_CharT>&) { __throw_format_error("Not a handle"); }) {}
+
+private:
+ void (*__parse_)(basic_format_parse_context<_CharT>&);
+};
+
+// Dummy format_context only providing the parts used during constant
+// validation of the basic_format_string.
+template <class _CharT>
+struct _LIBCPP_TEMPLATE_VIS __compile_time_basic_format_context {
+public:
+ using char_type = _CharT;
+
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit __compile_time_basic_format_context(
+ const __arg_t* __args, const __compile_time_handle<_CharT>* __handles, size_t __size)
+ : __args_(__args), __handles_(__handles), __size_(__size) {}
+
+ // During the compile-time validation nothing needs to be written.
+ // Therefore all operations of this iterator are a NOP.
+ struct iterator {
+ _LIBCPP_HIDE_FROM_ABI constexpr iterator& operator=(_CharT) { return *this; }
+ _LIBCPP_HIDE_FROM_ABI constexpr iterator& operator*() { return *this; }
+ _LIBCPP_HIDE_FROM_ABI constexpr iterator operator++(int) { return *this; }
+ };
+
+ _LIBCPP_HIDE_FROM_ABI constexpr __arg_t arg(size_t __id) const {
+ if (__id >= __size_)
+ __throw_format_error("Argument index out of bounds");
+ return __args_[__id];
+ }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr const __compile_time_handle<_CharT>& __handle(size_t __id) const {
+ if (__id >= __size_)
+ __throw_format_error("Argument index out of bounds");
+ return __handles_[__id];
+ }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr iterator out() { return {}; }
+ _LIBCPP_HIDE_FROM_ABI constexpr void advance_to(iterator) {}
+
+private:
+ const __arg_t* __args_;
+ const __compile_time_handle<_CharT>* __handles_;
+ size_t __size_;
+};
+
+_LIBCPP_HIDE_FROM_ABI
+constexpr void __compile_time_validate_integral(__arg_t __type) {
+ switch (__type) {
+ case __arg_t::__int:
+ case __arg_t::__long_long:
+ case __arg_t::__i128:
+ case __arg_t::__unsigned:
+ case __arg_t::__unsigned_long_long:
+ case __arg_t::__u128:
+ return;
+
+ default:
+ __throw_format_error("Argument isn't an integral type");
+ }
+}
+
+// _HasPrecision does the formatter have a precision?
+template <class _CharT, class _Tp, bool _HasPrecision = false>
+_LIBCPP_HIDE_FROM_ABI constexpr void
+__compile_time_validate_argument(basic_format_parse_context<_CharT>& __parse_ctx,
+ __compile_time_basic_format_context<_CharT>& __ctx) {
+ formatter<_Tp, _CharT> __formatter;
+ __parse_ctx.advance_to(__formatter.parse(__parse_ctx));
+ // [format.string.std]/7
+ // ... If the corresponding formatting argument is not of integral type, or
+ // its value is negative for precision or non-positive for width, an
+ // exception of type format_error is thrown.
+ //
+ // Validate whether the arguments are integrals.
+ if (__formatter.__parser_.__width_as_arg_)
+ __format::__compile_time_validate_integral(__ctx.arg(__formatter.__parser_.__width_));
+
+ if constexpr (_HasPrecision)
+ if (__formatter.__parser_.__precision_as_arg_)
+ __format::__compile_time_validate_integral(__ctx.arg(__formatter.__parser_.__precision_));
+}
+
+// This function is not user facing, so it can directly use the non-standard types of the "variant".
+template <class _CharT>
+_LIBCPP_HIDE_FROM_ABI constexpr void __compile_time_visit_format_arg(basic_format_parse_context<_CharT>& __parse_ctx,
+ __compile_time_basic_format_context<_CharT>& __ctx,
+ __arg_t __type) {
+ switch (__type) {
+ case __arg_t::__none:
+ __throw_format_error("Invalid argument");
+ case __arg_t::__boolean:
+ return __format::__compile_time_validate_argument<_CharT, bool>(__parse_ctx, __ctx);
+ case __arg_t::__char_type:
+ return __format::__compile_time_validate_argument<_CharT, _CharT>(__parse_ctx, __ctx);
+ case __arg_t::__int:
+ return __format::__compile_time_validate_argument<_CharT, int>(__parse_ctx, __ctx);
+ case __arg_t::__long_long:
+ return __format::__compile_time_validate_argument<_CharT, long long>(__parse_ctx, __ctx);
+ case __arg_t::__i128:
+# ifndef _LIBCPP_HAS_NO_INT128
+ return __format::__compile_time_validate_argument<_CharT, __int128_t>(__parse_ctx, __ctx);
+# else
+ __throw_format_error("Invalid argument");
+# endif
+ return;
+ case __arg_t::__unsigned:
+ return __format::__compile_time_validate_argument<_CharT, unsigned>(__parse_ctx, __ctx);
+ case __arg_t::__unsigned_long_long:
+ return __format::__compile_time_validate_argument<_CharT, unsigned long long>(__parse_ctx, __ctx);
+ case __arg_t::__u128:
+# ifndef _LIBCPP_HAS_NO_INT128
+ return __format::__compile_time_validate_argument<_CharT, __uint128_t>(__parse_ctx, __ctx);
+# else
+ __throw_format_error("Invalid argument");
+# endif
+ return;
+ case __arg_t::__float:
+ return __format::__compile_time_validate_argument<_CharT, float, true>(__parse_ctx, __ctx);
+ case __arg_t::__double:
+ return __format::__compile_time_validate_argument<_CharT, double, true>(__parse_ctx, __ctx);
+ case __arg_t::__long_double:
+ return __format::__compile_time_validate_argument<_CharT, long double, true>(__parse_ctx, __ctx);
+ case __arg_t::__const_char_type_ptr:
+ return __format::__compile_time_validate_argument<_CharT, const _CharT*, true>(__parse_ctx, __ctx);
+ case __arg_t::__string_view:
+ return __format::__compile_time_validate_argument<_CharT, basic_string_view<_CharT>, true>(__parse_ctx, __ctx);
+ case __arg_t::__ptr:
+ return __format::__compile_time_validate_argument<_CharT, const void*>(__parse_ctx, __ctx);
+ case __arg_t::__handle:
+ __throw_format_error("Handle should use __compile_time_validate_handle_argument");
+ }
+ __throw_format_error("Invalid argument");
+}
+
+template <class _CharT, class _ParseCtx, class _Ctx>
+_LIBCPP_HIDE_FROM_ABI constexpr const _CharT*
+__handle_replacement_field(const _CharT* __begin, const _CharT* __end,
+ _ParseCtx& __parse_ctx, _Ctx& __ctx) {
+ __format::__parse_number_result __r = __format::__parse_arg_id(__begin, __end, __parse_ctx);
+
+ bool __parse = *__r.__ptr == _CharT(':');
+ switch (*__r.__ptr) {
+ case _CharT(':'):
+ // The arg-id has a format-specifier, advance the input to the format-spec.
+ __parse_ctx.advance_to(__r.__ptr + 1);
+ break;
+ case _CharT('}'):
+ // The arg-id has no format-specifier.
+ __parse_ctx.advance_to(__r.__ptr);
+ break;
+ default:
+ __throw_format_error(
+ "The replacement field arg-id should terminate at a ':' or '}'");
+ }
+
+ if constexpr (same_as<_Ctx, __compile_time_basic_format_context<_CharT>>) {
+ __arg_t __type = __ctx.arg(__r.__value);
+ if (__type == __arg_t::__handle)
+ __ctx.__handle(__r.__value).__parse(__parse_ctx);
+ else
+ __format::__compile_time_visit_format_arg(__parse_ctx, __ctx, __type);
+ } else
+ _VSTD::__visit_format_arg(
+ [&](auto __arg) {
+ if constexpr (same_as<decltype(__arg), monostate>)
+ __throw_format_error("Argument index out of bounds");
+ else if constexpr (same_as<decltype(__arg), typename basic_format_arg<_Ctx>::handle>)
+ __arg.format(__parse_ctx, __ctx);
+ else {
+ formatter<decltype(__arg), _CharT> __formatter;
+ if (__parse)
+ __parse_ctx.advance_to(__formatter.parse(__parse_ctx));
+ __ctx.advance_to(__formatter.format(__arg, __ctx));
+ }
+ },
+ __ctx.arg(__r.__value));
+
+ __begin = __parse_ctx.begin();
+ if (__begin == __end || *__begin != _CharT('}'))
+ __throw_format_error("The replacement field misses a terminating '}'");
+
+ return ++__begin;
+}
+
+template <class _ParseCtx, class _Ctx>
+_LIBCPP_HIDE_FROM_ABI constexpr typename _Ctx::iterator
+__vformat_to(_ParseCtx&& __parse_ctx, _Ctx&& __ctx) {
+ using _CharT = typename _ParseCtx::char_type;
+ static_assert(same_as<typename _Ctx::char_type, _CharT>);
+
+ const _CharT* __begin = __parse_ctx.begin();
+ const _CharT* __end = __parse_ctx.end();
+ typename _Ctx::iterator __out_it = __ctx.out();
+ while (__begin != __end) {
+ switch (*__begin) {
+ case _CharT('{'):
+ ++__begin;
+ if (__begin == __end)
+ __throw_format_error("The format string terminates at a '{'");
+
+ if (*__begin != _CharT('{')) [[likely]] {
+ __ctx.advance_to(_VSTD::move(__out_it));
+ __begin =
+ __handle_replacement_field(__begin, __end, __parse_ctx, __ctx);
+ __out_it = __ctx.out();
+
+ // The output is written and __begin points to the next character. So
+ // start the next iteration.
+ continue;
+ }
+ // The string is an escape character.
+ break;
+
+ case _CharT('}'):
+ ++__begin;
+ if (__begin == __end || *__begin != _CharT('}'))
+ __throw_format_error(
+ "The format string contains an invalid escape sequence");
+
+ break;
+ }
+
+ // Copy the character to the output verbatim.
+ *__out_it++ = *__begin++;
+ }
+ return __out_it;
+}
+
+} // namespace __format
+
+template <class _CharT, class... _Args>
+struct _LIBCPP_TEMPLATE_VIS basic_format_string {
+ template <class _Tp>
+ requires convertible_to<const _Tp&, basic_string_view<_CharT>>
+ consteval basic_format_string(const _Tp& __str) : __str_{__str} {
+ __format::__vformat_to(basic_format_parse_context<_CharT>{__str_, sizeof...(_Args)},
+ _Context{__types_.data(), __handles_.data(), sizeof...(_Args)});
+ }
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT constexpr basic_string_view<_CharT> get() const noexcept {
+ return __str_;
+ }
+
+private:
+ basic_string_view<_CharT> __str_;
+
+ using _Context = __format::__compile_time_basic_format_context<_CharT>;
+
+ static constexpr array<__format::__arg_t, sizeof...(_Args)> __types_{
+ __format::__determine_arg_t<_Context, remove_cvref_t<_Args>>()...};
+
+ // TODO FMT remove this work-around when the AIX ICE has been resolved.
+# if defined(_AIX) && defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER < 1400
+ template <class _Tp>
+ static constexpr __format::__compile_time_handle<_CharT> __get_handle() {
+ __format::__compile_time_handle<_CharT> __handle;
+ if (__format::__determine_arg_t<_Context, _Tp>() == __format::__arg_t::__handle)
+ __handle.template __enable<_Tp>();
+
+ return __handle;
+ }
+
+ static constexpr array<__format::__compile_time_handle<_CharT>, sizeof...(_Args)> __handles_{
+ __get_handle<_Args>()...};
+# else
+ static constexpr array<__format::__compile_time_handle<_CharT>, sizeof...(_Args)> __handles_{[] {
+ using _Tp = remove_cvref_t<_Args>;
+ __format::__compile_time_handle<_CharT> __handle;
+ if (__format::__determine_arg_t<_Context, _Tp>() == __format::__arg_t::__handle)
+ __handle.template __enable<_Tp>();
+
+ return __handle;
+ }()...};
+# endif
+};
+
+template <class... _Args>
+using format_string = basic_format_string<char, type_identity_t<_Args>...>;
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <class... _Args>
+using wformat_string = basic_format_string<wchar_t, type_identity_t<_Args>...>;
+#endif
+
+template <class _OutIt, class _CharT, class _FormatOutIt>
+requires(output_iterator<_OutIt, const _CharT&>) _LIBCPP_HIDE_FROM_ABI _OutIt
+ __vformat_to(
+ _OutIt __out_it, basic_string_view<_CharT> __fmt,
+ basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
+ if constexpr (same_as<_OutIt, _FormatOutIt>)
+ return _VSTD::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
+ _VSTD::__format_context_create(_VSTD::move(__out_it), __args));
+ else {
+ __format::__format_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it)};
+ _VSTD::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
+ _VSTD::__format_context_create(__buffer.__make_output_iterator(), __args));
+ return _VSTD::move(__buffer).__out_it();
+ }
+}
+
+// The function is _LIBCPP_ALWAYS_INLINE since the compiler is bad at inlining
+// https://reviews.llvm.org/D110499#inline-1180704
+// TODO FMT Evaluate whether we want to file a Clang bug report regarding this.
+template <output_iterator<const char&> _OutIt>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
+vformat_to(_OutIt __out_it, string_view __fmt, format_args __args) {
+ return _VSTD::__vformat_to(_VSTD::move(__out_it), __fmt, __args);
+}
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <output_iterator<const wchar_t&> _OutIt>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
+vformat_to(_OutIt __out_it, wstring_view __fmt, wformat_args __args) {
+ return _VSTD::__vformat_to(_VSTD::move(__out_it), __fmt, __args);
+}
+#endif
+
+template <output_iterator<const char&> _OutIt, class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
+format_to(_OutIt __out_it, format_string<_Args...> __fmt, _Args&&... __args) {
+ return _VSTD::vformat_to(_VSTD::move(__out_it), __fmt.get(),
+ _VSTD::make_format_args(__args...));
+}
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <output_iterator<const wchar_t&> _OutIt, class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
+format_to(_OutIt __out_it, wformat_string<_Args...> __fmt, _Args&&... __args) {
+ return _VSTD::vformat_to(_VSTD::move(__out_it), __fmt.get(),
+ _VSTD::make_wformat_args(__args...));
+}
+#endif
+
+_LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string
+vformat(string_view __fmt, format_args __args) {
+ string __res;
+ _VSTD::vformat_to(_VSTD::back_inserter(__res), __fmt, __args);
+ return __res;
+}
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+_LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring
+vformat(wstring_view __fmt, wformat_args __args) {
+ wstring __res;
+ _VSTD::vformat_to(_VSTD::back_inserter(__res), __fmt, __args);
+ return __res;
+}
+#endif
+
+template <class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string format(format_string<_Args...> __fmt,
+ _Args&&... __args) {
+ return _VSTD::vformat(__fmt.get(), _VSTD::make_format_args(__args...));
+}
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring
+format(wformat_string<_Args...> __fmt, _Args&&... __args) {
+ return _VSTD::vformat(__fmt.get(), _VSTD::make_wformat_args(__args...));
+}
+#endif
+
+template <class _Context, class _OutIt, class _CharT>
+_LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __vformat_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n,
+ basic_string_view<_CharT> __fmt,
+ basic_format_args<_Context> __args) {
+ __format::__format_to_n_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it), __n};
+ _VSTD::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
+ _VSTD::__format_context_create(__buffer.__make_output_iterator(), __args));
+ return _VSTD::move(__buffer).__result();
+}
+
+template <output_iterator<const char&> _OutIt, class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
+format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, format_string<_Args...> __fmt, _Args&&... __args) {
+ return _VSTD::__vformat_to_n<format_context>(_VSTD::move(__out_it), __n, __fmt.get(), _VSTD::make_format_args(__args...));
+}
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <output_iterator<const wchar_t&> _OutIt, class... _Args>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
+format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, wformat_string<_Args...> __fmt,
+ _Args&&... __args) {
+ return _VSTD::__vformat_to_n<wformat_context>(_VSTD::move(__out_it), __n, __fmt.get(), _VSTD::make_wformat_args(__args...));
+}
+#endif
+
+template <class _CharT>
+_LIBCPP_HIDE_FROM_ABI size_t __vformatted_size(basic_string_view<_CharT> __fmt, auto __args) {
+ __format::__formatted_size_buffer<_CharT> __buffer;
+ _VSTD::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
+ _VSTD::__format_context_create(__buffer.__make_output_iterator(), __args));
+ return _VSTD::move(__buffer).__result();
+}
+
+template <class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t
+formatted_size(format_string<_Args...> __fmt, _Args&&... __args) {
+ return _VSTD::__vformatted_size(__fmt.get(), basic_format_args{_VSTD::make_format_args(__args...)});
+}
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t
+formatted_size(wformat_string<_Args...> __fmt, _Args&&... __args) {
+ return _VSTD::__vformatted_size(__fmt.get(), basic_format_args{_VSTD::make_wformat_args(__args...)});
+}
+#endif
+
+#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+
+template <class _OutIt, class _CharT, class _FormatOutIt>
+requires(output_iterator<_OutIt, const _CharT&>) _LIBCPP_HIDE_FROM_ABI _OutIt
+ __vformat_to(
+ _OutIt __out_it, locale __loc, basic_string_view<_CharT> __fmt,
+ basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
+ if constexpr (same_as<_OutIt, _FormatOutIt>)
+ return _VSTD::__format::__vformat_to(
+ basic_format_parse_context{__fmt, __args.__size()},
+ _VSTD::__format_context_create(_VSTD::move(__out_it), __args, _VSTD::move(__loc)));
+ else {
+ __format::__format_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it)};
+ _VSTD::__format::__vformat_to(
+ basic_format_parse_context{__fmt, __args.__size()},
+ _VSTD::__format_context_create(__buffer.__make_output_iterator(), __args, _VSTD::move(__loc)));
+ return _VSTD::move(__buffer).__out_it();
+ }
+}
+
+template <output_iterator<const char&> _OutIt>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt vformat_to(
+ _OutIt __out_it, locale __loc, string_view __fmt, format_args __args) {
+ return _VSTD::__vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt,
+ __args);
+}
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <output_iterator<const wchar_t&> _OutIt>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt vformat_to(
+ _OutIt __out_it, locale __loc, wstring_view __fmt, wformat_args __args) {
+ return _VSTD::__vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt,
+ __args);
+}
+#endif
+
+template <output_iterator<const char&> _OutIt, class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
+format_to(_OutIt __out_it, locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
+ return _VSTD::vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt.get(),
+ _VSTD::make_format_args(__args...));
+}
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <output_iterator<const wchar_t&> _OutIt, class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
+format_to(_OutIt __out_it, locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
+ return _VSTD::vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt.get(),
+ _VSTD::make_wformat_args(__args...));
+}
+#endif
+
+_LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string
+vformat(locale __loc, string_view __fmt, format_args __args) {
+ string __res;
+ _VSTD::vformat_to(_VSTD::back_inserter(__res), _VSTD::move(__loc), __fmt,
+ __args);
+ return __res;
+}
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+_LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring
+vformat(locale __loc, wstring_view __fmt, wformat_args __args) {
+ wstring __res;
+ _VSTD::vformat_to(_VSTD::back_inserter(__res), _VSTD::move(__loc), __fmt,
+ __args);
+ return __res;
+}
+#endif
+
+template <class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string format(locale __loc,
+ format_string<_Args...> __fmt,
+ _Args&&... __args) {
+ return _VSTD::vformat(_VSTD::move(__loc), __fmt.get(),
+ _VSTD::make_format_args(__args...));
+}
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring
+format(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
+ return _VSTD::vformat(_VSTD::move(__loc), __fmt.get(),
+ _VSTD::make_wformat_args(__args...));
+}
+#endif
+
+template <class _Context, class _OutIt, class _CharT>
+_LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __vformat_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n,
+ locale __loc, basic_string_view<_CharT> __fmt,
+ basic_format_args<_Context> __args) {
+ __format::__format_to_n_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it), __n};
+ _VSTD::__format::__vformat_to(
+ basic_format_parse_context{__fmt, __args.__size()},
+ _VSTD::__format_context_create(__buffer.__make_output_iterator(), __args, _VSTD::move(__loc)));
+ return _VSTD::move(__buffer).__result();
+}
+
+template <output_iterator<const char&> _OutIt, class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
+format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, locale __loc, format_string<_Args...> __fmt,
+ _Args&&... __args) {
+ return _VSTD::__vformat_to_n<format_context>(_VSTD::move(__out_it), __n, _VSTD::move(__loc), __fmt.get(),
+ _VSTD::make_format_args(__args...));
+}
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <output_iterator<const wchar_t&> _OutIt, class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
+format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, locale __loc, wformat_string<_Args...> __fmt,
+ _Args&&... __args) {
+ return _VSTD::__vformat_to_n<wformat_context>(_VSTD::move(__out_it), __n, _VSTD::move(__loc), __fmt.get(),
+ _VSTD::make_wformat_args(__args...));
+}
+#endif
+
+template <class _CharT>
+_LIBCPP_HIDE_FROM_ABI size_t __vformatted_size(locale __loc, basic_string_view<_CharT> __fmt, auto __args) {
+ __format::__formatted_size_buffer<_CharT> __buffer;
+ _VSTD::__format::__vformat_to(
+ basic_format_parse_context{__fmt, __args.__size()},
+ _VSTD::__format_context_create(__buffer.__make_output_iterator(), __args, _VSTD::move(__loc)));
+ return _VSTD::move(__buffer).__result();
+}
+
+template <class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t
+formatted_size(locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
+ return _VSTD::__vformatted_size(_VSTD::move(__loc), __fmt.get(), basic_format_args{_VSTD::make_format_args(__args...)});
+}
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <class... _Args>
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t
+formatted_size(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
+ return _VSTD::__vformatted_size(_VSTD::move(__loc), __fmt.get(), basic_format_args{_VSTD::make_wformat_args(__args...)});
+}
+#endif
+
+#endif // _LIBCPP_HAS_NO_LOCALIZATION
+
+
+#endif //_LIBCPP_STD_VER > 17
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+
+#endif // _LIBCPP___FORMAT_FORMAT_FUNCTIONS
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_parse_context.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_parse_context.h
index 272b615d10..4bcfda1138 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_parse_context.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_parse_context.h
@@ -88,6 +88,7 @@ private:
size_t __next_arg_id_;
size_t __num_args_;
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(basic_format_parse_context);
using format_parse_context = basic_format_parse_context<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_string.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_string.h
index 51c3c7a1a6..6033180d97 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_string.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_string.h
@@ -33,6 +33,9 @@ struct _LIBCPP_TEMPLATE_VIS __parse_number_result {
};
template <class _CharT>
+__parse_number_result(const _CharT*, uint32_t) -> __parse_number_result<_CharT>;
+
+template <class _CharT>
_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
__parse_number(const _CharT* __begin, const _CharT* __end);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_to_n_result.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_to_n_result.h
index 25caa1c9e9..f1ed9a0982 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_to_n_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_to_n_result.h
@@ -26,6 +26,7 @@ struct _LIBCPP_TEMPLATE_VIS format_to_n_result {
_OutIt out;
iter_difference_t<_OutIt> size;
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(format_to_n_result);
#endif //_LIBCPP_STD_VER > 17
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter.h
index 4816f961c4..154f8a5262 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter.h
@@ -11,7 +11,6 @@
#define _LIBCPP___FORMAT_FORMATTER_H
#include <__availability>
-#include <__concepts/same_as.h>
#include <__config>
#include <__format/format_fwd.h>
@@ -39,14 +38,6 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter {
formatter& operator=(const formatter&) = delete;
};
-namespace __formatter {
-
-/** The character types that formatters are specialized for. */
-template <class _CharT>
-concept __char_type = same_as<_CharT, char> || same_as<_CharT, wchar_t>;
-
-} // namespace __formatter
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h
index cdb0631f87..0d005a1bee 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h
@@ -14,8 +14,8 @@
#include <__availability>
#include <__config>
#include <__debug>
+#include <__format/concepts.h>
#include <__format/format_error.h>
-#include <__format/format_fwd.h>
#include <__format/format_parse_context.h>
#include <__format/formatter.h>
#include <__format/formatter_integral.h>
@@ -35,7 +35,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<bool, _CharT> {
public:
_LIBCPP_HIDE_FROM_ABI constexpr auto
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_char.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_char.h
index a3ca36ec0a..8a92e7445b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_char.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_char.h
@@ -13,7 +13,7 @@
#include <__availability>
#include <__concepts/same_as.h>
#include <__config>
-#include <__format/format_fwd.h>
+#include <__format/concepts.h>
#include <__format/format_parse_context.h>
#include <__format/formatter.h>
#include <__format/formatter_integral.h>
@@ -30,7 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT __formatter_char {
public:
_LIBCPP_HIDE_FROM_ABI constexpr auto
@@ -44,6 +44,11 @@ public:
if (__parser_.__type_ == __format_spec::__type::__default || __parser_.__type_ == __format_spec::__type::__char)
return __formatter::__format_char(__value, __ctx.out(), __parser_.__get_parsed_std_specifications(__ctx));
+# if _LIBCPP_STD_VER > 20
+ if (__parser_.__type_ == __format_spec::__type::__debug)
+ return __formatter::__format_escaped_char(__value, __ctx.out(), __parser_.__get_parsed_std_specifications(__ctx));
+# endif
+
if constexpr (sizeof(_CharT) <= sizeof(int))
// Promotes _CharT to an integral type. This reduces the number of
// instantiations of __format_integer reducing code size.
@@ -61,6 +66,10 @@ public:
return format(static_cast<wchar_t>(__value), __ctx);
}
+# if _LIBCPP_STD_VER > 20
+ _LIBCPP_HIDE_FROM_ABI constexpr void set_debug_format() { __parser_.__type_ = __format_spec::__type::__debug; }
+# endif
+
__format_spec::__parser<_CharT> __parser_;
};
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_floating_point.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_floating_point.h
index 90a7619319..29b3711ef9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_floating_point.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_floating_point.h
@@ -10,17 +10,16 @@
#ifndef _LIBCPP___FORMAT_FORMATTER_FLOATING_POINT_H
#define _LIBCPP___FORMAT_FORMATTER_FLOATING_POINT_H
-#include <__algorithm/copy.h>
#include <__algorithm/copy_n.h>
-#include <__algorithm/fill_n.h>
#include <__algorithm/find.h>
+#include <__algorithm/max.h>
#include <__algorithm/min.h>
#include <__algorithm/rotate.h>
#include <__algorithm/transform.h>
#include <__concepts/arithmetic.h>
#include <__concepts/same_as.h>
#include <__config>
-#include <__format/format_fwd.h>
+#include <__format/concepts.h>
#include <__format/format_parse_context.h>
#include <__format/formatter.h>
#include <__format/formatter_integral.h>
@@ -103,7 +102,7 @@ template <class _Tp>
struct __traits;
template <floating_point _Fp>
-static constexpr size_t __float_buffer_size(int __precision) {
+_LIBCPP_HIDE_FROM_ABI constexpr size_t __float_buffer_size(int __precision) {
using _Traits = __traits<_Fp>;
return 4 + _Traits::__max_integral + __precision + _Traits::__max_fractional_value;
}
@@ -183,6 +182,7 @@ public:
_LIBCPP_HIDE_FROM_ABI int __precision() const { return __precision_; }
_LIBCPP_HIDE_FROM_ABI int __num_trailing_zeros() const { return __num_trailing_zeros_; }
_LIBCPP_HIDE_FROM_ABI void __remove_trailing_zeros() { __num_trailing_zeros_ = 0; }
+ _LIBCPP_HIDE_FROM_ABI void __add_trailing_zeros(int __zeros) { __num_trailing_zeros_ += __zeros; }
private:
int __precision_;
@@ -216,7 +216,7 @@ struct __float_result {
/// \returns a pointer to the exponent or __last when not found.
constexpr inline _LIBCPP_HIDE_FROM_ABI char* __find_exponent(char* __first, char* __last) {
ptrdiff_t __size = __last - __first;
- if (__size > 4) {
+ if (__size >= 4) {
__first = __last - _VSTD::min(__size, ptrdiff_t(6));
for (; __first != __last - 3; ++__first) {
if (*__first == 'e')
@@ -404,6 +404,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_general_lower_case(__float_
// In fixed mode the algorithm truncates trailing spaces and possibly the
// radix point. There's no good guess for the position of the radix point
// therefore scan the output after the first digit.
+
__result.__radix_point = _VSTD::find(__first, __result.__last, '.');
}
}
@@ -454,7 +455,10 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer(
char* __first = __formatter::__insert_sign(__buffer.begin(), __negative, __sign);
switch (__type) {
case __format_spec::__type::__default:
- return __formatter::__format_buffer_default(__buffer, __value, __first);
+ if (__has_precision)
+ return __formatter::__format_buffer_general_lower_case(__buffer, __value, __buffer.__precision(), __first);
+ else
+ return __formatter::__format_buffer_default(__buffer, __value, __first);
case __format_spec::__type::__hexfloat_lower_case:
return __formatter::__format_buffer_hexadecimal_lower_case(
@@ -528,13 +532,13 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
// sign and (zero padding or alignment)
if (__zero_padding && __first != __buffer.begin())
*__out_it++ = *__buffer.begin();
- __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
+ __out_it = __formatter::__fill(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
if (!__zero_padding && __first != __buffer.begin())
*__out_it++ = *__buffer.begin();
// integral part
if (__grouping.empty()) {
- __out_it = _VSTD::copy_n(__first, __digits, _VSTD::move(__out_it));
+ __out_it = __formatter::__copy(__first, __digits, _VSTD::move(__out_it));
} else {
auto __r = __grouping.rbegin();
auto __e = __grouping.rend() - 1;
@@ -546,7 +550,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
// This loop achieves that process by testing the termination condition
// midway in the loop.
while (true) {
- __out_it = _VSTD::copy_n(__first, *__r, _VSTD::move(__out_it));
+ __out_it = __formatter::__copy(__first, *__r, _VSTD::move(__out_it));
__first += *__r;
if (__r == __e)
@@ -560,16 +564,16 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
// fractional part
if (__result.__radix_point != __result.__last) {
*__out_it++ = __np.decimal_point();
- __out_it = _VSTD::copy(__result.__radix_point + 1, __result.__exponent, _VSTD::move(__out_it));
- __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __buffer.__num_trailing_zeros(), _CharT('0'));
+ __out_it = __formatter::__copy(__result.__radix_point + 1, __result.__exponent, _VSTD::move(__out_it));
+ __out_it = __formatter::__fill(_VSTD::move(__out_it), __buffer.__num_trailing_zeros(), _CharT('0'));
}
// exponent
if (__result.__exponent != __result.__last)
- __out_it = _VSTD::copy(__result.__exponent, __result.__last, _VSTD::move(__out_it));
+ __out_it = __formatter::__copy(__result.__exponent, __result.__last, _VSTD::move(__out_it));
// alignment
- return _VSTD::fill_n(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
+ return __formatter::__fill(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
}
# endif // _LIBCPP_HAS_NO_LOCALIZATION
@@ -625,20 +629,51 @@ __format_floating_point(_Tp __value, auto& __ctx, __format_spec::__parsed_specif
__float_result __result = __formatter::__format_buffer(
__buffer, __value, __negative, (__specs.__has_precision()), __specs.__std_.__sign_, __specs.__std_.__type_);
- if (__specs.__std_.__alternate_form_ && __result.__radix_point == __result.__last) {
- *__result.__last++ = '.';
-
- // When there is an exponent the point needs to be moved before the
- // exponent. When there's no exponent the rotate does nothing. Since
- // rotate tests whether the operation is a nop, call it unconditionally.
- _VSTD::rotate(__result.__exponent, __result.__last - 1, __result.__last);
- __result.__radix_point = __result.__exponent;
+ if (__specs.__std_.__alternate_form_) {
+ if (__result.__radix_point == __result.__last) {
+ *__result.__last++ = '.';
+
+ // When there is an exponent the point needs to be moved before the
+ // exponent. When there's no exponent the rotate does nothing. Since
+ // rotate tests whether the operation is a nop, call it unconditionally.
+ _VSTD::rotate(__result.__exponent, __result.__last - 1, __result.__last);
+ __result.__radix_point = __result.__exponent;
+
+ // The radix point is always placed before the exponent.
+ // - No exponent needs to point to the new last.
+ // - An exponent needs to move one position to the right.
+ // So it's safe to increment the value unconditionally.
+ ++__result.__exponent;
+ }
- // The radix point is always placed before the exponent.
- // - No exponent needs to point to the new last.
- // - An exponent needs to move one position to the right.
- // So it's safe to increment the value unconditionally.
- ++__result.__exponent;
+ // [format.string.std]/6
+ // In addition, for g and G conversions, trailing zeros are not removed
+ // from the result.
+ //
+ // If the type option for a floating-point type is none it may use the
+ // general formatting, but it's not a g or G conversion. So in that case
+ // the formatting should not append trailing zeros.
+ bool __is_general = __specs.__std_.__type_ == __format_spec::__type::__general_lower_case ||
+ __specs.__std_.__type_ == __format_spec::__type::__general_upper_case;
+
+ if (__is_general) {
+ // https://en.cppreference.com/w/c/io/fprintf
+ // Let P equal the precision if nonzero, 6 if the precision is not
+ // specified, or 1 if the precision is 0. Then, if a conversion with
+ // style E would have an exponent of X:
+ int __p = _VSTD::max(1, (__specs.__has_precision() ? __specs.__precision_ : 6));
+ if (__result.__exponent == __result.__last)
+ // if P > X >= -4, the conversion is with style f or F and precision P - 1 - X.
+ // By including the radix point it calculates P - (1 + X)
+ __p -= __result.__radix_point - __buffer.begin();
+ else
+ // otherwise, the conversion is with style e or E and precision P - 1.
+ --__p;
+
+ ptrdiff_t __precision = (__result.__exponent - __result.__radix_point) - 1;
+ if (__precision < __p)
+ __buffer.__add_trailing_zeros(__p - __precision);
+ }
}
# ifndef _LIBCPP_HAS_NO_LOCALIZATION
@@ -651,14 +686,15 @@ __format_floating_point(_Tp __value, auto& __ctx, __format_spec::__parsed_specif
if (__size + __num_trailing_zeros >= __specs.__width_) {
if (__num_trailing_zeros && __result.__exponent != __result.__last)
// Insert trailing zeros before exponent character.
- return _VSTD::copy(
+ return __formatter::__copy(
__result.__exponent,
__result.__last,
- _VSTD::fill_n(
- _VSTD::copy(__buffer.begin(), __result.__exponent, __ctx.out()), __num_trailing_zeros, _CharT('0')));
+ __formatter::__fill(__formatter::__copy(__buffer.begin(), __result.__exponent, __ctx.out()),
+ __num_trailing_zeros,
+ _CharT('0')));
- return _VSTD::fill_n(
- _VSTD::copy(__buffer.begin(), __result.__last, __ctx.out()), __num_trailing_zeros, _CharT('0'));
+ return __formatter::__fill(
+ __formatter::__copy(__buffer.begin(), __result.__last, __ctx.out()), __num_trailing_zeros, _CharT('0'));
}
auto __out_it = __ctx.out();
@@ -684,7 +720,7 @@ __format_floating_point(_Tp __value, auto& __ctx, __format_spec::__parsed_specif
} // namespace __formatter
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS __formatter_floating_point {
public:
_LIBCPP_HIDE_FROM_ABI constexpr auto
@@ -702,13 +738,13 @@ public:
__format_spec::__parser<_CharT> __parser_;
};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<float, _CharT>
: public __formatter_floating_point<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<double, _CharT>
: public __formatter_floating_point<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<long double, _CharT>
: public __formatter_floating_point<_CharT> {};
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integer.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integer.h
index 3139c9efdf..b4be9f9a07 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integer.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integer.h
@@ -13,7 +13,7 @@
#include <__availability>
#include <__concepts/arithmetic.h>
#include <__config>
-#include <__format/format_fwd.h>
+#include <__format/concepts.h>
#include <__format/format_parse_context.h>
#include <__format/formatter.h>
#include <__format/formatter_integral.h>
@@ -30,7 +30,7 @@
#if _LIBCPP_STD_VER > 17
- template <__formatter::__char_type _CharT>
+ template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT __formatter_integer {
public:
@@ -59,43 +59,43 @@ public:
};
// Signed integral types.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<signed char, _CharT>
: public __formatter_integer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<short, _CharT> : public __formatter_integer<_CharT> {
};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<int, _CharT> : public __formatter_integer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<long, _CharT> : public __formatter_integer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<long long, _CharT>
: public __formatter_integer<_CharT> {};
# ifndef _LIBCPP_HAS_NO_INT128
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<__int128_t, _CharT>
: public __formatter_integer<_CharT> {};
# endif
// Unsigned integral types.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned char, _CharT>
: public __formatter_integer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned short, _CharT>
: public __formatter_integer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned, _CharT>
: public __formatter_integer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned long, _CharT>
: public __formatter_integer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned long long, _CharT>
: public __formatter_integer<_CharT> {};
# ifndef _LIBCPP_HAS_NO_INT128
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<__uint128_t, _CharT>
: public __formatter_integer<_CharT> {};
# endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integral.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integral.h
index b9ed5fe80f..87c6d559b0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integral.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integral.h
@@ -13,11 +13,12 @@
#include <__concepts/arithmetic.h>
#include <__concepts/same_as.h>
#include <__config>
+#include <__format/concepts.h>
#include <__format/format_error.h>
-#include <__format/formatter.h> // for __char_type TODO FMT Move the concept?
#include <__format/formatter_output.h>
#include <__format/parser_std_format_spec.h>
#include <__utility/unreachable.h>
+#include <array>
#include <charconv>
#include <limits>
#include <string>
@@ -112,7 +113,7 @@ _LIBCPP_HIDE_FROM_ABI inline string __determine_grouping(ptrdiff_t __size, const
// Char
//
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
_LIBCPP_HIDE_FROM_ABI auto __format_char(
integral auto __value,
output_iterator<const _CharT&> auto __out_it,
@@ -243,7 +244,7 @@ _LIBCPP_HIDE_FROM_ABI auto __format_integer(
// The zero padding is done like:
// - Write [sign][prefix]
// - Write data right aligned with '0' as fill character.
- __out_it = _VSTD::copy(__begin, __first, _VSTD::move(__out_it));
+ __out_it = __formatter::__copy(__begin, __first, _VSTD::move(__out_it));
__specs.__alignment_ = __format_spec::__alignment::__right;
__specs.__fill_ = _CharT('0');
int32_t __size = __first - __begin;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_output.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_output.h
index e09534c41d..4f2c0445c0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_output.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_output.h
@@ -10,16 +10,23 @@
#ifndef _LIBCPP___FORMAT_FORMATTER_OUTPUT_H
#define _LIBCPP___FORMAT_FORMATTER_OUTPUT_H
-#include <__algorithm/copy.h>
-#include <__algorithm/copy_n.h>
-#include <__algorithm/fill_n.h>
-#include <__algorithm/transform.h>
+#include <__algorithm/ranges_copy.h>
+#include <__algorithm/ranges_fill_n.h>
+#include <__algorithm/ranges_transform.h>
+#include <__chrono/statically_widen.h>
+#include <__concepts/same_as.h>
#include <__config>
+#include <__format/buffer.h>
+#include <__format/concepts.h>
+#include <__format/escaped_output_table.h>
#include <__format/formatter.h>
#include <__format/parser_std_format_spec.h>
#include <__format/unicode.h>
+#include <__iterator/back_insert_iterator.h>
+#include <__type_traits/make_unsigned.h>
#include <__utility/move.h>
#include <__utility/unreachable.h>
+#include <charconv>
#include <cstddef>
#include <string>
#include <string_view>
@@ -86,6 +93,63 @@ __padding_size(size_t __size, size_t __width, __format_spec::__alignment __align
__libcpp_unreachable();
}
+/// Copy wrapper.
+///
+/// This uses a "mass output function" of __format::__output_buffer when possible.
+template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT>
+_LIBCPP_HIDE_FROM_ABI auto __copy(basic_string_view<_CharT> __str, output_iterator<const _OutCharT&> auto __out_it)
+ -> decltype(__out_it) {
+ if constexpr (_VSTD::same_as<decltype(__out_it), _VSTD::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
+ __out_it.__get_container()->__copy(__str);
+ return __out_it;
+ } else {
+ return std::ranges::copy(__str, _VSTD::move(__out_it)).out;
+ }
+}
+
+template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT>
+_LIBCPP_HIDE_FROM_ABI auto
+__copy(const _CharT* __first, const _CharT* __last, output_iterator<const _OutCharT&> auto __out_it)
+ -> decltype(__out_it) {
+ return __formatter::__copy(basic_string_view{__first, __last}, _VSTD::move(__out_it));
+}
+
+template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT>
+_LIBCPP_HIDE_FROM_ABI auto __copy(const _CharT* __first, size_t __n, output_iterator<const _OutCharT&> auto __out_it)
+ -> decltype(__out_it) {
+ return __formatter::__copy(basic_string_view{__first, __n}, _VSTD::move(__out_it));
+}
+
+/// Transform wrapper.
+///
+/// This uses a "mass output function" of __format::__output_buffer when possible.
+template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT, class _UnaryOperation>
+_LIBCPP_HIDE_FROM_ABI auto
+__transform(const _CharT* __first,
+ const _CharT* __last,
+ output_iterator<const _OutCharT&> auto __out_it,
+ _UnaryOperation __operation) -> decltype(__out_it) {
+ if constexpr (_VSTD::same_as<decltype(__out_it), _VSTD::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
+ __out_it.__get_container()->__transform(__first, __last, _VSTD::move(__operation));
+ return __out_it;
+ } else {
+ return std::ranges::transform(__first, __last, _VSTD::move(__out_it), __operation).out;
+ }
+}
+
+/// Fill wrapper.
+///
+/// This uses a "mass output function" of __format::__output_buffer when possible.
+template <__fmt_char_type _CharT, output_iterator<const _CharT&> _OutIt>
+_LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, _CharT __value) {
+ if constexpr (_VSTD::same_as<decltype(__out_it), _VSTD::back_insert_iterator<__format::__output_buffer<_CharT>>>) {
+ __out_it.__get_container()->__fill(__n, __value);
+ return __out_it;
+ } else {
+ return std::ranges::fill_n(_VSTD::move(__out_it), __n, __value);
+ }
+}
+
template <class _OutIt, class _CharT>
_LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, const char* __begin, const char* __first,
const char* __last, string&& __grouping, _CharT __sep,
@@ -97,22 +161,22 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, c
__padding_size_result __padding = {0, 0};
if (__specs.__alignment_ == __format_spec::__alignment::__zero_padding) {
// Write [sign][prefix].
- __out_it = _VSTD::copy(__begin, __first, _VSTD::move(__out_it));
+ __out_it = __formatter::__copy(__begin, __first, _VSTD::move(__out_it));
if (__specs.__width_ > __size) {
// Write zero padding.
__padding.__before_ = __specs.__width_ - __size;
- __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __specs.__width_ - __size, _CharT('0'));
+ __out_it = __formatter::__fill(_VSTD::move(__out_it), __specs.__width_ - __size, _CharT('0'));
}
} else {
if (__specs.__width_ > __size) {
// Determine padding and write padding.
__padding = __padding_size(__size, __specs.__width_, __specs.__alignment_);
- __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
+ __out_it = __formatter::__fill(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
}
// Write [sign][prefix].
- __out_it = _VSTD::copy(__begin, __first, _VSTD::move(__out_it));
+ __out_it = __formatter::__copy(__begin, __first, _VSTD::move(__out_it));
}
auto __r = __grouping.rbegin();
@@ -133,10 +197,10 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, c
while (true) {
if (__specs.__std_.__type_ == __format_spec::__type::__hexadecimal_upper_case) {
__last = __first + *__r;
- __out_it = _VSTD::transform(__first, __last, _VSTD::move(__out_it), __hex_to_upper);
+ __out_it = __formatter::__transform(__first, __last, _VSTD::move(__out_it), __hex_to_upper);
__first = __last;
} else {
- __out_it = _VSTD::copy_n(__first, *__r, _VSTD::move(__out_it));
+ __out_it = __formatter::__copy(__first, *__r, _VSTD::move(__out_it));
__first += *__r;
}
@@ -147,7 +211,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, c
*__out_it++ = __sep;
}
- return _VSTD::fill_n(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
+ return __formatter::__fill(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
}
/// Writes the input to the output with the required padding.
@@ -155,12 +219,10 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, c
/// Since the output column width is specified the function can be used for
/// ASCII and Unicode output.
///
-/// \pre [\a __first, \a __last) is a valid range.
/// \pre \a __size <= \a __width. Using this function when this pre-condition
/// doesn't hold incurs an unwanted overhead.
///
-/// \param __first Pointer to the first element to write.
-/// \param __last Pointer beyond the last element to write.
+/// \param __str The string to write.
/// \param __out_it The output iterator to write to.
/// \param __specs The parsed formatting specifications.
/// \param __size The (estimated) output column width. When the elements
@@ -174,31 +236,42 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, c
/// conversion, which means the [\a __first, \a __last) always contains elements
/// of the type \c char.
template <class _CharT, class _ParserCharT>
-_LIBCPP_HIDE_FROM_ABI auto __write(
- const _CharT* __first,
- const _CharT* __last,
- output_iterator<const _CharT&> auto __out_it,
- __format_spec::__parsed_specifications<_ParserCharT> __specs,
- ptrdiff_t __size) -> decltype(__out_it) {
- _LIBCPP_ASSERT(__first <= __last, "Not a valid range");
-
+_LIBCPP_HIDE_FROM_ABI auto
+__write(basic_string_view<_CharT> __str,
+ output_iterator<const _CharT&> auto __out_it,
+ __format_spec::__parsed_specifications<_ParserCharT> __specs,
+ ptrdiff_t __size) -> decltype(__out_it) {
if (__size >= __specs.__width_)
- return _VSTD::copy(__first, __last, _VSTD::move(__out_it));
+ return __formatter::__copy(__str, _VSTD::move(__out_it));
__padding_size_result __padding = __formatter::__padding_size(__size, __specs.__width_, __specs.__std_.__alignment_);
- __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
- __out_it = _VSTD::copy(__first, __last, _VSTD::move(__out_it));
- return _VSTD::fill_n(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
+ __out_it = __formatter::__fill(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
+ __out_it = __formatter::__copy(__str, _VSTD::move(__out_it));
+ return __formatter::__fill(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
+}
+
+template <class _CharT, class _ParserCharT>
+_LIBCPP_HIDE_FROM_ABI auto
+__write(const _CharT* __first,
+ const _CharT* __last,
+ output_iterator<const _CharT&> auto __out_it,
+ __format_spec::__parsed_specifications<_ParserCharT> __specs,
+ ptrdiff_t __size) -> decltype(__out_it) {
+ _LIBCPP_ASSERT(__first <= __last, "Not a valid range");
+ return __formatter::__write(basic_string_view{__first, __last}, _VSTD::move(__out_it), __specs, __size);
}
/// \overload
///
/// Calls the function above where \a __size = \a __last - \a __first.
template <class _CharT, class _ParserCharT>
-_LIBCPP_HIDE_FROM_ABI auto __write(const _CharT* __first, const _CharT* __last,
- output_iterator<const _CharT&> auto __out_it,
- __format_spec::__parsed_specifications<_ParserCharT> __specs) -> decltype(__out_it) {
- return __write(__first, __last, _VSTD::move(__out_it), __specs, __last - __first);
+_LIBCPP_HIDE_FROM_ABI auto
+__write(const _CharT* __first,
+ const _CharT* __last,
+ output_iterator<const _CharT&> auto __out_it,
+ __format_spec::__parsed_specifications<_ParserCharT> __specs) -> decltype(__out_it) {
+ _LIBCPP_ASSERT(__first <= __last, "Not a valid range");
+ return __formatter::__write(__first, __last, _VSTD::move(__out_it), __specs, __last - __first);
}
template <class _CharT, class _ParserCharT, class _UnaryOperation>
@@ -210,12 +283,12 @@ _LIBCPP_HIDE_FROM_ABI auto __write_transformed(const _CharT* __first, const _Cha
ptrdiff_t __size = __last - __first;
if (__size >= __specs.__width_)
- return _VSTD::transform(__first, __last, _VSTD::move(__out_it), __op);
+ return __formatter::__transform(__first, __last, _VSTD::move(__out_it), __op);
__padding_size_result __padding = __padding_size(__size, __specs.__width_, __specs.__alignment_);
- __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
- __out_it = _VSTD::transform(__first, __last, _VSTD::move(__out_it), __op);
- return _VSTD::fill_n(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
+ __out_it = __formatter::__fill(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
+ __out_it = __formatter::__transform(__first, __last, _VSTD::move(__out_it), __op);
+ return __formatter::__fill(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
}
/// Writes additional zero's for the precision before the exponent.
@@ -240,11 +313,11 @@ _LIBCPP_HIDE_FROM_ABI auto __write_using_trailing_zeros(
__padding_size_result __padding =
__padding_size(__size + __num_trailing_zeros, __specs.__width_, __specs.__alignment_);
- __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
- __out_it = _VSTD::copy(__first, __exponent, _VSTD::move(__out_it));
- __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __num_trailing_zeros, _CharT('0'));
- __out_it = _VSTD::copy(__exponent, __last, _VSTD::move(__out_it));
- return _VSTD::fill_n(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
+ __out_it = __formatter::__fill(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
+ __out_it = __formatter::__copy(__first, __exponent, _VSTD::move(__out_it));
+ __out_it = __formatter::__fill(_VSTD::move(__out_it), __num_trailing_zeros, _CharT('0'));
+ __out_it = __formatter::__copy(__exponent, __last, _VSTD::move(__out_it));
+ return __formatter::__fill(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
}
/// Writes a string using format's width estimation algorithm.
@@ -262,7 +335,7 @@ _LIBCPP_HIDE_FROM_ABI auto __write_string_no_precision(
// No padding -> copy the string
if (!__specs.__has_width())
- return _VSTD::copy(__str.begin(), __str.end(), _VSTD::move(__out_it));
+ return __formatter::__copy(__str, _VSTD::move(__out_it));
// Note when the estimated width is larger than size there's no padding. So
// there's no reason to get the real size when the estimate is larger than or
@@ -270,8 +343,7 @@ _LIBCPP_HIDE_FROM_ABI auto __write_string_no_precision(
size_t __size =
__format_spec::__estimate_column_width(__str, __specs.__width_, __format_spec::__column_width_rounding::__up)
.__width_;
-
- return __formatter::__write(__str.begin(), __str.end(), _VSTD::move(__out_it), __specs, __size);
+ return __formatter::__write(__str, _VSTD::move(__out_it), __specs, __size);
}
template <class _CharT>
@@ -299,6 +371,185 @@ _LIBCPP_HIDE_FROM_ABI auto __write_string(
return __write(__str.begin(), __str.end(), _VSTD::move(__out_it), __specs, __size);
}
+# if _LIBCPP_STD_VER > 20
+
+struct __null_sentinel {};
+
+template <class _CharT>
+_LIBCPP_HIDE_FROM_ABI bool operator==(const _CharT* __cstr, __null_sentinel) {
+ return *__cstr == _CharT('\0');
+}
+
+template <class _CharT>
+_LIBCPP_HIDE_FROM_ABI void
+__write_escaped_code_unit(basic_string<_CharT>& __str, char32_t __value, const _CharT* __prefix) {
+ back_insert_iterator __out_it{__str};
+ std::ranges::copy(__prefix, __null_sentinel{}, __out_it);
+
+ char __buffer[8];
+ to_chars_result __r = std::to_chars(std::begin(__buffer), std::end(__buffer), __value, 16);
+ _LIBCPP_ASSERT(__r.ec == errc(0), "Internal buffer too small");
+ std::ranges::copy(std::begin(__buffer), __r.ptr, __out_it);
+
+ __str += _CharT('}');
+}
+
+// [format.string.escaped]/2.2.1.2
+// ...
+// then the sequence \u{hex-digit-sequence} is appended to E, where
+// hex-digit-sequence is the shortest hexadecimal representation of C using
+// lower-case hexadecimal digits.
+template <class _CharT>
+_LIBCPP_HIDE_FROM_ABI void __write_well_formed_escaped_code_unit(basic_string<_CharT>& __str, char32_t __value) {
+ __write_escaped_code_unit(__str, __value, _LIBCPP_STATICALLY_WIDEN(_CharT, "\\u{"));
+}
+
+// [format.string.escaped]/2.2.3
+// Otherwise (X is a sequence of ill-formed code units), each code unit U is
+// appended to E in order as the sequence \x{hex-digit-sequence}, where
+// hex-digit-sequence is the shortest hexadecimal representation of U using
+// lower-case hexadecimal digits.
+template <class _CharT>
+_LIBCPP_HIDE_FROM_ABI void __write_escape_ill_formed_code_unit(basic_string<_CharT>& __str, char32_t __value) {
+ __write_escaped_code_unit(__str, __value, _LIBCPP_STATICALLY_WIDEN(_CharT, "\\x{"));
+}
+
+template <class _CharT>
+[[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool __is_escaped_sequence_written(basic_string<_CharT>& __str, char32_t __value) {
+# ifdef _LIBCPP_HAS_NO_UNICODE
+ // For ASCII assume everything above 127 is printable.
+ if (__value > 127)
+ return false;
+# endif
+
+ if (!__escaped_output_table::__needs_escape(__value))
+ return false;
+
+ __formatter::__write_well_formed_escaped_code_unit(__str, __value);
+ return true;
+}
+
+template <class _CharT>
+[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr char32_t __to_char32(_CharT __value) {
+ return static_cast<make_unsigned_t<_CharT>>(__value);
+}
+
+enum class _LIBCPP_ENUM_VIS __escape_quotation_mark { __apostrophe, __double_quote };
+
+// [format.string.escaped]/2
+template <class _CharT>
+[[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool
+__is_escaped_sequence_written(basic_string<_CharT>& __str, char32_t __value, __escape_quotation_mark __mark) {
+ // 2.2.1.1 - Mapped character in [tab:format.escape.sequences]
+ switch (__value) {
+ case _CharT('\t'):
+ __str += _LIBCPP_STATICALLY_WIDEN(_CharT, "\\t");
+ return true;
+ case _CharT('\n'):
+ __str += _LIBCPP_STATICALLY_WIDEN(_CharT, "\\n");
+ return true;
+ case _CharT('\r'):
+ __str += _LIBCPP_STATICALLY_WIDEN(_CharT, "\\r");
+ return true;
+ case _CharT('\''):
+ if (__mark == __escape_quotation_mark::__apostrophe)
+ __str += _LIBCPP_STATICALLY_WIDEN(_CharT, R"(\')");
+ else
+ __str += __value;
+ return true;
+ case _CharT('"'):
+ if (__mark == __escape_quotation_mark::__double_quote)
+ __str += _LIBCPP_STATICALLY_WIDEN(_CharT, R"(\")");
+ else
+ __str += __value;
+ return true;
+ case _CharT('\\'):
+ __str += _LIBCPP_STATICALLY_WIDEN(_CharT, R"(\\)");
+ return true;
+
+ // 2.2.1.2 - Space
+ case _CharT(' '):
+ __str += __value;
+ return true;
+ }
+
+ // 2.2.2
+ // Otherwise, if X is a shift sequence, the effect on E and further
+ // decoding of S is unspecified.
+ // For now shift sequences are ignored and treated as Unicode. Other parts
+ // of the format library do the same. It's unknown how ostream treats them.
+ // TODO FMT determine what to do with shift sequences.
+
+ // 2.2.1.2.1 and 2.2.1.2.2 - Escape
+ return __formatter::__is_escaped_sequence_written(__str, __formatter::__to_char32(__value));
+}
+
+template <class _CharT>
+_LIBCPP_HIDE_FROM_ABI void
+__escape(basic_string<_CharT>& __str, basic_string_view<_CharT> __values, __escape_quotation_mark __mark) {
+ __unicode::__code_point_view<_CharT> __view{__values.begin(), __values.end()};
+
+ while (!__view.__at_end()) {
+ const _CharT* __first = __view.__position();
+ typename __unicode::__consume_p2286_result __result = __view.__consume_p2286();
+ if (__result.__ill_formed_size == 0) {
+ if (!__formatter::__is_escaped_sequence_written(__str, __result.__value, __mark))
+ // 2.2.1.3 - Add the character
+ ranges::copy(__first, __view.__position(), std::back_insert_iterator(__str));
+
+ } else {
+ // 2.2.3 sequence of ill-formed code units
+ // The number of code-units in __result.__value depends on the character type being used.
+ if constexpr (sizeof(_CharT) == 1) {
+ _LIBCPP_ASSERT(__result.__ill_formed_size == 1 || __result.__ill_formed_size == 4,
+ "illegal number of invalid code units.");
+ if (__result.__ill_formed_size == 1) // ill-formed, one code unit
+ __formatter::__write_escape_ill_formed_code_unit(__str, __result.__value & 0xff);
+ else { // out of valid range, four code units
+ // The code point was properly encoded, decode the value.
+ __formatter::__write_escape_ill_formed_code_unit(__str, __result.__value >> 18 | 0xf0);
+ __formatter::__write_escape_ill_formed_code_unit(__str, (__result.__value >> 12 & 0x3f) | 0x80);
+ __formatter::__write_escape_ill_formed_code_unit(__str, (__result.__value >> 6 & 0x3f) | 0x80);
+ __formatter::__write_escape_ill_formed_code_unit(__str, (__result.__value & 0x3f) | 0x80);
+ }
+ } else if constexpr (sizeof(_CharT) == 2) {
+ _LIBCPP_ASSERT(__result.__ill_formed_size == 1, "for UTF-16 at most one invalid code unit");
+ __formatter::__write_escape_ill_formed_code_unit(__str, __result.__value & 0xffff);
+ } else {
+ static_assert(sizeof(_CharT) == 4, "unsupported character width");
+ _LIBCPP_ASSERT(__result.__ill_formed_size == 1, "for UTF-32 one code unit is one code point");
+ __formatter::__write_escape_ill_formed_code_unit(__str, __result.__value);
+ }
+ }
+ }
+}
+
+template <class _CharT>
+_LIBCPP_HIDE_FROM_ABI auto
+__format_escaped_char(_CharT __value,
+ output_iterator<const _CharT&> auto __out_it,
+ __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
+ basic_string<_CharT> __str;
+ __str += _CharT('\'');
+ __formatter::__escape(__str, basic_string_view{std::addressof(__value), 1}, __escape_quotation_mark::__apostrophe);
+ __str += _CharT('\'');
+ return __formatter::__write(__str.data(), __str.data() + __str.size(), _VSTD::move(__out_it), __specs, __str.size());
+}
+
+template <class _CharT>
+_LIBCPP_HIDE_FROM_ABI auto
+__format_escaped_string(basic_string_view<_CharT> __values,
+ output_iterator<const _CharT&> auto __out_it,
+ __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
+ basic_string<_CharT> __str;
+ __str += _CharT('"');
+ __formatter::__escape(__str, __values, __escape_quotation_mark::__double_quote);
+ __str += _CharT('"');
+ return __formatter::__write_string(basic_string_view{__str}, _VSTD::move(__out_it), __specs);
+}
+
+# endif // _LIBCPP_STD_VER > 20
+
} // namespace __formatter
#endif //_LIBCPP_STD_VER > 17
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h
index 3cd4c9bba9..31b49e17ab 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h
@@ -12,7 +12,7 @@
#include <__availability>
#include <__config>
-#include <__format/format_fwd.h>
+#include <__format/concepts.h>
#include <__format/format_parse_context.h>
#include <__format/formatter.h>
#include <__format/formatter_integral.h>
@@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS __formatter_pointer {
public:
constexpr __formatter_pointer() { __parser_.__alignment_ = __format_spec::__alignment::__right; }
@@ -56,13 +56,13 @@ public:
// - struct formatter<nullptr_t, charT>;
// - template<> struct formatter<void*, charT>;
// - template<> struct formatter<const void*, charT>;
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<nullptr_t, _CharT>
: public __formatter_pointer<_CharT> {};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<void*, _CharT> : public __formatter_pointer<_CharT> {
};
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const void*, _CharT>
: public __formatter_pointer<_CharT> {};
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h
index 71bda4fcde..d1d1379146 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h
@@ -12,7 +12,7 @@
#include <__availability>
#include <__config>
-#include <__format/format_fwd.h>
+#include <__format/concepts.h>
#include <__format/format_parse_context.h>
#include <__format/formatter.h>
#include <__format/formatter_output.h>
@@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS __formatter_string {
public:
_LIBCPP_HIDE_FROM_ABI constexpr auto parse(basic_format_parse_context<_CharT>& __parse_ctx)
@@ -40,14 +40,23 @@ public:
}
_LIBCPP_HIDE_FROM_ABI auto format(basic_string_view<_CharT> __str, auto& __ctx) const -> decltype(__ctx.out()) {
+# if _LIBCPP_STD_VER > 20
+ if (__parser_.__type_ == __format_spec::__type::__debug)
+ return __formatter::__format_escaped_string(__str, __ctx.out(), __parser_.__get_parsed_std_specifications(__ctx));
+# endif
+
return __formatter::__write_string(__str, __ctx.out(), __parser_.__get_parsed_std_specifications(__ctx));
}
- __format_spec::__parser<_CharT> __parser_;
+# if _LIBCPP_STD_VER > 20
+ _LIBCPP_HIDE_FROM_ABI constexpr void set_debug_format() { __parser_.__type_ = __format_spec::__type::__debug; }
+# endif
+
+ __format_spec::__parser<_CharT> __parser_{.__alignment_ = __format_spec::__alignment::__left};
};
// Formatter const char*.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const _CharT*, _CharT>
: public __formatter_string<_CharT> {
using _Base = __formatter_string<_CharT>;
@@ -80,7 +89,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const _CharT*,
};
// Formatter char*.
-template <__formatter::__char_type _CharT>
+template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<_CharT*, _CharT>
: public formatter<const _CharT*, _CharT> {
using _Base = formatter<const _CharT*, _CharT>;
@@ -91,7 +100,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<_CharT*, _Char
};
// Formatter char[].
-template <__formatter::__char_type _CharT, size_t _Size>
+template <__fmt_char_type _CharT, size_t _Size>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<_CharT[_Size], _CharT>
: public __formatter_string<_CharT> {
using _Base = __formatter_string<_CharT>;
@@ -102,7 +111,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<_CharT[_Size],
};
// Formatter const char[].
-template <__formatter::__char_type _CharT, size_t _Size>
+template <__fmt_char_type _CharT, size_t _Size>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const _CharT[_Size], _CharT>
: public __formatter_string<_CharT> {
using _Base = __formatter_string<_CharT>;
@@ -113,7 +122,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const _CharT[_
};
// Formatter std::string.
-template <__formatter::__char_type _CharT, class _Traits, class _Allocator>
+template <__fmt_char_type _CharT, class _Traits, class _Allocator>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<basic_string<_CharT, _Traits, _Allocator>, _CharT>
: public __formatter_string<_CharT> {
using _Base = __formatter_string<_CharT>;
@@ -126,7 +135,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<basic_string<_
};
// Formatter std::string_view.
-template <__formatter::__char_type _CharT, class _Traits>
+template <__fmt_char_type _CharT, class _Traits>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<basic_string_view<_CharT, _Traits>, _CharT>
: public __formatter_string<_CharT> {
using _Base = __formatter_string<_CharT>;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h b/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h
index 1425a953eb..90c0cd184c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h
@@ -19,6 +19,7 @@
#include <__algorithm/find_if.h>
#include <__algorithm/min.h>
#include <__assert>
+#include <__concepts/same_as.h>
#include <__config>
#include <__debug>
#include <__format/format_arg.h>
@@ -28,7 +29,6 @@
#include <__format/unicode.h>
#include <__variant/monostate.h>
#include <bit>
-#include <concepts>
#include <cstdint>
#include <string_view>
#include <type_traits>
@@ -54,8 +54,7 @@ __parse_arg_id(const _CharT* __begin, const _CharT* __end, auto& __parse_ctx) {
if (__begin == __end)
__throw_format_error("End of input while parsing format-spec arg-id");
- __format::__parse_number_result __r =
- __format::__parse_arg_id(__begin, __end, __parse_ctx);
+ __format::__parse_number_result __r = __format::__parse_arg_id(__begin, __end, __parse_ctx);
if (__r.__ptr == __end || *__r.__ptr != _CharT('}'))
__throw_format_error("Invalid arg-id");
@@ -67,7 +66,15 @@ __parse_arg_id(const _CharT* __begin, const _CharT* __end, auto& __parse_ctx) {
template <class _Context>
_LIBCPP_HIDE_FROM_ABI constexpr uint32_t
__substitute_arg_id(basic_format_arg<_Context> __format_arg) {
- return visit_format_arg(
+ // [format.string.std]/8
+ // If the corresponding formatting argument is not of integral type...
+ // This wording allows char and bool too. LWG-3720 changes the wording to
+ // If the corresponding formatting argument is not of standard signed or
+ // unsigned integer type,
+ // This means the 128-bit will not be valid anymore.
+ // TODO FMT Verify this resolution is accepted and add a test to verify
+ // 128-bit integrals fail and switch to visit_format_arg.
+ return _VSTD::__visit_format_arg(
[](auto __arg) -> uint32_t {
using _Type = decltype(__arg);
if constexpr (integral<_Type>) {
@@ -163,7 +170,8 @@ enum class _LIBCPP_ENUM_VIS __type : uint8_t {
__fixed_lower_case,
__fixed_upper_case,
__general_lower_case,
- __general_upper_case
+ __general_upper_case,
+ __debug
};
struct __std {
@@ -176,6 +184,7 @@ struct __std {
struct __chrono {
__alignment __alignment_ : 3;
+ bool __locale_specific_form_ : 1;
bool __weekday_name_ : 1;
bool __month_name_ : 1;
};
@@ -288,12 +297,22 @@ public:
_LIBCPP_HIDE_FROM_ABI
__parsed_specifications<_CharT> __get_parsed_std_specifications(auto& __ctx) const {
return __parsed_specifications<_CharT>{
- .__std_ =
- __std{.__alignment_ = __alignment_,
- .__sign_ = __sign_,
- .__alternate_form_ = __alternate_form_,
- .__locale_specific_form_ = __locale_specific_form_,
- .__type_ = __type_},
+ .__std_ = __std{.__alignment_ = __alignment_,
+ .__sign_ = __sign_,
+ .__alternate_form_ = __alternate_form_,
+ .__locale_specific_form_ = __locale_specific_form_,
+ .__type_ = __type_},
+ .__width_{__get_width(__ctx)},
+ .__precision_{__get_precision(__ctx)},
+ .__fill_{__fill_}};
+ }
+
+ _LIBCPP_HIDE_FROM_ABI __parsed_specifications<_CharT> __get_parsed_chrono_specifications(auto& __ctx) const {
+ return __parsed_specifications<_CharT>{
+ .__chrono_ = __chrono{.__alignment_ = __alignment_,
+ .__locale_specific_form_ = __locale_specific_form_,
+ .__weekday_name_ = __weekday_name_,
+ .__month_name_ = __month_name_},
.__width_{__get_width(__ctx)},
.__precision_{__get_precision(__ctx)},
.__fill_{__fill_}};
@@ -523,6 +542,11 @@ private:
case 'x':
__type_ = __type::__hexadecimal_lower_case;
break;
+# if _LIBCPP_STD_VER > 20
+ case '?':
+ __type_ = __type::__debug;
+ break;
+# endif
default:
return;
}
@@ -534,10 +558,7 @@ private:
if (!__width_as_arg_)
return __width_;
- int32_t __result = __format_spec::__substitute_arg_id(__ctx.arg(__width_));
- if (__result == 0)
- __throw_format_error("A format-spec width field replacement should have a positive value");
- return __result;
+ return __format_spec::__substitute_arg_id(__ctx.arg(__width_));
}
_LIBCPP_HIDE_FROM_ABI
@@ -559,6 +580,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_string(__format_spec
switch (__type) {
case __format_spec::__type::__default:
case __format_spec::__type::__string:
+ case __format_spec::__type::__debug:
break;
default:
@@ -612,6 +634,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_char(__parser<_CharT>& __p
switch (__parser.__type_) {
case __format_spec::__type::__default:
case __format_spec::__type::__char:
+ case __format_spec::__type::__debug:
__format_spec::__process_display_type_char(__parser);
break;
@@ -653,11 +676,6 @@ template <class _CharT>
_LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_floating_point(__parser<_CharT>& __parser) {
switch (__parser.__type_) {
case __format_spec::__type::__default:
- // When no precision specified then it keeps default since that
- // formatting differs from the other types.
- if (__parser.__precision_as_arg_ || __parser.__precision_ != -1)
- __parser.__type_ = __format_spec::__type::__general_lower_case;
- break;
case __format_spec::__type::__hexfloat_lower_case:
case __format_spec::__type::__hexfloat_upper_case:
// Precision specific behavior will be handled later.
@@ -699,6 +717,9 @@ struct __column_width_result {
const _CharT* __last_;
};
+template <class _CharT>
+__column_width_result(size_t, const _CharT*) -> __column_width_result<_CharT>;
+
/// Since a column width can be two it's possible that the requested column
/// width can't be achieved. Depending on the intended usage the policy can be
/// selected.
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/unicode.h b/contrib/libs/cxxsupp/libcxx/include/__format/unicode.h
index 3316217f4a..fdcaff8407 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/unicode.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/unicode.h
@@ -24,6 +24,26 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
+namespace __unicode {
+
+# if _LIBCPP_STD_VER > 20
+
+/// The result of consuming a code point using P2286' semantics
+///
+/// TODO FMT Combine __consume and __consume_p2286 in one function.
+struct __consume_p2286_result {
+ // A size of 0 means well formed. This to differenciate between
+ // a valid code point and a code unit that's invalid like 0b11111xxx.
+ int __ill_formed_size;
+
+ // If well formed the consumed code point.
+ // Otherwise the ill-formed code units as unsigned 8-bit values. They are
+ // stored in reverse order, to make it easier to extract the values.
+ char32_t __value;
+};
+
+# endif // _LIBCPP_STD_VER > 20
+
# ifndef _LIBCPP_HAS_NO_UNICODE
/// Implements the grapheme cluster boundary rules
@@ -39,8 +59,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
/// https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt
/// https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.txt (for testing only)
-namespace __unicode {
-
inline constexpr char32_t __replacement_character = U'\ufffd';
_LIBCPP_HIDE_FROM_ABI constexpr bool __is_continuation(const char* __char, int __count) {
@@ -123,18 +141,92 @@ public:
return __replacement_character;
}
+# if _LIBCPP_STD_VER > 20
+ _LIBCPP_HIDE_FROM_ABI constexpr __consume_p2286_result __consume_p2286() noexcept {
+ _LIBCPP_ASSERT(__first_ != __last_, "can't move beyond the end of input");
+
+ // Based on the number of leading 1 bits the number of code units in the
+ // code point can be determined. See
+ // https://en.wikipedia.org/wiki/UTF-8#Encoding
+ switch (std::countl_one(static_cast<unsigned char>(*__first_))) {
+ case 0:
+ return {0, static_cast<unsigned char>(*__first_++)};
+
+ case 2:
+ if (__last_ - __first_ < 2) [[unlikely]]
+ break;
+
+ if (__unicode::__is_continuation(__first_ + 1, 1)) {
+ char32_t __value = static_cast<unsigned char>(*__first_++) & 0x1f;
+ __value <<= 6;
+ __value |= static_cast<unsigned char>(*__first_++) & 0x3f;
+ return {0, __value};
+ }
+ break;
+
+ case 3:
+ if (__last_ - __first_ < 3) [[unlikely]]
+ break;
+
+ if (__unicode::__is_continuation(__first_ + 1, 2)) {
+ char32_t __value = static_cast<unsigned char>(*__first_++) & 0x0f;
+ __value <<= 6;
+ __value |= static_cast<unsigned char>(*__first_++) & 0x3f;
+ __value <<= 6;
+ __value |= static_cast<unsigned char>(*__first_++) & 0x3f;
+ return {0, __value};
+ }
+ break;
+
+ case 4:
+ if (__last_ - __first_ < 4) [[unlikely]]
+ break;
+
+ if (__unicode::__is_continuation(__first_ + 1, 3)) {
+ char32_t __value = static_cast<unsigned char>(*__first_++) & 0x07;
+ __value <<= 6;
+ __value |= static_cast<unsigned char>(*__first_++) & 0x3f;
+ __value <<= 6;
+ __value |= static_cast<unsigned char>(*__first_++) & 0x3f;
+ __value <<= 6;
+ __value |= static_cast<unsigned char>(*__first_++) & 0x3f;
+
+ if (__value > 0x10FFFF) // Outside the valid Unicode range?
+ return {4, __value};
+
+ return {0, __value};
+ }
+ break;
+ }
+ // An invalid number of leading ones can be garbage or a code unit in the
+ // middle of a code point. By consuming one code unit the parser may get
+ // "in sync" after a few code units.
+ return {1, static_cast<unsigned char>(*__first_++)};
+ }
+# endif // _LIBCPP_STD_VER > 20
+
private:
const char* __first_;
const char* __last_;
};
-# ifndef TEST_HAS_NO_WIDE_CHARACTERS
+# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+_LIBCPP_HIDE_FROM_ABI constexpr bool __is_surrogate_pair_high(wchar_t __value) {
+ return __value >= 0xd800 && __value <= 0xdbff;
+}
+
+_LIBCPP_HIDE_FROM_ABI constexpr bool __is_surrogate_pair_low(wchar_t __value) {
+ return __value >= 0xdc00 && __value <= 0xdfff;
+}
+
/// This specialization depends on the size of wchar_t
/// - 2 UTF-16 (for example Windows and AIX)
/// - 4 UTF-32 (for example Linux)
template <>
class __code_point_view<wchar_t> {
public:
+ static_assert(sizeof(wchar_t) == 2 || sizeof(wchar_t) == 4, "sizeof(wchar_t) has a not implemented value");
+
_LIBCPP_HIDE_FROM_ABI constexpr explicit __code_point_view(const wchar_t* __first, const wchar_t* __last)
: __first_(__first), __last_(__last) {}
@@ -166,17 +258,43 @@ public:
return __replacement_character;
return __result;
} else {
- // TODO FMT P2593R0 Use static_assert(false, "sizeof(wchar_t) has a not implemented value");
- _LIBCPP_ASSERT(sizeof(wchar_t) == 0, "sizeof(wchar_t) has a not implemented value");
__libcpp_unreachable();
}
}
+# if _LIBCPP_STD_VER > 20
+ _LIBCPP_HIDE_FROM_ABI constexpr __consume_p2286_result __consume_p2286() noexcept {
+ _LIBCPP_ASSERT(__first_ != __last_, "can't move beyond the end of input");
+
+ char32_t __result = *__first_++;
+ if constexpr (sizeof(wchar_t) == 2) {
+ // https://en.wikipedia.org/wiki/UTF-16#U+D800_to_U+DFFF
+ if (__is_surrogate_pair_high(__result)) {
+ // Malformed Unicode.
+ if (__first_ == __last_ || !__is_surrogate_pair_low(*(__first_ + 1))) [[unlikely]]
+ return {1, __result};
+
+ __result -= 0xd800;
+ __result <<= 10;
+ __result += *__first_++ - 0xdc00;
+ __result += 0x10000;
+ } else if (__is_surrogate_pair_low(__result))
+ // A code point shouldn't start with the low surrogate pair
+ return {1, __result};
+ } else {
+ if (__result > 0x10FFFF) [[unlikely]]
+ return {1, __result};
+ }
+
+ return {0, __result};
+ }
+# endif // _LIBCPP_STD_VER > 20
+
private:
const wchar_t* __first_;
const wchar_t* __last_;
};
-# endif
+# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
_LIBCPP_HIDE_FROM_ABI constexpr bool __at_extended_grapheme_cluster_break(
bool& __ri_break_allowed,
@@ -251,10 +369,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __at_extended_grapheme_cluster_break(
if (__prev == __property::__Regional_Indicator && __next == __property::__Regional_Indicator) { // GB12 + GB13
__ri_break_allowed = !__ri_break_allowed;
- if (__ri_break_allowed)
- return true;
-
- return false;
+ return __ri_break_allowed;
}
// *** Otherwise, break everywhere. ***
@@ -328,10 +443,44 @@ private:
}
};
-} // namespace __unicode
+template <class _CharT>
+__extended_grapheme_cluster_view(const _CharT*, const _CharT*) -> __extended_grapheme_cluster_view<_CharT>;
+
+# else // _LIBCPP_HAS_NO_UNICODE
+
+// For ASCII every character is a "code point".
+// This makes it easier to write code agnostic of the _LIBCPP_HAS_NO_UNICODE define.
+template <class _CharT>
+class __code_point_view {
+public:
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit __code_point_view(const _CharT* __first, const _CharT* __last)
+ : __first_(__first), __last_(__last) {}
+
+ _LIBCPP_HIDE_FROM_ABI constexpr bool __at_end() const noexcept { return __first_ == __last_; }
+ _LIBCPP_HIDE_FROM_ABI constexpr const _CharT* __position() const noexcept { return __first_; }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr char32_t __consume() noexcept {
+ _LIBCPP_ASSERT(__first_ != __last_, "can't move beyond the end of input");
+ return *__first_++;
+ }
+
+# if _LIBCPP_STD_VER > 20
+ _LIBCPP_HIDE_FROM_ABI constexpr __consume_p2286_result __consume_p2286() noexcept {
+ _LIBCPP_ASSERT(__first_ != __last_, "can't move beyond the end of input");
+
+ return {0, std::make_unsigned_t<_CharT>(*__first_++)};
+ }
+# endif // _LIBCPP_STD_VER > 20
+
+private:
+ const _CharT* __first_;
+ const _CharT* __last_;
+};
# endif // _LIBCPP_HAS_NO_UNICODE
+} // namespace __unicode
+
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/binary_negate.h b/contrib/libs/cxxsupp/libcxx/include/__functional/binary_negate.h
index c4977f4ebe..73ecea9971 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/binary_negate.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/binary_negate.h
@@ -29,17 +29,17 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 binary_negate
{
_Predicate __pred_;
public:
- _LIBCPP_INLINE_VISIBILITY explicit _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY explicit _LIBCPP_CONSTEXPR_SINCE_CXX14
binary_negate(const _Predicate& __pred) : __pred_(__pred) {}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const typename _Predicate::first_argument_type& __x,
const typename _Predicate::second_argument_type& __y) const
{return !__pred_(__x, __y);}
};
template <class _Predicate>
-_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
binary_negate<_Predicate>
not2(const _Predicate& __pred) {return binary_negate<_Predicate>(__pred);}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/bind.h b/contrib/libs/cxxsupp/libcxx/include/__functional/bind.h
index 85f1a3bf75..3d50ffa439 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/bind.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/bind.h
@@ -25,9 +25,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template<class _Tp>
struct is_bind_expression : _If<
- _IsSame<_Tp, __uncvref_t<_Tp> >::value,
+ _IsSame<_Tp, __remove_cvref_t<_Tp> >::value,
false_type,
- is_bind_expression<__uncvref_t<_Tp> >
+ is_bind_expression<__remove_cvref_t<_Tp> >
> {};
#if _LIBCPP_STD_VER > 14
@@ -37,9 +37,9 @@ inline constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value;
template<class _Tp>
struct is_placeholder : _If<
- _IsSame<_Tp, __uncvref_t<_Tp> >::value,
+ _IsSame<_Tp, __remove_cvref_t<_Tp> >::value,
integral_constant<int, 0>,
- is_placeholder<__uncvref_t<_Tp> >
+ is_placeholder<__remove_cvref_t<_Tp> >
> {};
#if _LIBCPP_STD_VER > 14
@@ -279,16 +279,16 @@ public:
class = typename enable_if
<
is_constructible<_Fd, _Gp>::value &&
- !is_same<typename remove_reference<_Gp>::type,
+ !is_same<__libcpp_remove_reference_t<_Gp>,
__bind>::value
>::type>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
explicit __bind(_Gp&& __f, _BA&& ...__bound_args)
: __f_(_VSTD::forward<_Gp>(__f)),
__bound_args_(_VSTD::forward<_BA>(__bound_args)...) {}
template <class ..._Args>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type
operator()(_Args&& ...__args)
{
@@ -297,7 +297,7 @@ public:
}
template <class ..._Args>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type
operator()(_Args&& ...__args) const
{
@@ -332,16 +332,16 @@ public:
class = typename enable_if
<
is_constructible<_Fd, _Gp>::value &&
- !is_same<typename remove_reference<_Gp>::type,
+ !is_same<__libcpp_remove_reference_t<_Gp>,
__bind_r>::value
>::type>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
explicit __bind_r(_Gp&& __f, _BA&& ...__bound_args)
: base(_VSTD::forward<_Gp>(__f),
_VSTD::forward<_BA>(__bound_args)...) {}
template <class ..._Args>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename enable_if
<
is_convertible<typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type,
@@ -355,7 +355,7 @@ public:
}
template <class ..._Args>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename enable_if
<
is_convertible<typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type,
@@ -373,7 +373,7 @@ template<class _Rp, class _Fp, class ..._BoundArgs>
struct is_bind_expression<__bind_r<_Rp, _Fp, _BoundArgs...> > : public true_type {};
template<class _Fp, class ..._BoundArgs>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__bind<_Fp, _BoundArgs...>
bind(_Fp&& __f, _BoundArgs&&... __bound_args)
{
@@ -382,7 +382,7 @@ bind(_Fp&& __f, _BoundArgs&&... __bound_args)
}
template<class _Rp, class _Fp, class ..._BoundArgs>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__bind_r<_Rp, _Fp, _BoundArgs...>
bind(_Fp&& __f, _BoundArgs&&... __bound_args)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/boyer_moore_searcher.h b/contrib/libs/cxxsupp/libcxx/include/__functional/boyer_moore_searcher.h
index 20e554408f..a6750893ee 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/boyer_moore_searcher.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/boyer_moore_searcher.h
@@ -223,6 +223,7 @@ private:
}
}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(boyer_moore_searcher);
template <class _RandomAccessIterator1,
class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
@@ -303,6 +304,7 @@ private:
return std::make_pair(__l, __l);
}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(boyer_moore_horspool_searcher);
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/default_searcher.h b/contrib/libs/cxxsupp/libcxx/include/__functional/default_searcher.h
index 8e37082b6b..e4151e589f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/default_searcher.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/default_searcher.h
@@ -29,13 +29,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
class _LIBCPP_TEMPLATE_VIS default_searcher {
public:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
default_searcher(_ForwardIterator __f, _ForwardIterator __l,
_BinaryPredicate __p = _BinaryPredicate())
: __first_(__f), __last_(__l), __pred_(__p) {}
template <typename _ForwardIterator2>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
pair<_ForwardIterator2, _ForwardIterator2>
operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const
{
@@ -48,6 +48,7 @@ private:
_ForwardIterator __last_;
_BinaryPredicate __pred_;
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(default_searcher);
#endif // _LIBCPP_STD_VER > 14
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/function.h b/contrib/libs/cxxsupp/libcxx/include/__functional/function.h
index db3af6e241..2d9cdc0459 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/function.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/function.h
@@ -17,20 +17,28 @@
#include <__functional/unary_function.h>
#include <__iterator/iterator_traits.h>
#include <__memory/addressof.h>
+#include <__memory/allocator.h>
+#include <__memory/allocator_destructor.h>
#include <__memory/allocator_traits.h>
+#include <__memory/builtin_new_allocator.h>
#include <__memory/compressed_pair.h>
-#include <__memory/shared_ptr.h>
+#include <__memory/unique_ptr.h>
#include <__utility/forward.h>
#include <__utility/move.h>
+#include <__utility/piecewise_construct.h>
#include <__utility/swap.h>
#include <exception>
-#include <memory> // TODO: replace with <__memory/__builtin_new_allocator.h>
+#include <new>
+#include <tuple>
#include <type_traits>
+#include <typeinfo>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
+#ifndef _LIBCPP_CXX03_LANG
+
_LIBCPP_BEGIN_NAMESPACE_STD
// bad_function_call
@@ -45,13 +53,13 @@ public:
// bad_function_call will end up containing a weak definition of the vtable and
// typeinfo.
#ifdef _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
- virtual ~bad_function_call() _NOEXCEPT;
+ ~bad_function_call() _NOEXCEPT override;
#else
- virtual ~bad_function_call() _NOEXCEPT {}
+ ~bad_function_call() _NOEXCEPT override {}
#endif
#ifdef _LIBCPP_ABI_BAD_FUNCTION_CALL_GOOD_WHAT_MESSAGE
- virtual const char* what() const _NOEXCEPT;
+ const char* what() const _NOEXCEPT override;
#endif
};
_LIBCPP_DIAGNOSTIC_POP
@@ -66,14 +74,7 @@ void __throw_bad_function_call()
#endif
}
-#if defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS) && __has_attribute(deprecated)
-# define _LIBCPP_DEPRECATED_CXX03_FUNCTION \
- __attribute__((deprecated("Using std::function in C++03 is not supported anymore. Please upgrade to C++11 or later, or use a different type")))
-#else
-# define _LIBCPP_DEPRECATED_CXX03_FUNCTION /* nothing */
-#endif
-
-template<class _Fp> class _LIBCPP_DEPRECATED_CXX03_FUNCTION _LIBCPP_TEMPLATE_VIS function; // undefined
+template<class _Fp> class _LIBCPP_TEMPLATE_VIS function; // undefined
namespace __function
{
@@ -124,8 +125,6 @@ bool __not_null(_Rp (^__p)(_Args...)) { return __p; }
} // namespace __function
-#ifndef _LIBCPP_CXX03_LANG
-
namespace __function {
// __alloc_func holds a functor and an allocator.
@@ -190,9 +189,7 @@ class __alloc_func<_Fp, _Ap, _Rp(_ArgTypes...)>
__alloc_func* __clone() const
{
typedef allocator_traits<_Alloc> __alloc_traits;
- typedef
- typename __rebind_alloc_helper<__alloc_traits, __alloc_func>::type
- _AA;
+ typedef __rebind_alloc<__alloc_traits, __alloc_func> _AA;
_AA __a(__f_.second());
typedef __allocator_destructor<_AA> _Dp;
unique_ptr<__alloc_func, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
@@ -205,8 +202,7 @@ class __alloc_func<_Fp, _Ap, _Rp(_ArgTypes...)>
static void __destroy_and_delete(__alloc_func* __f) {
typedef allocator_traits<_Alloc> __alloc_traits;
- typedef typename __rebind_alloc_helper<__alloc_traits, __alloc_func>::type
- _FunAlloc;
+ typedef __rebind_alloc<__alloc_traits, __alloc_func> _FunAlloc;
_FunAlloc __a(__f->__get_allocator());
__f->destroy();
__a.deallocate(__f, 1);
@@ -319,7 +315,7 @@ __base<_Rp(_ArgTypes...)>*
__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::__clone() const
{
typedef allocator_traits<_Alloc> __alloc_traits;
- typedef typename __rebind_alloc_helper<__alloc_traits, __func>::type _Ap;
+ typedef __rebind_alloc<__alloc_traits, __func> _Ap;
_Ap __a(__f_.__get_allocator());
typedef __allocator_destructor<_Ap> _Dp;
unique_ptr<__func, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
@@ -346,7 +342,7 @@ void
__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::destroy_deallocate() _NOEXCEPT
{
typedef allocator_traits<_Alloc> __alloc_traits;
- typedef typename __rebind_alloc_helper<__alloc_traits, __func>::type _Ap;
+ typedef __rebind_alloc<__alloc_traits, __func> _Ap;
_Ap __a(__f_.__get_allocator());
__f_.destroy();
__a.deallocate(this, 1);
@@ -405,8 +401,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
{
typedef allocator_traits<_Alloc> __alloc_traits;
typedef __function::__func<_Fp, _Alloc, _Rp(_ArgTypes...)> _Fun;
- typedef typename __rebind_alloc_helper<__alloc_traits, _Fun>::type
- _FunAlloc;
+ typedef __rebind_alloc<__alloc_traits, _Fun> _FunAlloc;
if (__function::__not_null(__f))
{
@@ -670,8 +665,7 @@ struct __policy
// Used to choose between perfect forwarding or pass-by-value. Pass-by-value is
// faster for types that can be passed in registers.
template <typename _Tp>
-using __fast_forward =
- typename conditional<is_scalar<_Tp>::value, _Tp, _Tp&&>::type;
+using __fast_forward = __conditional_t<is_scalar<_Tp>::value, _Tp, _Tp&&>;
// __policy_invoker calls an instance of __alloc_func held in __policy_storage.
@@ -747,8 +741,7 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
{
typedef __alloc_func<_Fp, _Alloc, _Rp(_ArgTypes...)> _Fun;
typedef allocator_traits<_Alloc> __alloc_traits;
- typedef typename __rebind_alloc_helper<__alloc_traits, _Fun>::type
- _FunAlloc;
+ typedef __rebind_alloc<__alloc_traits, _Fun> _FunAlloc;
if (__function::__not_null(__f))
{
@@ -883,7 +876,7 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
#endif // _LIBCPP_NO_RTTI
};
-#if defined(_LIBCPP_HAS_BLOCKS_RUNTIME) && !defined(_LIBCPP_HAS_OBJC_ARC)
+#if defined(_LIBCPP_HAS_BLOCKS_RUNTIME)
extern "C" void *_Block_copy(const void *);
extern "C" void _Block_release(const void *);
@@ -898,14 +891,22 @@ class __func<_Rp1(^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)>
public:
_LIBCPP_INLINE_VISIBILITY
explicit __func(__block_type const& __f)
+#ifdef _LIBCPP_HAS_OBJC_ARC
+ : __f_(__f)
+#else
: __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
+#endif
{ }
// [TODO] add && to save on a retain
_LIBCPP_INLINE_VISIBILITY
explicit __func(__block_type __f, const _Alloc& /* unused */)
+#ifdef _LIBCPP_HAS_OBJC_ARC
+ : __f_(__f)
+#else
: __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
+#endif
{ }
virtual __base<_Rp(_ArgTypes...)>* __clone() const {
@@ -921,8 +922,10 @@ public:
}
virtual void destroy() _NOEXCEPT {
+#ifndef _LIBCPP_HAS_OBJC_ARC
if (__f_)
_Block_release(__f_);
+#endif
__f_ = 0;
}
@@ -950,7 +953,7 @@ public:
#endif // _LIBCPP_NO_RTTI
};
-#endif // _LIBCPP_HAS_EXTENSION_BLOCKS && !_LIBCPP_HAS_OBJC_ARC
+#endif // _LIBCPP_HAS_EXTENSION_BLOCKS
} // namespace __function
@@ -968,7 +971,7 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
__func __f_;
template <class _Fp, bool = _And<
- _IsNotSame<__uncvref_t<_Fp>, function>,
+ _IsNotSame<__remove_cvref_t<_Fp>, function>,
__invokable<_Fp, _ArgTypes...>
>::value>
struct __callable;
@@ -1240,1574 +1243,8 @@ void
swap(function<_Rp(_ArgTypes...)>& __x, function<_Rp(_ArgTypes...)>& __y) _NOEXCEPT
{return __x.swap(__y);}
-#elif defined(_LIBCPP_ENABLE_CXX03_FUNCTION)
-
-namespace __function {
-
-template<class _Fp> class __base;
-
-template<class _Rp>
-class __base<_Rp()>
-{
- __base(const __base&);
- __base& operator=(const __base&);
-public:
- __base() {}
- virtual ~__base() {}
- virtual __base* __clone() const = 0;
- virtual void __clone(__base*) const = 0;
- virtual void destroy() = 0;
- virtual void destroy_deallocate() = 0;
- virtual _Rp operator()() = 0;
-#ifndef _LIBCPP_NO_RTTI
- virtual const void* target(const type_info&) const = 0;
- virtual const std::type_info& target_type() const = 0;
-#endif // _LIBCPP_NO_RTTI
-};
-
-template<class _Rp, class _A0>
-class __base<_Rp(_A0)>
-{
- __base(const __base&);
- __base& operator=(const __base&);
-public:
- __base() {}
- virtual ~__base() {}
- virtual __base* __clone() const = 0;
- virtual void __clone(__base*) const = 0;
- virtual void destroy() = 0;
- virtual void destroy_deallocate() = 0;
- virtual _Rp operator()(_A0) = 0;
-#ifndef _LIBCPP_NO_RTTI
- virtual const void* target(const type_info&) const = 0;
- virtual const std::type_info& target_type() const = 0;
-#endif // _LIBCPP_NO_RTTI
-};
-
-template<class _Rp, class _A0, class _A1>
-class __base<_Rp(_A0, _A1)>
-{
- __base(const __base&);
- __base& operator=(const __base&);
-public:
- __base() {}
- virtual ~__base() {}
- virtual __base* __clone() const = 0;
- virtual void __clone(__base*) const = 0;
- virtual void destroy() = 0;
- virtual void destroy_deallocate() = 0;
- virtual _Rp operator()(_A0, _A1) = 0;
-#ifndef _LIBCPP_NO_RTTI
- virtual const void* target(const type_info&) const = 0;
- virtual const std::type_info& target_type() const = 0;
-#endif // _LIBCPP_NO_RTTI
-};
-
-template<class _Rp, class _A0, class _A1, class _A2>
-class __base<_Rp(_A0, _A1, _A2)>
-{
- __base(const __base&);
- __base& operator=(const __base&);
-public:
- __base() {}
- virtual ~__base() {}
- virtual __base* __clone() const = 0;
- virtual void __clone(__base*) const = 0;
- virtual void destroy() = 0;
- virtual void destroy_deallocate() = 0;
- virtual _Rp operator()(_A0, _A1, _A2) = 0;
-#ifndef _LIBCPP_NO_RTTI
- virtual const void* target(const type_info&) const = 0;
- virtual const std::type_info& target_type() const = 0;
-#endif // _LIBCPP_NO_RTTI
-};
-
-template<class _FD, class _Alloc, class _FB> class __func;
-
-template<class _Fp, class _Alloc, class _Rp>
-class __func<_Fp, _Alloc, _Rp()>
- : public __base<_Rp()>
-{
- __compressed_pair<_Fp, _Alloc> __f_;
-public:
- explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) {}
- explicit __func(_Fp __f, _Alloc __a) : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
- virtual __base<_Rp()>* __clone() const;
- virtual void __clone(__base<_Rp()>*) const;
- virtual void destroy();
- virtual void destroy_deallocate();
- virtual _Rp operator()();
-#ifndef _LIBCPP_NO_RTTI
- virtual const void* target(const type_info&) const;
- virtual const std::type_info& target_type() const;
-#endif // _LIBCPP_NO_RTTI
-};
-
-template<class _Fp, class _Alloc, class _Rp>
-__base<_Rp()>*
-__func<_Fp, _Alloc, _Rp()>::__clone() const
-{
- typedef allocator_traits<_Alloc> __alloc_traits;
- typedef typename __rebind_alloc_helper<__alloc_traits, __func>::type _Ap;
- _Ap __a(__f_.second());
- typedef __allocator_destructor<_Ap> _Dp;
- unique_ptr<__func, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
- ::new ((void*)__hold.get()) __func(__f_.first(), _Alloc(__a));
- return __hold.release();
-}
-
-template<class _Fp, class _Alloc, class _Rp>
-void
-__func<_Fp, _Alloc, _Rp()>::__clone(__base<_Rp()>* __p) const
-{
- ::new ((void*)__p) __func(__f_.first(), __f_.second());
-}
-
-template<class _Fp, class _Alloc, class _Rp>
-void
-__func<_Fp, _Alloc, _Rp()>::destroy()
-{
- __f_.~__compressed_pair<_Fp, _Alloc>();
-}
-
-template<class _Fp, class _Alloc, class _Rp>
-void
-__func<_Fp, _Alloc, _Rp()>::destroy_deallocate()
-{
- typedef allocator_traits<_Alloc> __alloc_traits;
- typedef typename __rebind_alloc_helper<__alloc_traits, __func>::type _Ap;
- _Ap __a(__f_.second());
- __f_.~__compressed_pair<_Fp, _Alloc>();
- __a.deallocate(this, 1);
-}
-
-template<class _Fp, class _Alloc, class _Rp>
-_Rp
-__func<_Fp, _Alloc, _Rp()>::operator()()
-{
- typedef __invoke_void_return_wrapper<_Rp> _Invoker;
- return _Invoker::__call(__f_.first());
-}
-
-#ifndef _LIBCPP_NO_RTTI
-
-template<class _Fp, class _Alloc, class _Rp>
-const void*
-__func<_Fp, _Alloc, _Rp()>::target(const type_info& __ti) const
-{
- if (__ti == typeid(_Fp))
- return _VSTD::addressof(__f_.first());
- return (const void*)0;
-}
-
-template<class _Fp, class _Alloc, class _Rp>
-const std::type_info&
-__func<_Fp, _Alloc, _Rp()>::target_type() const
-{
- return typeid(_Fp);
-}
-
-#endif // _LIBCPP_NO_RTTI
-
-template<class _Fp, class _Alloc, class _Rp, class _A0>
-class __func<_Fp, _Alloc, _Rp(_A0)>
- : public __base<_Rp(_A0)>
-{
- __compressed_pair<_Fp, _Alloc> __f_;
-public:
- _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) {}
- _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
- : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
- virtual __base<_Rp(_A0)>* __clone() const;
- virtual void __clone(__base<_Rp(_A0)>*) const;
- virtual void destroy();
- virtual void destroy_deallocate();
- virtual _Rp operator()(_A0);
-#ifndef _LIBCPP_NO_RTTI
- virtual const void* target(const type_info&) const;
- virtual const std::type_info& target_type() const;
-#endif // _LIBCPP_NO_RTTI
-};
-
-template<class _Fp, class _Alloc, class _Rp, class _A0>
-__base<_Rp(_A0)>*
-__func<_Fp, _Alloc, _Rp(_A0)>::__clone() const
-{
- typedef allocator_traits<_Alloc> __alloc_traits;
- typedef typename __rebind_alloc_helper<__alloc_traits, __func>::type _Ap;
- _Ap __a(__f_.second());
- typedef __allocator_destructor<_Ap> _Dp;
- unique_ptr<__func, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
- ::new ((void*)__hold.get()) __func(__f_.first(), _Alloc(__a));
- return __hold.release();
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0>
-void
-__func<_Fp, _Alloc, _Rp(_A0)>::__clone(__base<_Rp(_A0)>* __p) const
-{
- ::new ((void*)__p) __func(__f_.first(), __f_.second());
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0>
-void
-__func<_Fp, _Alloc, _Rp(_A0)>::destroy()
-{
- __f_.~__compressed_pair<_Fp, _Alloc>();
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0>
-void
-__func<_Fp, _Alloc, _Rp(_A0)>::destroy_deallocate()
-{
- typedef allocator_traits<_Alloc> __alloc_traits;
- typedef typename __rebind_alloc_helper<__alloc_traits, __func>::type _Ap;
- _Ap __a(__f_.second());
- __f_.~__compressed_pair<_Fp, _Alloc>();
- __a.deallocate(this, 1);
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0>
-_Rp
-__func<_Fp, _Alloc, _Rp(_A0)>::operator()(_A0 __a0)
-{
- typedef __invoke_void_return_wrapper<_Rp> _Invoker;
- return _Invoker::__call(__f_.first(), __a0);
-}
-
-#ifndef _LIBCPP_NO_RTTI
-
-template<class _Fp, class _Alloc, class _Rp, class _A0>
-const void*
-__func<_Fp, _Alloc, _Rp(_A0)>::target(const type_info& __ti) const
-{
- if (__ti == typeid(_Fp))
- return &__f_.first();
- return (const void*)0;
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0>
-const std::type_info&
-__func<_Fp, _Alloc, _Rp(_A0)>::target_type() const
-{
- return typeid(_Fp);
-}
-
-#endif // _LIBCPP_NO_RTTI
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1>
-class __func<_Fp, _Alloc, _Rp(_A0, _A1)>
- : public __base<_Rp(_A0, _A1)>
-{
- __compressed_pair<_Fp, _Alloc> __f_;
-public:
- _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) {}
- _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
- : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
- virtual __base<_Rp(_A0, _A1)>* __clone() const;
- virtual void __clone(__base<_Rp(_A0, _A1)>*) const;
- virtual void destroy();
- virtual void destroy_deallocate();
- virtual _Rp operator()(_A0, _A1);
-#ifndef _LIBCPP_NO_RTTI
- virtual const void* target(const type_info&) const;
- virtual const std::type_info& target_type() const;
-#endif // _LIBCPP_NO_RTTI
-};
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1>
-__base<_Rp(_A0, _A1)>*
-__func<_Fp, _Alloc, _Rp(_A0, _A1)>::__clone() const
-{
- typedef allocator_traits<_Alloc> __alloc_traits;
- typedef typename __rebind_alloc_helper<__alloc_traits, __func>::type _Ap;
- _Ap __a(__f_.second());
- typedef __allocator_destructor<_Ap> _Dp;
- unique_ptr<__func, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
- ::new ((void*)__hold.get()) __func(__f_.first(), _Alloc(__a));
- return __hold.release();
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1>
-void
-__func<_Fp, _Alloc, _Rp(_A0, _A1)>::__clone(__base<_Rp(_A0, _A1)>* __p) const
-{
- ::new ((void*)__p) __func(__f_.first(), __f_.second());
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1>
-void
-__func<_Fp, _Alloc, _Rp(_A0, _A1)>::destroy()
-{
- __f_.~__compressed_pair<_Fp, _Alloc>();
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1>
-void
-__func<_Fp, _Alloc, _Rp(_A0, _A1)>::destroy_deallocate()
-{
- typedef allocator_traits<_Alloc> __alloc_traits;
- typedef typename __rebind_alloc_helper<__alloc_traits, __func>::type _Ap;
- _Ap __a(__f_.second());
- __f_.~__compressed_pair<_Fp, _Alloc>();
- __a.deallocate(this, 1);
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1>
-_Rp
-__func<_Fp, _Alloc, _Rp(_A0, _A1)>::operator()(_A0 __a0, _A1 __a1)
-{
- typedef __invoke_void_return_wrapper<_Rp> _Invoker;
- return _Invoker::__call(__f_.first(), __a0, __a1);
-}
-
-#ifndef _LIBCPP_NO_RTTI
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1>
-const void*
-__func<_Fp, _Alloc, _Rp(_A0, _A1)>::target(const type_info& __ti) const
-{
- if (__ti == typeid(_Fp))
- return &__f_.first();
- return (const void*)0;
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1>
-const std::type_info&
-__func<_Fp, _Alloc, _Rp(_A0, _A1)>::target_type() const
-{
- return typeid(_Fp);
-}
-
-#endif // _LIBCPP_NO_RTTI
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1, class _A2>
-class __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>
- : public __base<_Rp(_A0, _A1, _A2)>
-{
- __compressed_pair<_Fp, _Alloc> __f_;
-public:
- _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) {}
- _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
- : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
- virtual __base<_Rp(_A0, _A1, _A2)>* __clone() const;
- virtual void __clone(__base<_Rp(_A0, _A1, _A2)>*) const;
- virtual void destroy();
- virtual void destroy_deallocate();
- virtual _Rp operator()(_A0, _A1, _A2);
-#ifndef _LIBCPP_NO_RTTI
- virtual const void* target(const type_info&) const;
- virtual const std::type_info& target_type() const;
-#endif // _LIBCPP_NO_RTTI
-};
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1, class _A2>
-__base<_Rp(_A0, _A1, _A2)>*
-__func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::__clone() const
-{
- typedef allocator_traits<_Alloc> __alloc_traits;
- typedef typename __rebind_alloc_helper<__alloc_traits, __func>::type _Ap;
- _Ap __a(__f_.second());
- typedef __allocator_destructor<_Ap> _Dp;
- unique_ptr<__func, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
- ::new ((void*)__hold.get()) __func(__f_.first(), _Alloc(__a));
- return __hold.release();
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1, class _A2>
-void
-__func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::__clone(__base<_Rp(_A0, _A1, _A2)>* __p) const
-{
- ::new ((void*)__p) __func(__f_.first(), __f_.second());
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1, class _A2>
-void
-__func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::destroy()
-{
- __f_.~__compressed_pair<_Fp, _Alloc>();
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1, class _A2>
-void
-__func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::destroy_deallocate()
-{
- typedef allocator_traits<_Alloc> __alloc_traits;
- typedef typename __rebind_alloc_helper<__alloc_traits, __func>::type _Ap;
- _Ap __a(__f_.second());
- __f_.~__compressed_pair<_Fp, _Alloc>();
- __a.deallocate(this, 1);
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1, class _A2>
-_Rp
-__func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::operator()(_A0 __a0, _A1 __a1, _A2 __a2)
-{
- typedef __invoke_void_return_wrapper<_Rp> _Invoker;
- return _Invoker::__call(__f_.first(), __a0, __a1, __a2);
-}
-
-#ifndef _LIBCPP_NO_RTTI
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1, class _A2>
-const void*
-__func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::target(const type_info& __ti) const
-{
- if (__ti == typeid(_Fp))
- return &__f_.first();
- return (const void*)0;
-}
-
-template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1, class _A2>
-const std::type_info&
-__func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::target_type() const
-{
- return typeid(_Fp);
-}
-
-#endif // _LIBCPP_NO_RTTI
-
-} // namespace __function
-
-template<class _Rp>
-class _LIBCPP_TEMPLATE_VIS function<_Rp()>
-{
- typedef __function::__base<_Rp()> __base;
- aligned_storage<3*sizeof(void*)>::type __buf_;
- __base* __f_;
-
-public:
- typedef _Rp result_type;
-
- // 20.7.16.2.1, construct/copy/destroy:
- _LIBCPP_INLINE_VISIBILITY explicit function() : __f_(0) {}
- _LIBCPP_INLINE_VISIBILITY function(nullptr_t) : __f_(0) {}
- function(const function&);
- template<class _Fp>
- function(_Fp,
- typename enable_if<!is_integral<_Fp>::value>::type* = 0);
-
- template<class _Alloc>
- _LIBCPP_INLINE_VISIBILITY
- function(allocator_arg_t, const _Alloc&) : __f_(0) {}
- template<class _Alloc>
- _LIBCPP_INLINE_VISIBILITY
- function(allocator_arg_t, const _Alloc&, nullptr_t) : __f_(0) {}
- template<class _Alloc>
- function(allocator_arg_t, const _Alloc&, const function&);
- template<class _Fp, class _Alloc>
- function(allocator_arg_t, const _Alloc& __a, _Fp __f,
- typename enable_if<!is_integral<_Fp>::value>::type* = 0);
-
- function& operator=(const function&);
- function& operator=(nullptr_t);
- template<class _Fp>
- typename enable_if
- <
- !is_integral<_Fp>::value,
- function&
- >::type
- operator=(_Fp);
-
- ~function();
-
- // 20.7.16.2.2, function modifiers:
- void swap(function&);
- template<class _Fp, class _Alloc>
- _LIBCPP_INLINE_VISIBILITY
- void assign(_Fp __f, const _Alloc& __a)
- {function(allocator_arg, __a, __f).swap(*this);}
-
- // 20.7.16.2.3, function capacity:
- _LIBCPP_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
-
- template<class _R2>
- bool operator==(const function<_R2()>&) const = delete;
- template<class _R2>
- bool operator!=(const function<_R2()>&) const = delete;
-
- // 20.7.16.2.4, function invocation:
- _Rp operator()() const;
-
-#ifndef _LIBCPP_NO_RTTI
- // 20.7.16.2.5, function target access:
- const std::type_info& target_type() const;
- template <typename _Tp> _Tp* target();
- template <typename _Tp> const _Tp* target() const;
-#endif // _LIBCPP_NO_RTTI
-};
-
-template<class _Rp>
-function<_Rp()>::function(const function& __f)
-{
- if (__f.__f_ == 0)
- __f_ = 0;
- else if (__f.__f_ == (const __base*)&__f.__buf_)
- {
- __f_ = (__base*)&__buf_;
- __f.__f_->__clone(__f_);
- }
- else
- __f_ = __f.__f_->__clone();
-}
-
-template<class _Rp>
-template<class _Alloc>
-function<_Rp()>::function(allocator_arg_t, const _Alloc&, const function& __f)
-{
- if (__f.__f_ == 0)
- __f_ = 0;
- else if (__f.__f_ == (const __base*)&__f.__buf_)
- {
- __f_ = (__base*)&__buf_;
- __f.__f_->__clone(__f_);
- }
- else
- __f_ = __f.__f_->__clone();
-}
-
-template<class _Rp>
-template <class _Fp>
-function<_Rp()>::function(_Fp __f,
- typename enable_if<!is_integral<_Fp>::value>::type*)
- : __f_(0)
-{
- if (__function::__not_null(__f))
- {
- typedef __function::__func<_Fp, allocator<_Fp>, _Rp()> _FF;
- if (sizeof(_FF) <= sizeof(__buf_))
- {
- __f_ = (__base*)&__buf_;
- ::new ((void*)__f_) _FF(__f);
- }
- else
- {
- typedef allocator<_FF> _Ap;
- _Ap __a;
- typedef __allocator_destructor<_Ap> _Dp;
- unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
- ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a));
- __f_ = __hold.release();
- }
- }
-}
-
-template<class _Rp>
-template <class _Fp, class _Alloc>
-function<_Rp()>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f,
- typename enable_if<!is_integral<_Fp>::value>::type*)
- : __f_(0)
-{
- typedef allocator_traits<_Alloc> __alloc_traits;
- if (__function::__not_null(__f))
- {
- typedef __function::__func<_Fp, _Alloc, _Rp()> _FF;
- if (sizeof(_FF) <= sizeof(__buf_))
- {
- __f_ = (__base*)&__buf_;
- ::new ((void*)__f_) _FF(__f, __a0);
- }
- else
- {
- typedef typename __rebind_alloc_helper<__alloc_traits, _FF>::type _Ap;
- _Ap __a(__a0);
- typedef __allocator_destructor<_Ap> _Dp;
- unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
- ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a));
- __f_ = __hold.release();
- }
- }
-}
-
-template<class _Rp>
-function<_Rp()>&
-function<_Rp()>::operator=(const function& __f)
-{
- if (__f)
- function(__f).swap(*this);
- else
- *this = nullptr;
- return *this;
-}
-
-template<class _Rp>
-function<_Rp()>&
-function<_Rp()>::operator=(nullptr_t)
-{
- __base* __t = __f_;
- __f_ = 0;
- if (__t == (__base*)&__buf_)
- __t->destroy();
- else if (__t)
- __t->destroy_deallocate();
- return *this;
-}
-
-template<class _Rp>
-template <class _Fp>
-typename enable_if
-<
- !is_integral<_Fp>::value,
- function<_Rp()>&
->::type
-function<_Rp()>::operator=(_Fp __f)
-{
- function(_VSTD::move(__f)).swap(*this);
- return *this;
-}
-
-template<class _Rp>
-function<_Rp()>::~function()
-{
- if (__f_ == (__base*)&__buf_)
- __f_->destroy();
- else if (__f_)
- __f_->destroy_deallocate();
-}
-
-template<class _Rp>
-void
-function<_Rp()>::swap(function& __f)
-{
- if (_VSTD::addressof(__f) == this)
- return;
- if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
- {
- typename aligned_storage<sizeof(__buf_)>::type __tempbuf;
- __base* __t = (__base*)&__tempbuf;
- __f_->__clone(__t);
- __f_->destroy();
- __f_ = 0;
- __f.__f_->__clone((__base*)&__buf_);
- __f.__f_->destroy();
- __f.__f_ = 0;
- __f_ = (__base*)&__buf_;
- __t->__clone((__base*)&__f.__buf_);
- __t->destroy();
- __f.__f_ = (__base*)&__f.__buf_;
- }
- else if (__f_ == (__base*)&__buf_)
- {
- __f_->__clone((__base*)&__f.__buf_);
- __f_->destroy();
- __f_ = __f.__f_;
- __f.__f_ = (__base*)&__f.__buf_;
- }
- else if (__f.__f_ == (__base*)&__f.__buf_)
- {
- __f.__f_->__clone((__base*)&__buf_);
- __f.__f_->destroy();
- __f.__f_ = __f_;
- __f_ = (__base*)&__buf_;
- }
- else
- _VSTD::swap(__f_, __f.__f_);
-}
-
-template<class _Rp>
-_Rp
-function<_Rp()>::operator()() const
-{
- if (__f_ == 0)
- __throw_bad_function_call();
- return (*__f_)();
-}
-
-#ifndef _LIBCPP_NO_RTTI
-
-template<class _Rp>
-const std::type_info&
-function<_Rp()>::target_type() const
-{
- if (__f_ == 0)
- return typeid(void);
- return __f_->target_type();
-}
-
-template<class _Rp>
-template <typename _Tp>
-_Tp*
-function<_Rp()>::target()
-{
- if (__f_ == 0)
- return (_Tp*)0;
- return (_Tp*) const_cast<void *>(__f_->target(typeid(_Tp)));
-}
-
-template<class _Rp>
-template <typename _Tp>
-const _Tp*
-function<_Rp()>::target() const
-{
- if (__f_ == 0)
- return (const _Tp*)0;
- return (const _Tp*)__f_->target(typeid(_Tp));
-}
-
-#endif // _LIBCPP_NO_RTTI
-
-template<class _Rp, class _A0>
-class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0)>
- : public unary_function<_A0, _Rp>
-{
- typedef __function::__base<_Rp(_A0)> __base;
- aligned_storage<3*sizeof(void*)>::type __buf_;
- __base* __f_;
-
-public:
- typedef _Rp result_type;
-
- // 20.7.16.2.1, construct/copy/destroy:
- _LIBCPP_INLINE_VISIBILITY explicit function() : __f_(0) {}
- _LIBCPP_INLINE_VISIBILITY function(nullptr_t) : __f_(0) {}
- function(const function&);
- template<class _Fp>
- function(_Fp,
- typename enable_if<!is_integral<_Fp>::value>::type* = 0);
-
- template<class _Alloc>
- _LIBCPP_INLINE_VISIBILITY
- function(allocator_arg_t, const _Alloc&) : __f_(0) {}
- template<class _Alloc>
- _LIBCPP_INLINE_VISIBILITY
- function(allocator_arg_t, const _Alloc&, nullptr_t) : __f_(0) {}
- template<class _Alloc>
- function(allocator_arg_t, const _Alloc&, const function&);
- template<class _Fp, class _Alloc>
- function(allocator_arg_t, const _Alloc& __a, _Fp __f,
- typename enable_if<!is_integral<_Fp>::value>::type* = 0);
-
- function& operator=(const function&);
- function& operator=(nullptr_t);
- template<class _Fp>
- typename enable_if
- <
- !is_integral<_Fp>::value,
- function&
- >::type
- operator=(_Fp);
-
- ~function();
-
- // 20.7.16.2.2, function modifiers:
- void swap(function&);
- template<class _Fp, class _Alloc>
- _LIBCPP_INLINE_VISIBILITY
- void assign(_Fp __f, const _Alloc& __a)
- {function(allocator_arg, __a, __f).swap(*this);}
-
- // 20.7.16.2.3, function capacity:
- _LIBCPP_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
-
- template<class _R2, class _B0>
- bool operator==(const function<_R2(_B0)>&) const = delete;
- template<class _R2, class _B0>
- bool operator!=(const function<_R2(_B0)>&) const = delete;
-
- // 20.7.16.2.4, function invocation:
- _Rp operator()(_A0) const;
-
-#ifndef _LIBCPP_NO_RTTI
- // 20.7.16.2.5, function target access:
- const std::type_info& target_type() const;
- template <typename _Tp> _Tp* target();
- template <typename _Tp> const _Tp* target() const;
-#endif // _LIBCPP_NO_RTTI
-};
-
-template<class _Rp, class _A0>
-function<_Rp(_A0)>::function(const function& __f)
-{
- if (__f.__f_ == 0)
- __f_ = 0;
- else if (__f.__f_ == (const __base*)&__f.__buf_)
- {
- __f_ = (__base*)&__buf_;
- __f.__f_->__clone(__f_);
- }
- else
- __f_ = __f.__f_->__clone();
-}
-
-template<class _Rp, class _A0>
-template<class _Alloc>
-function<_Rp(_A0)>::function(allocator_arg_t, const _Alloc&, const function& __f)
-{
- if (__f.__f_ == 0)
- __f_ = 0;
- else if (__f.__f_ == (const __base*)&__f.__buf_)
- {
- __f_ = (__base*)&__buf_;
- __f.__f_->__clone(__f_);
- }
- else
- __f_ = __f.__f_->__clone();
-}
-
-template<class _Rp, class _A0>
-template <class _Fp>
-function<_Rp(_A0)>::function(_Fp __f,
- typename enable_if<!is_integral<_Fp>::value>::type*)
- : __f_(0)
-{
- if (__function::__not_null(__f))
- {
- typedef __function::__func<_Fp, allocator<_Fp>, _Rp(_A0)> _FF;
- if (sizeof(_FF) <= sizeof(__buf_))
- {
- __f_ = (__base*)&__buf_;
- ::new ((void*)__f_) _FF(__f);
- }
- else
- {
- typedef allocator<_FF> _Ap;
- _Ap __a;
- typedef __allocator_destructor<_Ap> _Dp;
- unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
- ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a));
- __f_ = __hold.release();
- }
- }
-}
-
-template<class _Rp, class _A0>
-template <class _Fp, class _Alloc>
-function<_Rp(_A0)>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f,
- typename enable_if<!is_integral<_Fp>::value>::type*)
- : __f_(0)
-{
- typedef allocator_traits<_Alloc> __alloc_traits;
- if (__function::__not_null(__f))
- {
- typedef __function::__func<_Fp, _Alloc, _Rp(_A0)> _FF;
- if (sizeof(_FF) <= sizeof(__buf_))
- {
- __f_ = (__base*)&__buf_;
- ::new ((void*)__f_) _FF(__f, __a0);
- }
- else
- {
- typedef typename __rebind_alloc_helper<__alloc_traits, _FF>::type _Ap;
- _Ap __a(__a0);
- typedef __allocator_destructor<_Ap> _Dp;
- unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
- ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a));
- __f_ = __hold.release();
- }
- }
-}
-
-template<class _Rp, class _A0>
-function<_Rp(_A0)>&
-function<_Rp(_A0)>::operator=(const function& __f)
-{
- if (__f)
- function(__f).swap(*this);
- else
- *this = nullptr;
- return *this;
-}
-
-template<class _Rp, class _A0>
-function<_Rp(_A0)>&
-function<_Rp(_A0)>::operator=(nullptr_t)
-{
- __base* __t = __f_;
- __f_ = 0;
- if (__t == (__base*)&__buf_)
- __t->destroy();
- else if (__t)
- __t->destroy_deallocate();
- return *this;
-}
-
-template<class _Rp, class _A0>
-template <class _Fp>
-typename enable_if
-<
- !is_integral<_Fp>::value,
- function<_Rp(_A0)>&
->::type
-function<_Rp(_A0)>::operator=(_Fp __f)
-{
- function(_VSTD::move(__f)).swap(*this);
- return *this;
-}
-
-template<class _Rp, class _A0>
-function<_Rp(_A0)>::~function()
-{
- if (__f_ == (__base*)&__buf_)
- __f_->destroy();
- else if (__f_)
- __f_->destroy_deallocate();
-}
-
-template<class _Rp, class _A0>
-void
-function<_Rp(_A0)>::swap(function& __f)
-{
- if (_VSTD::addressof(__f) == this)
- return;
- if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
- {
- typename aligned_storage<sizeof(__buf_)>::type __tempbuf;
- __base* __t = (__base*)&__tempbuf;
- __f_->__clone(__t);
- __f_->destroy();
- __f_ = 0;
- __f.__f_->__clone((__base*)&__buf_);
- __f.__f_->destroy();
- __f.__f_ = 0;
- __f_ = (__base*)&__buf_;
- __t->__clone((__base*)&__f.__buf_);
- __t->destroy();
- __f.__f_ = (__base*)&__f.__buf_;
- }
- else if (__f_ == (__base*)&__buf_)
- {
- __f_->__clone((__base*)&__f.__buf_);
- __f_->destroy();
- __f_ = __f.__f_;
- __f.__f_ = (__base*)&__f.__buf_;
- }
- else if (__f.__f_ == (__base*)&__f.__buf_)
- {
- __f.__f_->__clone((__base*)&__buf_);
- __f.__f_->destroy();
- __f.__f_ = __f_;
- __f_ = (__base*)&__buf_;
- }
- else
- _VSTD::swap(__f_, __f.__f_);
-}
-
-template<class _Rp, class _A0>
-_Rp
-function<_Rp(_A0)>::operator()(_A0 __a0) const
-{
- if (__f_ == 0)
- __throw_bad_function_call();
- return (*__f_)(__a0);
-}
-
-#ifndef _LIBCPP_NO_RTTI
-
-template<class _Rp, class _A0>
-const std::type_info&
-function<_Rp(_A0)>::target_type() const
-{
- if (__f_ == 0)
- return typeid(void);
- return __f_->target_type();
-}
-
-template<class _Rp, class _A0>
-template <typename _Tp>
-_Tp*
-function<_Rp(_A0)>::target()
-{
- if (__f_ == 0)
- return (_Tp*)0;
- return (_Tp*) const_cast<void *>(__f_->target(typeid(_Tp)));
-}
-
-template<class _Rp, class _A0>
-template <typename _Tp>
-const _Tp*
-function<_Rp(_A0)>::target() const
-{
- if (__f_ == 0)
- return (const _Tp*)0;
- return (const _Tp*)__f_->target(typeid(_Tp));
-}
-
-#endif // _LIBCPP_NO_RTTI
-
-template<class _Rp, class _A0, class _A1>
-class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0, _A1)>
- : public binary_function<_A0, _A1, _Rp>
-{
- typedef __function::__base<_Rp(_A0, _A1)> __base;
- aligned_storage<3*sizeof(void*)>::type __buf_;
- __base* __f_;
-
-public:
- typedef _Rp result_type;
-
- // 20.7.16.2.1, construct/copy/destroy:
- _LIBCPP_INLINE_VISIBILITY explicit function() : __f_(0) {}
- _LIBCPP_INLINE_VISIBILITY function(nullptr_t) : __f_(0) {}
- function(const function&);
- template<class _Fp>
- function(_Fp,
- typename enable_if<!is_integral<_Fp>::value>::type* = 0);
-
- template<class _Alloc>
- _LIBCPP_INLINE_VISIBILITY
- function(allocator_arg_t, const _Alloc&) : __f_(0) {}
- template<class _Alloc>
- _LIBCPP_INLINE_VISIBILITY
- function(allocator_arg_t, const _Alloc&, nullptr_t) : __f_(0) {}
- template<class _Alloc>
- function(allocator_arg_t, const _Alloc&, const function&);
- template<class _Fp, class _Alloc>
- function(allocator_arg_t, const _Alloc& __a, _Fp __f,
- typename enable_if<!is_integral<_Fp>::value>::type* = 0);
-
- function& operator=(const function&);
- function& operator=(nullptr_t);
- template<class _Fp>
- typename enable_if
- <
- !is_integral<_Fp>::value,
- function&
- >::type
- operator=(_Fp);
-
- ~function();
-
- // 20.7.16.2.2, function modifiers:
- void swap(function&);
- template<class _Fp, class _Alloc>
- _LIBCPP_INLINE_VISIBILITY
- void assign(_Fp __f, const _Alloc& __a)
- {function(allocator_arg, __a, __f).swap(*this);}
-
- // 20.7.16.2.3, function capacity:
- _LIBCPP_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
-
- template<class _R2, class _B0, class _B1>
- bool operator==(const function<_R2(_B0, _B1)>&) const = delete;
- template<class _R2, class _B0, class _B1>
- bool operator!=(const function<_R2(_B0, _B1)>&) const = delete;
-
- // 20.7.16.2.4, function invocation:
- _Rp operator()(_A0, _A1) const;
-
-#ifndef _LIBCPP_NO_RTTI
- // 20.7.16.2.5, function target access:
- const std::type_info& target_type() const;
- template <typename _Tp> _Tp* target();
- template <typename _Tp> const _Tp* target() const;
-#endif // _LIBCPP_NO_RTTI
-};
-
-template<class _Rp, class _A0, class _A1>
-function<_Rp(_A0, _A1)>::function(const function& __f)
-{
- if (__f.__f_ == 0)
- __f_ = 0;
- else if (__f.__f_ == (const __base*)&__f.__buf_)
- {
- __f_ = (__base*)&__buf_;
- __f.__f_->__clone(__f_);
- }
- else
- __f_ = __f.__f_->__clone();
-}
-
-template<class _Rp, class _A0, class _A1>
-template<class _Alloc>
-function<_Rp(_A0, _A1)>::function(allocator_arg_t, const _Alloc&, const function& __f)
-{
- if (__f.__f_ == 0)
- __f_ = 0;
- else if (__f.__f_ == (const __base*)&__f.__buf_)
- {
- __f_ = (__base*)&__buf_;
- __f.__f_->__clone(__f_);
- }
- else
- __f_ = __f.__f_->__clone();
-}
-
-template<class _Rp, class _A0, class _A1>
-template <class _Fp>
-function<_Rp(_A0, _A1)>::function(_Fp __f,
- typename enable_if<!is_integral<_Fp>::value>::type*)
- : __f_(0)
-{
- if (__function::__not_null(__f))
- {
- typedef __function::__func<_Fp, allocator<_Fp>, _Rp(_A0, _A1)> _FF;
- if (sizeof(_FF) <= sizeof(__buf_))
- {
- __f_ = (__base*)&__buf_;
- ::new ((void*)__f_) _FF(__f);
- }
- else
- {
- typedef allocator<_FF> _Ap;
- _Ap __a;
- typedef __allocator_destructor<_Ap> _Dp;
- unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
- ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a));
- __f_ = __hold.release();
- }
- }
-}
-
-template<class _Rp, class _A0, class _A1>
-template <class _Fp, class _Alloc>
-function<_Rp(_A0, _A1)>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f,
- typename enable_if<!is_integral<_Fp>::value>::type*)
- : __f_(0)
-{
- typedef allocator_traits<_Alloc> __alloc_traits;
- if (__function::__not_null(__f))
- {
- typedef __function::__func<_Fp, _Alloc, _Rp(_A0, _A1)> _FF;
- if (sizeof(_FF) <= sizeof(__buf_))
- {
- __f_ = (__base*)&__buf_;
- ::new ((void*)__f_) _FF(__f, __a0);
- }
- else
- {
- typedef typename __rebind_alloc_helper<__alloc_traits, _FF>::type _Ap;
- _Ap __a(__a0);
- typedef __allocator_destructor<_Ap> _Dp;
- unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
- ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a));
- __f_ = __hold.release();
- }
- }
-}
-
-template<class _Rp, class _A0, class _A1>
-function<_Rp(_A0, _A1)>&
-function<_Rp(_A0, _A1)>::operator=(const function& __f)
-{
- if (__f)
- function(__f).swap(*this);
- else
- *this = nullptr;
- return *this;
-}
-
-template<class _Rp, class _A0, class _A1>
-function<_Rp(_A0, _A1)>&
-function<_Rp(_A0, _A1)>::operator=(nullptr_t)
-{
- __base* __t = __f_;
- __f_ = 0;
- if (__t == (__base*)&__buf_)
- __t->destroy();
- else if (__t)
- __t->destroy_deallocate();
- return *this;
-}
-
-template<class _Rp, class _A0, class _A1>
-template <class _Fp>
-typename enable_if
-<
- !is_integral<_Fp>::value,
- function<_Rp(_A0, _A1)>&
->::type
-function<_Rp(_A0, _A1)>::operator=(_Fp __f)
-{
- function(_VSTD::move(__f)).swap(*this);
- return *this;
-}
-
-template<class _Rp, class _A0, class _A1>
-function<_Rp(_A0, _A1)>::~function()
-{
- if (__f_ == (__base*)&__buf_)
- __f_->destroy();
- else if (__f_)
- __f_->destroy_deallocate();
-}
-
-template<class _Rp, class _A0, class _A1>
-void
-function<_Rp(_A0, _A1)>::swap(function& __f)
-{
- if (_VSTD::addressof(__f) == this)
- return;
- if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
- {
- typename aligned_storage<sizeof(__buf_)>::type __tempbuf;
- __base* __t = (__base*)&__tempbuf;
- __f_->__clone(__t);
- __f_->destroy();
- __f_ = 0;
- __f.__f_->__clone((__base*)&__buf_);
- __f.__f_->destroy();
- __f.__f_ = 0;
- __f_ = (__base*)&__buf_;
- __t->__clone((__base*)&__f.__buf_);
- __t->destroy();
- __f.__f_ = (__base*)&__f.__buf_;
- }
- else if (__f_ == (__base*)&__buf_)
- {
- __f_->__clone((__base*)&__f.__buf_);
- __f_->destroy();
- __f_ = __f.__f_;
- __f.__f_ = (__base*)&__f.__buf_;
- }
- else if (__f.__f_ == (__base*)&__f.__buf_)
- {
- __f.__f_->__clone((__base*)&__buf_);
- __f.__f_->destroy();
- __f.__f_ = __f_;
- __f_ = (__base*)&__buf_;
- }
- else
- _VSTD::swap(__f_, __f.__f_);
-}
-
-template<class _Rp, class _A0, class _A1>
-_Rp
-function<_Rp(_A0, _A1)>::operator()(_A0 __a0, _A1 __a1) const
-{
- if (__f_ == 0)
- __throw_bad_function_call();
- return (*__f_)(__a0, __a1);
-}
-
-#ifndef _LIBCPP_NO_RTTI
-
-template<class _Rp, class _A0, class _A1>
-const std::type_info&
-function<_Rp(_A0, _A1)>::target_type() const
-{
- if (__f_ == 0)
- return typeid(void);
- return __f_->target_type();
-}
-
-template<class _Rp, class _A0, class _A1>
-template <typename _Tp>
-_Tp*
-function<_Rp(_A0, _A1)>::target()
-{
- if (__f_ == 0)
- return (_Tp*)0;
- return (_Tp*) const_cast<void *>(__f_->target(typeid(_Tp)));
-}
-
-template<class _Rp, class _A0, class _A1>
-template <typename _Tp>
-const _Tp*
-function<_Rp(_A0, _A1)>::target() const
-{
- if (__f_ == 0)
- return (const _Tp*)0;
- return (const _Tp*)__f_->target(typeid(_Tp));
-}
-
-#endif // _LIBCPP_NO_RTTI
-
-template<class _Rp, class _A0, class _A1, class _A2>
-class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0, _A1, _A2)>
-{
- typedef __function::__base<_Rp(_A0, _A1, _A2)> __base;
- aligned_storage<3*sizeof(void*)>::type __buf_;
- __base* __f_;
-
-public:
- typedef _Rp result_type;
-
- // 20.7.16.2.1, construct/copy/destroy:
- _LIBCPP_INLINE_VISIBILITY explicit function() : __f_(0) {}
- _LIBCPP_INLINE_VISIBILITY function(nullptr_t) : __f_(0) {}
- function(const function&);
- template<class _Fp>
- function(_Fp,
- typename enable_if<!is_integral<_Fp>::value>::type* = 0);
-
- template<class _Alloc>
- _LIBCPP_INLINE_VISIBILITY
- function(allocator_arg_t, const _Alloc&) : __f_(0) {}
- template<class _Alloc>
- _LIBCPP_INLINE_VISIBILITY
- function(allocator_arg_t, const _Alloc&, nullptr_t) : __f_(0) {}
- template<class _Alloc>
- function(allocator_arg_t, const _Alloc&, const function&);
- template<class _Fp, class _Alloc>
- function(allocator_arg_t, const _Alloc& __a, _Fp __f,
- typename enable_if<!is_integral<_Fp>::value>::type* = 0);
-
- function& operator=(const function&);
- function& operator=(nullptr_t);
- template<class _Fp>
- typename enable_if
- <
- !is_integral<_Fp>::value,
- function&
- >::type
- operator=(_Fp);
-
- ~function();
-
- // 20.7.16.2.2, function modifiers:
- void swap(function&);
- template<class _Fp, class _Alloc>
- _LIBCPP_INLINE_VISIBILITY
- void assign(_Fp __f, const _Alloc& __a)
- {function(allocator_arg, __a, __f).swap(*this);}
-
- // 20.7.16.2.3, function capacity:
- _LIBCPP_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
-
- template<class _R2, class _B0, class _B1, class _B2>
- bool operator==(const function<_R2(_B0, _B1, _B2)>&) const = delete;
- template<class _R2, class _B0, class _B1, class _B2>
- bool operator!=(const function<_R2(_B0, _B1, _B2)>&) const = delete;
-
- // 20.7.16.2.4, function invocation:
- _Rp operator()(_A0, _A1, _A2) const;
-
-#ifndef _LIBCPP_NO_RTTI
- // 20.7.16.2.5, function target access:
- const std::type_info& target_type() const;
- template <typename _Tp> _Tp* target();
- template <typename _Tp> const _Tp* target() const;
-#endif // _LIBCPP_NO_RTTI
-};
-
-template<class _Rp, class _A0, class _A1, class _A2>
-function<_Rp(_A0, _A1, _A2)>::function(const function& __f)
-{
- if (__f.__f_ == 0)
- __f_ = 0;
- else if (__f.__f_ == (const __base*)&__f.__buf_)
- {
- __f_ = (__base*)&__buf_;
- __f.__f_->__clone(__f_);
- }
- else
- __f_ = __f.__f_->__clone();
-}
-
-template<class _Rp, class _A0, class _A1, class _A2>
-template<class _Alloc>
-function<_Rp(_A0, _A1, _A2)>::function(allocator_arg_t, const _Alloc&,
- const function& __f)
-{
- if (__f.__f_ == 0)
- __f_ = 0;
- else if (__f.__f_ == (const __base*)&__f.__buf_)
- {
- __f_ = (__base*)&__buf_;
- __f.__f_->__clone(__f_);
- }
- else
- __f_ = __f.__f_->__clone();
-}
-
-template<class _Rp, class _A0, class _A1, class _A2>
-template <class _Fp>
-function<_Rp(_A0, _A1, _A2)>::function(_Fp __f,
- typename enable_if<!is_integral<_Fp>::value>::type*)
- : __f_(0)
-{
- if (__function::__not_null(__f))
- {
- typedef __function::__func<_Fp, allocator<_Fp>, _Rp(_A0, _A1, _A2)> _FF;
- if (sizeof(_FF) <= sizeof(__buf_))
- {
- __f_ = (__base*)&__buf_;
- ::new ((void*)__f_) _FF(__f);
- }
- else
- {
- typedef allocator<_FF> _Ap;
- _Ap __a;
- typedef __allocator_destructor<_Ap> _Dp;
- unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
- ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a));
- __f_ = __hold.release();
- }
- }
-}
-
-template<class _Rp, class _A0, class _A1, class _A2>
-template <class _Fp, class _Alloc>
-function<_Rp(_A0, _A1, _A2)>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f,
- typename enable_if<!is_integral<_Fp>::value>::type*)
- : __f_(0)
-{
- typedef allocator_traits<_Alloc> __alloc_traits;
- if (__function::__not_null(__f))
- {
- typedef __function::__func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)> _FF;
- if (sizeof(_FF) <= sizeof(__buf_))
- {
- __f_ = (__base*)&__buf_;
- ::new ((void*)__f_) _FF(__f, __a0);
- }
- else
- {
- typedef typename __rebind_alloc_helper<__alloc_traits, _FF>::type _Ap;
- _Ap __a(__a0);
- typedef __allocator_destructor<_Ap> _Dp;
- unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
- ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a));
- __f_ = __hold.release();
- }
- }
-}
-
-template<class _Rp, class _A0, class _A1, class _A2>
-function<_Rp(_A0, _A1, _A2)>&
-function<_Rp(_A0, _A1, _A2)>::operator=(const function& __f)
-{
- if (__f)
- function(__f).swap(*this);
- else
- *this = nullptr;
- return *this;
-}
-
-template<class _Rp, class _A0, class _A1, class _A2>
-function<_Rp(_A0, _A1, _A2)>&
-function<_Rp(_A0, _A1, _A2)>::operator=(nullptr_t)
-{
- __base* __t = __f_;
- __f_ = 0;
- if (__t == (__base*)&__buf_)
- __t->destroy();
- else if (__t)
- __t->destroy_deallocate();
- return *this;
-}
-
-template<class _Rp, class _A0, class _A1, class _A2>
-template <class _Fp>
-typename enable_if
-<
- !is_integral<_Fp>::value,
- function<_Rp(_A0, _A1, _A2)>&
->::type
-function<_Rp(_A0, _A1, _A2)>::operator=(_Fp __f)
-{
- function(_VSTD::move(__f)).swap(*this);
- return *this;
-}
-
-template<class _Rp, class _A0, class _A1, class _A2>
-function<_Rp(_A0, _A1, _A2)>::~function()
-{
- if (__f_ == (__base*)&__buf_)
- __f_->destroy();
- else if (__f_)
- __f_->destroy_deallocate();
-}
-
-template<class _Rp, class _A0, class _A1, class _A2>
-void
-function<_Rp(_A0, _A1, _A2)>::swap(function& __f)
-{
- if (_VSTD::addressof(__f) == this)
- return;
- if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
- {
- typename aligned_storage<sizeof(__buf_)>::type __tempbuf;
- __base* __t = (__base*)&__tempbuf;
- __f_->__clone(__t);
- __f_->destroy();
- __f_ = 0;
- __f.__f_->__clone((__base*)&__buf_);
- __f.__f_->destroy();
- __f.__f_ = 0;
- __f_ = (__base*)&__buf_;
- __t->__clone((__base*)&__f.__buf_);
- __t->destroy();
- __f.__f_ = (__base*)&__f.__buf_;
- }
- else if (__f_ == (__base*)&__buf_)
- {
- __f_->__clone((__base*)&__f.__buf_);
- __f_->destroy();
- __f_ = __f.__f_;
- __f.__f_ = (__base*)&__f.__buf_;
- }
- else if (__f.__f_ == (__base*)&__f.__buf_)
- {
- __f.__f_->__clone((__base*)&__buf_);
- __f.__f_->destroy();
- __f.__f_ = __f_;
- __f_ = (__base*)&__buf_;
- }
- else
- _VSTD::swap(__f_, __f.__f_);
-}
-
-template<class _Rp, class _A0, class _A1, class _A2>
-_Rp
-function<_Rp(_A0, _A1, _A2)>::operator()(_A0 __a0, _A1 __a1, _A2 __a2) const
-{
- if (__f_ == 0)
- __throw_bad_function_call();
- return (*__f_)(__a0, __a1, __a2);
-}
-
-#ifndef _LIBCPP_NO_RTTI
-
-template<class _Rp, class _A0, class _A1, class _A2>
-const std::type_info&
-function<_Rp(_A0, _A1, _A2)>::target_type() const
-{
- if (__f_ == 0)
- return typeid(void);
- return __f_->target_type();
-}
-
-template<class _Rp, class _A0, class _A1, class _A2>
-template <typename _Tp>
-_Tp*
-function<_Rp(_A0, _A1, _A2)>::target()
-{
- if (__f_ == 0)
- return (_Tp*)0;
- return (_Tp*) const_cast<void *>(__f_->target(typeid(_Tp)));
-}
-
-template<class _Rp, class _A0, class _A1, class _A2>
-template <typename _Tp>
-const _Tp*
-function<_Rp(_A0, _A1, _A2)>::target() const
-{
- if (__f_ == 0)
- return (const _Tp*)0;
- return (const _Tp*)__f_->target(typeid(_Tp));
-}
-
-#endif // _LIBCPP_NO_RTTI
-
-template <class _Fp>
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator==(const function<_Fp>& __f, nullptr_t) {return !__f;}
-
-template <class _Fp>
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator==(nullptr_t, const function<_Fp>& __f) {return !__f;}
-
-template <class _Fp>
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator!=(const function<_Fp>& __f, nullptr_t) {return (bool)__f;}
-
-template <class _Fp>
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator!=(nullptr_t, const function<_Fp>& __f) {return (bool)__f;}
-
-template <class _Fp>
-inline _LIBCPP_INLINE_VISIBILITY
-void
-swap(function<_Fp>& __x, function<_Fp>& __y)
-{return __x.swap(__y);}
+_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_CXX03_LANG
-_LIBCPP_END_NAMESPACE_STD
-
#endif // _LIBCPP___FUNCTIONAL_FUNCTION_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/hash.h b/contrib/libs/cxxsupp/libcxx/include/__functional/hash.h
index 8a11931288..041730dfb6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/hash.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/hash.h
@@ -11,7 +11,8 @@
#include <__config>
#include <__functional/unary_function.h>
-#include <__tuple>
+#include <__fwd/hash.h>
+#include <__tuple/sfinae_helpers.h>
#include <__utility/forward.h>
#include <__utility/move.h>
#include <__utility/pair.h>
@@ -134,7 +135,7 @@ struct __murmur2_or_cityhash<_Size, 64>
if (__len >= 4) {
const uint32_t __a = __loadword<uint32_t>(__s);
const uint32_t __b = __loadword<uint32_t>(__s + __len - 4);
- return __hash_len_16(__len + (__a << 3), __b);
+ return __hash_len_16(__len + (static_cast<_Size>(__a) << 3), __b);
}
if (__len > 0) {
const unsigned char __a = static_cast<unsigned char>(__s[0]);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/invoke.h b/contrib/libs/cxxsupp/libcxx/include/__functional/invoke.h
index d56a0accdb..fdbbce029e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/invoke.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/invoke.h
@@ -248,7 +248,7 @@ struct __member_pointer_traits_imp<_Rp _Class::*, false, true>
template <class _MP>
struct __member_pointer_traits
- : public __member_pointer_traits_imp<typename remove_cv<_MP>::type,
+ : public __member_pointer_traits_imp<__remove_cv_t<_MP>,
is_member_function_pointer<_MP>::value,
is_member_object_pointer<_MP>::value>
{
@@ -406,10 +406,10 @@ struct __invokable_r
// or incomplete array types as required by the standard.
using _Result = decltype(__try_call<_Fp, _Args...>(0));
- using type = typename conditional<
+ using type = __conditional_t<
_IsNotSame<_Result, __nat>::value,
- typename conditional< is_void<_Ret>::value, true_type, __is_core_convertible<_Result, _Ret> >::type,
- false_type >::type;
+ __conditional_t<is_void<_Ret>::value, true_type, __is_core_convertible<_Result, _Ret> >,
+ false_type>;
static const bool value = type::value;
};
template <class _Fp, class ..._Args>
@@ -524,7 +524,7 @@ template <class _Fn, class... _Args>
using invoke_result_t = typename invoke_result<_Fn, _Args...>::type;
template <class _Fn, class ..._Args>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 invoke_result_t<_Fn, _Args...>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 invoke_result_t<_Fn, _Args...>
invoke(_Fn&& __f, _Args&&... __args)
noexcept(is_nothrow_invocable_v<_Fn, _Args...>)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/is_transparent.h b/contrib/libs/cxxsupp/libcxx/include/__functional/is_transparent.h
index 74326c76c1..c7a0ee9ee7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/is_transparent.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/is_transparent.h
@@ -25,8 +25,7 @@ template <class _Tp, class, class = void>
struct __is_transparent : false_type {};
template <class _Tp, class _Up>
-struct __is_transparent<_Tp, _Up,
- typename __void_t<typename _Tp::is_transparent>::type>
+struct __is_transparent<_Tp, _Up, __void_t<typename _Tp::is_transparent> >
: true_type {};
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/mem_fn.h b/contrib/libs/cxxsupp/libcxx/include/__functional/mem_fn.h
index a5818b3f01..8b51627079 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/mem_fn.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/mem_fn.h
@@ -33,12 +33,12 @@ private:
type __f_;
public:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__mem_fn(type __f) _NOEXCEPT : __f_(__f) {}
// invoke
template <class... _ArgTypes>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename __invoke_return<type, _ArgTypes...>::type
operator() (_ArgTypes&&... __args) const {
@@ -47,7 +47,7 @@ public:
};
template<class _Rp, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__mem_fn<_Rp _Tp::*>
mem_fn(_Rp _Tp::* __pm) _NOEXCEPT
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/not_fn.h b/contrib/libs/cxxsupp/libcxx/include/__functional/not_fn.h
index b5c415c25c..79d9a8710b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/not_fn.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/not_fn.h
@@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
struct __not_fn_op {
template <class... _Args>
_LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_AFTER_CXX17 auto operator()(_Args&&... __args) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 auto operator()(_Args&&... __args) const
noexcept(noexcept(!_VSTD::invoke(_VSTD::forward<_Args>(__args)...)))
-> decltype( !_VSTD::invoke(_VSTD::forward<_Args>(__args)...))
{ return !_VSTD::invoke(_VSTD::forward<_Args>(__args)...); }
@@ -43,7 +43,7 @@ template <class _Fn, class = enable_if_t<
is_move_constructible_v<decay_t<_Fn>>
>>
_LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_AFTER_CXX17 auto not_fn(_Fn&& __f) {
+_LIBCPP_CONSTEXPR_SINCE_CXX20 auto not_fn(_Fn&& __f) {
return __not_fn_t<decay_t<_Fn>>(_VSTD::forward<_Fn>(__f));
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/operations.h b/contrib/libs/cxxsupp/libcxx/include/__functional/operations.h
index 1c73c999db..8a781efbdb 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/operations.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/operations.h
@@ -32,17 +32,18 @@ struct _LIBCPP_TEMPLATE_VIS plus
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x + __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(plus);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS plus<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u))
@@ -60,17 +61,18 @@ struct _LIBCPP_TEMPLATE_VIS minus
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x - __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(minus);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS minus<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u))
@@ -88,17 +90,18 @@ struct _LIBCPP_TEMPLATE_VIS multiplies
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x * __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(multiplies);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS multiplies<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u))
@@ -116,17 +119,18 @@ struct _LIBCPP_TEMPLATE_VIS divides
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x / __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(divides);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS divides<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u))
@@ -144,17 +148,18 @@ struct _LIBCPP_TEMPLATE_VIS modulus
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x % __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(modulus);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS modulus<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u))
@@ -172,17 +177,18 @@ struct _LIBCPP_TEMPLATE_VIS negate
: __unary_function<_Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return -__x;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(negate);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS negate<void>
{
template <class _Tp>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_Tp&& __x) const
noexcept(noexcept(- _VSTD::forward<_Tp>(__x)))
-> decltype( - _VSTD::forward<_Tp>(__x))
@@ -202,17 +208,18 @@ struct _LIBCPP_TEMPLATE_VIS bit_and
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x & __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_and);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS bit_and<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u))
@@ -226,16 +233,17 @@ template <class _Tp = void>
struct _LIBCPP_TEMPLATE_VIS bit_not
: __unary_function<_Tp, _Tp>
{
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return ~__x;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_not);
template <>
struct _LIBCPP_TEMPLATE_VIS bit_not<void>
{
template <class _Tp>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_Tp&& __x) const
noexcept(noexcept(~_VSTD::forward<_Tp>(__x)))
-> decltype( ~_VSTD::forward<_Tp>(__x))
@@ -253,17 +261,18 @@ struct _LIBCPP_TEMPLATE_VIS bit_or
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x | __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_or);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS bit_or<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u))
@@ -281,17 +290,18 @@ struct _LIBCPP_TEMPLATE_VIS bit_xor
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x ^ __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_xor);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS bit_xor<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u))
@@ -311,17 +321,18 @@ struct _LIBCPP_TEMPLATE_VIS equal_to
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x == __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(equal_to);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS equal_to<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u))
@@ -339,17 +350,18 @@ struct _LIBCPP_TEMPLATE_VIS not_equal_to
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x != __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(not_equal_to);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS not_equal_to<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u))
@@ -367,17 +379,18 @@ struct _LIBCPP_TEMPLATE_VIS less
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x < __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS less<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u))
@@ -395,17 +408,18 @@ struct _LIBCPP_TEMPLATE_VIS less_equal
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x <= __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less_equal);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS less_equal<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u))
@@ -423,17 +437,18 @@ struct _LIBCPP_TEMPLATE_VIS greater_equal
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x >= __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater_equal);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS greater_equal<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u))
@@ -451,17 +466,18 @@ struct _LIBCPP_TEMPLATE_VIS greater
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x > __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS greater<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u))
@@ -481,17 +497,18 @@ struct _LIBCPP_TEMPLATE_VIS logical_and
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x && __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_and);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS logical_and<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u))
@@ -509,17 +526,18 @@ struct _LIBCPP_TEMPLATE_VIS logical_not
: __unary_function<_Tp, bool>
{
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x) const
{return !__x;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_not);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS logical_not<void>
{
template <class _Tp>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_Tp&& __x) const
noexcept(noexcept(!_VSTD::forward<_Tp>(__x)))
-> decltype( !_VSTD::forward<_Tp>(__x))
@@ -537,17 +555,18 @@ struct _LIBCPP_TEMPLATE_VIS logical_or
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x || __y;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_or);
#if _LIBCPP_STD_VER > 11
template <>
struct _LIBCPP_TEMPLATE_VIS logical_or<void>
{
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u))
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h b/contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h
index 3f63a86731..87081dd56a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h
@@ -10,9 +10,10 @@
#ifndef _LIBCPP___FUNCTIONAL_RANGES_OPERATIONS_H
#define _LIBCPP___FUNCTIONAL_RANGES_OPERATIONS_H
+#include <__concepts/equality_comparable.h>
+#include <__concepts/totally_ordered.h>
#include <__config>
#include <__utility/forward.h>
-#include <concepts>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/reference_wrapper.h b/contrib/libs/cxxsupp/libcxx/include/__functional/reference_wrapper.h
index 8245e3a047..6659825818 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/reference_wrapper.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/reference_wrapper.h
@@ -36,21 +36,21 @@ private:
public:
template <class _Up, class = __enable_if_t<!__is_same_uncvref<_Up, reference_wrapper>::value, decltype(__fun(declval<_Up>())) > >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(declval<_Up>()))) {
type& __f = static_cast<_Up&&>(__u);
__f_ = _VSTD::addressof(__f);
}
// access
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
operator type&() const _NOEXCEPT {return *__f_;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
type& get() const _NOEXCEPT {return *__f_;}
// invoke
template <class... _ArgTypes>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename __invoke_of<type&, _ArgTypes...>::type
operator() (_ArgTypes&&... __args) const {
return std::__invoke(get(), std::forward<_ArgTypes>(__args)...);
@@ -63,7 +63,7 @@ reference_wrapper(_Tp&) -> reference_wrapper<_Tp>;
#endif
template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
reference_wrapper<_Tp>
ref(_Tp& __t) _NOEXCEPT
{
@@ -71,7 +71,7 @@ ref(_Tp& __t) _NOEXCEPT
}
template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
reference_wrapper<_Tp>
ref(reference_wrapper<_Tp> __t) _NOEXCEPT
{
@@ -79,7 +79,7 @@ ref(reference_wrapper<_Tp> __t) _NOEXCEPT
}
template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
reference_wrapper<const _Tp>
cref(const _Tp& __t) _NOEXCEPT
{
@@ -87,7 +87,7 @@ cref(const _Tp& __t) _NOEXCEPT
}
template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
reference_wrapper<const _Tp>
cref(reference_wrapper<_Tp> __t) _NOEXCEPT
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/unary_negate.h b/contrib/libs/cxxsupp/libcxx/include/__functional/unary_negate.h
index 7f081903fe..ab87e86d18 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/unary_negate.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/unary_negate.h
@@ -27,16 +27,16 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 unary_negate
{
_Predicate __pred_;
public:
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
explicit unary_negate(const _Predicate& __pred)
: __pred_(__pred) {}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const typename _Predicate::argument_type& __x) const
{return !__pred_(__x);}
};
template <class _Predicate>
-_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
unary_negate<_Predicate>
not1(const _Predicate& __pred) {return unary_negate<_Predicate>(__pred);}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__fwd/array.h b/contrib/libs/cxxsupp/libcxx/include/__fwd/array.h
new file mode 100644
index 0000000000..9a79effb61
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__fwd/array.h
@@ -0,0 +1,26 @@
+//===---------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===---------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___FWD_ARRAY_H
+#define _LIBCPP___FWD_ARRAY_H
+
+#include <__config>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _Tp, size_t _Size>
+struct _LIBCPP_TEMPLATE_VIS array;
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___FWD_ARRAY_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__fwd/get.h b/contrib/libs/cxxsupp/libcxx/include/__fwd/get.h
new file mode 100644
index 0000000000..8162403898
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__fwd/get.h
@@ -0,0 +1,95 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___FWD_GET_H
+#define _LIBCPP___FWD_GET_H
+
+#include <__config>
+#include <__fwd/array.h>
+#include <__fwd/pair.h>
+#include <__fwd/tuple.h>
+#include <__tuple/tuple_element.h>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#ifndef _LIBCPP_CXX03_LANG
+
+template <size_t _Ip, class ..._Tp>
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+typename tuple_element<_Ip, tuple<_Tp...> >::type&
+get(tuple<_Tp...>&) _NOEXCEPT;
+
+template <size_t _Ip, class ..._Tp>
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+const typename tuple_element<_Ip, tuple<_Tp...> >::type&
+get(const tuple<_Tp...>&) _NOEXCEPT;
+
+template <size_t _Ip, class ..._Tp>
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+typename tuple_element<_Ip, tuple<_Tp...> >::type&&
+get(tuple<_Tp...>&&) _NOEXCEPT;
+
+template <size_t _Ip, class ..._Tp>
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
+get(const tuple<_Tp...>&&) _NOEXCEPT;
+
+#endif //_LIBCPP_CXX03_LANG
+
+template <size_t _Ip, class _T1, class _T2>
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+typename tuple_element<_Ip, pair<_T1, _T2> >::type&
+get(pair<_T1, _T2>&) _NOEXCEPT;
+
+template <size_t _Ip, class _T1, class _T2>
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
+get(const pair<_T1, _T2>&) _NOEXCEPT;
+
+#ifndef _LIBCPP_CXX03_LANG
+template <size_t _Ip, class _T1, class _T2>
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
+get(pair<_T1, _T2>&&) _NOEXCEPT;
+
+template <size_t _Ip, class _T1, class _T2>
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+const typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
+get(const pair<_T1, _T2>&&) _NOEXCEPT;
+#endif
+
+template <size_t _Ip, class _Tp, size_t _Size>
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+_Tp&
+get(array<_Tp, _Size>&) _NOEXCEPT;
+
+template <size_t _Ip, class _Tp, size_t _Size>
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+const _Tp&
+get(const array<_Tp, _Size>&) _NOEXCEPT;
+
+#ifndef _LIBCPP_CXX03_LANG
+template <size_t _Ip, class _Tp, size_t _Size>
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+_Tp&&
+get(array<_Tp, _Size>&&) _NOEXCEPT;
+
+template <size_t _Ip, class _Tp, size_t _Size>
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+const _Tp&&
+get(const array<_Tp, _Size>&&) _NOEXCEPT;
+#endif
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___FWD_GET_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__fwd/hash.h b/contrib/libs/cxxsupp/libcxx/include/__fwd/hash.h
new file mode 100644
index 0000000000..af9eca876a
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__fwd/hash.h
@@ -0,0 +1,25 @@
+//===---------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===---------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___FWD_HASH_H
+#define _LIBCPP___FWD_HASH_H
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class>
+struct _LIBCPP_TEMPLATE_VIS hash;
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___FWD_HASH_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__fwd/memory_resource.h b/contrib/libs/cxxsupp/libcxx/include/__fwd/memory_resource.h
new file mode 100644
index 0000000000..718a9078d3
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__fwd/memory_resource.h
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___FWD_MEMORY_RESOURCE_H
+#define _LIBCPP___FWD_MEMORY_RESOURCE_H
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace pmr {
+template <class _ValueType>
+class _LIBCPP_TEMPLATE_VIS polymorphic_allocator;
+} // namespace pmr
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___FWD_MEMORY_RESOURCE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__fwd/pair.h b/contrib/libs/cxxsupp/libcxx/include/__fwd/pair.h
new file mode 100644
index 0000000000..3844014de3
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__fwd/pair.h
@@ -0,0 +1,25 @@
+//===---------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===---------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___FWD_PAIR_H
+#define _LIBCPP___FWD_PAIR_H
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class, class>
+struct _LIBCPP_TEMPLATE_VIS pair;
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___FWD_PAIR_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__fwd/span.h b/contrib/libs/cxxsupp/libcxx/include/__fwd/span.h
index f38b8cfa05..943cb13fa1 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__fwd/span.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__fwd/span.h
@@ -7,8 +7,8 @@
//
//===---------------------------------------------------------------------===//
-#ifndef _LIBCPP_FWD_SPAN_H
-#define _LIBCPP_FWD_SPAN_H
+#ifndef _LIBCPP___FWD_SPAN_H
+#define _LIBCPP___FWD_SPAN_H
#include <__config>
#include <cstddef>
@@ -34,4 +34,4 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP_FWD_SPAN_H
+#endif // _LIBCPP___FWD_SPAN_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__fwd/string.h b/contrib/libs/cxxsupp/libcxx/include/__fwd/string.h
new file mode 100644
index 0000000000..7ab5561b75
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__fwd/string.h
@@ -0,0 +1,110 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___FWD_STRING_H
+#define _LIBCPP___FWD_STRING_H
+
+#include <__config>
+#include <__fwd/memory_resource.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _CharT>
+struct _LIBCPP_TEMPLATE_VIS char_traits;
+template <>
+struct char_traits<char>;
+
+#ifndef _LIBCPP_HAS_NO_CHAR8_T
+template <>
+struct char_traits<char8_t>;
+#endif
+
+template <>
+struct char_traits<char16_t>;
+template <>
+struct char_traits<char32_t>;
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <>
+struct char_traits<wchar_t>;
+#endif
+
+template <class _Tp>
+class _LIBCPP_TEMPLATE_VIS allocator;
+
+template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
+class _LIBCPP_TEMPLATE_VIS basic_string;
+
+using string = basic_string<char>;
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+using wstring = basic_string<wchar_t>;
+#endif
+
+#ifndef _LIBCPP_HAS_NO_CHAR8_T
+using u8string = basic_string<char8_t>;
+#endif
+
+using u16string = basic_string<char16_t>;
+using u32string = basic_string<char32_t>;
+
+#if _LIBCPP_STD_VER >= 17
+
+namespace pmr {
+template <class _CharT, class _Traits = char_traits<_CharT>>
+using basic_string = std::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>;
+
+using string = basic_string<char>;
+
+# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+using wstring = basic_string<wchar_t>;
+# endif
+
+# ifndef _LIBCPP_HAS_NO_CHAR8_T
+using u8string = basic_string<char8_t>;
+# endif
+
+using u16string = basic_string<char16_t>;
+using u32string = basic_string<char32_t>;
+
+} // namespace pmr
+
+#endif // _LIBCPP_STD_VER >= 17
+
+// clang-format off
+template <class _CharT, class _Traits, class _Allocator>
+class _LIBCPP_PREFERRED_NAME(string)
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+ _LIBCPP_PREFERRED_NAME(wstring)
+#endif
+#ifndef _LIBCPP_HAS_NO_CHAR8_T
+ _LIBCPP_PREFERRED_NAME(u8string)
+#endif
+ _LIBCPP_PREFERRED_NAME(u16string)
+ _LIBCPP_PREFERRED_NAME(u32string)
+#if _LIBCPP_STD_VER >= 17
+ _LIBCPP_PREFERRED_NAME(pmr::string)
+# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+ _LIBCPP_PREFERRED_NAME(pmr::wstring)
+# endif
+# ifndef _LIBCPP_HAS_NO_CHAR8_T
+ _LIBCPP_PREFERRED_NAME(pmr::u8string)
+# endif
+ _LIBCPP_PREFERRED_NAME(pmr::u16string)
+ _LIBCPP_PREFERRED_NAME(pmr::u32string)
+#endif
+ basic_string;
+// clang-format on
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___FWD_STRING_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__fwd/string_view.h b/contrib/libs/cxxsupp/libcxx/include/__fwd/string_view.h
index e5e77b292a..4818990248 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__fwd/string_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__fwd/string_view.h
@@ -7,8 +7,8 @@
//
//===---------------------------------------------------------------------===//
-#ifndef _LIBCPP_FWD_STRING_VIEW_H
-#define _LIBCPP_FWD_STRING_VIEW_H
+#ifndef _LIBCPP___FWD_STRING_VIEW_H
+#define _LIBCPP___FWD_STRING_VIEW_H
#include <__config>
#include <iosfwd> // char_traits
@@ -32,6 +32,19 @@ typedef basic_string_view<char32_t> u32string_view;
typedef basic_string_view<wchar_t> wstring_view;
#endif
+// clang-format off
+template <class _CharT, class _Traits>
+class _LIBCPP_PREFERRED_NAME(string_view)
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+ _LIBCPP_PREFERRED_NAME(wstring_view)
+#endif
+#ifndef _LIBCPP_HAS_NO_CHAR8_T
+ _LIBCPP_PREFERRED_NAME(u8string_view)
+#endif
+ _LIBCPP_PREFERRED_NAME(u16string_view)
+ _LIBCPP_PREFERRED_NAME(u32string_view)
+ basic_string_view;
+// clang-format on
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_FWD_STRING_VIEW_H
+#endif // _LIBCPP___FWD_STRING_VIEW_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__fwd/tuple.h b/contrib/libs/cxxsupp/libcxx/include/__fwd/tuple.h
new file mode 100644
index 0000000000..16b3fabbb9
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__fwd/tuple.h
@@ -0,0 +1,29 @@
+//===---------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===---------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___FWD_TUPLE_H
+#define _LIBCPP___FWD_TUPLE_H
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#ifndef _LIBCPP_CXX03_LANG
+
+template <class...>
+class _LIBCPP_TEMPLATE_VIS tuple;
+
+#endif // _LIBCPP_CXX03_LANG
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___FWD_TUPLE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__hash_table b/contrib/libs/cxxsupp/libcxx/include/__hash_table
index 959ef7fe7d..d6af75e9e0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__hash_table
+++ b/contrib/libs/cxxsupp/libcxx/include/__hash_table
@@ -18,11 +18,20 @@
#include <__debug>
#include <__functional/hash.h>
#include <__iterator/iterator_traits.h>
+#include <__memory/addressof.h>
+#include <__memory/allocator_traits.h>
+#include <__memory/compressed_pair.h>
+#include <__memory/pointer_traits.h>
#include <__memory/swap_allocator.h>
+#include <__memory/unique_ptr.h>
+#include <__type_traits/can_extract_key.h>
+#include <__utility/forward.h>
+#include <__utility/move.h>
+#include <__utility/pair.h>
#include <__utility/swap.h>
#include <cmath>
+#include <cstring>
#include <initializer_list>
-#include <memory>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -48,7 +57,7 @@ template <class ..._Args>
struct __is_hash_value_type : false_type {};
template <class _One>
-struct __is_hash_value_type<_One> : __is_hash_value_type_imp<__uncvref_t<_One> > {};
+struct __is_hash_value_type<_One> : __is_hash_value_type_imp<__remove_cvref_t<_One> > {};
_LIBCPP_FUNC_VIS
size_t __next_prime(size_t __n);
@@ -58,16 +67,13 @@ struct __hash_node_base
{
typedef typename pointer_traits<_NodePtr>::element_type __node_type;
typedef __hash_node_base __first_node;
- typedef typename __rebind_pointer<_NodePtr, __first_node>::type __node_base_pointer;
+ typedef __rebind_pointer_t<_NodePtr, __first_node> __node_base_pointer;
typedef _NodePtr __node_pointer;
#if defined(_LIBCPP_ABI_FIX_UNORDERED_NODE_POINTER_UB)
typedef __node_base_pointer __next_pointer;
#else
- typedef typename conditional<
- is_pointer<__node_pointer>::value,
- __node_base_pointer,
- __node_pointer>::type __next_pointer;
+ typedef __conditional_t<is_pointer<__node_pointer>::value, __node_base_pointer, __node_pointer> __next_pointer;
#endif
__next_pointer __next_;
@@ -96,7 +102,7 @@ template <class _Tp, class _VoidPtr>
struct _LIBCPP_STANDALONE_DEBUG __hash_node
: public __hash_node_base
<
- typename __rebind_pointer<_VoidPtr, __hash_node<_Tp, _VoidPtr> >::type
+ __rebind_pointer_t<_VoidPtr, __hash_node<_Tp, _VoidPtr> >
>
{
typedef _Tp __node_value_type;
@@ -208,9 +214,9 @@ struct __hash_map_pointer_types {};
template <class _Tp, class _AllocPtr, class _KVTypes>
struct __hash_map_pointer_types<_Tp, _AllocPtr, _KVTypes, true> {
typedef typename _KVTypes::__map_value_type _Mv;
- typedef typename __rebind_pointer<_AllocPtr, _Mv>::type
+ typedef __rebind_pointer_t<_AllocPtr, _Mv>
__map_value_type_pointer;
- typedef typename __rebind_pointer<_AllocPtr, const _Mv>::type
+ typedef __rebind_pointer_t<_AllocPtr, const _Mv>
__const_map_value_type_pointer;
};
@@ -228,21 +234,21 @@ public:
typedef ptrdiff_t difference_type;
typedef size_t size_type;
- typedef typename __rebind_pointer<_NodePtr, void>::type __void_pointer;
+ typedef __rebind_pointer_t<_NodePtr, void> __void_pointer;
typedef typename pointer_traits<_NodePtr>::element_type __node_type;
typedef _NodePtr __node_pointer;
typedef __hash_node_base<__node_pointer> __node_base_type;
- typedef typename __rebind_pointer<_NodePtr, __node_base_type>::type
+ typedef __rebind_pointer_t<_NodePtr, __node_base_type>
__node_base_pointer;
typedef typename __node_base_type::__next_pointer __next_pointer;
typedef _Tp __node_value_type;
- typedef typename __rebind_pointer<_VoidPtr, __node_value_type>::type
+ typedef __rebind_pointer_t<_VoidPtr, __node_value_type>
__node_value_type_pointer;
- typedef typename __rebind_pointer<_VoidPtr, const __node_value_type>::type
+ typedef __rebind_pointer_t<_VoidPtr, const __node_value_type>
__const_node_value_type_pointer;
private:
@@ -250,7 +256,7 @@ private:
"_NodePtr should never be a pointer to const");
static_assert((is_same<typename pointer_traits<_VoidPtr>::element_type, void>::value),
"_VoidPtr does not point to unqualified void type");
- static_assert((is_same<typename __rebind_pointer<_VoidPtr, __node_type>::type,
+ static_assert((is_same<__rebind_pointer_t<_VoidPtr, __node_type>,
_NodePtr>::value), "_VoidPtr does not rebind to _NodePtr.");
};
@@ -269,7 +275,7 @@ struct __hash_node_types_from_iterator<__hash_const_local_iterator<_NodePtr> > :
template <class _NodeValueTp, class _VoidPtr>
struct __make_hash_node_types {
typedef __hash_node<_NodeValueTp, _VoidPtr> _NodeTp;
- typedef typename __rebind_pointer<_VoidPtr, _NodeTp>::type _NodePtr;
+ typedef __rebind_pointer_t<_VoidPtr, _NodeTp> _NodePtr;
typedef __hash_node_types<_NodePtr> type;
};
@@ -614,8 +620,8 @@ class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator
typedef pointer_traits<__node_pointer> __pointer_traits;
typedef typename __pointer_traits::element_type __node;
- typedef typename remove_const<__node>::type __non_const_node;
- typedef typename __rebind_pointer<__node_pointer, __non_const_node>::type
+ typedef __remove_const_t<__node> __non_const_node;
+ typedef __rebind_pointer_t<__node_pointer, __non_const_node>
__non_const_node_pointer;
public:
typedef __hash_local_iterator<__non_const_node_pointer>
@@ -892,7 +898,7 @@ public:
// Create __node
typedef typename _NodeTypes::__node_type __node;
- typedef typename __rebind_alloc_helper<__alloc_traits, __node>::type __node_allocator;
+ typedef __rebind_alloc<__alloc_traits, __node> __node_allocator;
typedef allocator_traits<__node_allocator> __node_traits;
typedef typename _NodeTypes::__void_pointer __void_pointer;
typedef typename _NodeTypes::__node_pointer __node_pointer;
@@ -907,15 +913,14 @@ private:
// the pointer using 'pointer_traits'.
static_assert((is_same<__node_pointer, typename __node_traits::pointer>::value),
"Allocator does not rebind pointers in a sane manner.");
- typedef typename __rebind_alloc_helper<__node_traits, __first_node>::type
- __node_base_allocator;
+ typedef __rebind_alloc<__node_traits, __first_node> __node_base_allocator;
typedef allocator_traits<__node_base_allocator> __node_base_traits;
static_assert((is_same<__node_base_pointer, typename __node_base_traits::pointer>::value),
"Allocator does not rebind pointers in a sane manner.");
private:
- typedef typename __rebind_alloc_helper<__node_traits, __next_pointer>::type __pointer_allocator;
+ typedef __rebind_alloc<__node_traits, __next_pointer> __pointer_allocator;
typedef __bucket_list_deallocator<__pointer_allocator> __bucket_list_deleter;
typedef unique_ptr<__next_pointer[], __bucket_list_deleter> __bucket_list;
typedef allocator_traits<__pointer_allocator> __pointer_alloc_traits;
@@ -2279,7 +2284,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__do_rehash(size_type __nbc)
else
{
__next_pointer __np = __cp;
- if _LIBCPP_CONSTEXPR_AFTER_CXX14 (!_UniqueKeys)
+ if _LIBCPP_CONSTEXPR_SINCE_CXX17 (!_UniqueKeys)
{
for (; __np->__next_ != nullptr &&
key_eq()(__cp->__upcast()->__value_,
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/access.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/access.h
index 7abd4c5573..0b8d523017 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/access.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/access.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, size_t _Np>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp*
begin(_Tp (&__array)[_Np])
{
@@ -28,7 +28,7 @@ begin(_Tp (&__array)[_Np])
}
template <class _Tp, size_t _Np>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp*
end(_Tp (&__array)[_Np])
{
@@ -38,7 +38,7 @@ end(_Tp (&__array)[_Np])
#if !defined(_LIBCPP_CXX03_LANG)
template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto
begin(_Cp& __c) -> decltype(__c.begin())
{
@@ -46,7 +46,7 @@ begin(_Cp& __c) -> decltype(__c.begin())
}
template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto
begin(const _Cp& __c) -> decltype(__c.begin())
{
@@ -54,7 +54,7 @@ begin(const _Cp& __c) -> decltype(__c.begin())
}
template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto
end(_Cp& __c) -> decltype(__c.end())
{
@@ -62,7 +62,7 @@ end(_Cp& __c) -> decltype(__c.end())
}
template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto
end(const _Cp& __c) -> decltype(__c.end())
{
@@ -72,14 +72,14 @@ end(const _Cp& __c) -> decltype(__c.end())
#if _LIBCPP_STD_VER > 11
template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
auto cbegin(const _Cp& __c) -> decltype(_VSTD::begin(__c))
{
return _VSTD::begin(__c);
}
template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
auto cend(const _Cp& __c) -> decltype(_VSTD::end(__c))
{
return _VSTD::end(__c);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h
index 28f09773a2..e43e41873a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h
@@ -11,13 +11,15 @@
#define _LIBCPP___ITERATOR_ADVANCE_H
#include <__assert>
+#include <__concepts/assignable.h>
+#include <__concepts/same_as.h>
#include <__config>
#include <__iterator/concepts.h>
#include <__iterator/incrementable_traits.h>
#include <__iterator/iterator_traits.h>
+#include <__utility/convert_to_integral.h>
#include <__utility/move.h>
#include <__utility/unreachable.h>
-#include <concepts>
#include <cstdlib>
#include <limits>
#include <type_traits>
@@ -29,14 +31,14 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
void __advance(_InputIter& __i, typename iterator_traits<_InputIter>::difference_type __n, input_iterator_tag) {
for (; __n > 0; --__n)
++__i;
}
template <class _BiDirIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
void __advance(_BiDirIter& __i, typename iterator_traits<_BiDirIter>::difference_type __n, bidirectional_iterator_tag) {
if (__n >= 0)
for (; __n > 0; --__n)
@@ -47,7 +49,7 @@ void __advance(_BiDirIter& __i, typename iterator_traits<_BiDirIter>::difference
}
template <class _RandIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
void __advance(_RandIter& __i, typename iterator_traits<_RandIter>::difference_type __n, random_access_iterator_tag) {
__i += __n;
}
@@ -56,7 +58,7 @@ template <
class _InputIter, class _Distance,
class _IntegralDistance = decltype(_VSTD::__convert_to_integral(declval<_Distance>())),
class = __enable_if_t<is_integral<_IntegralDistance>::value> >
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
void advance(_InputIter& __i, _Distance __orig_n) {
typedef typename iterator_traits<_InputIter>::difference_type _Difference;
_Difference __n = static_cast<_Difference>(_VSTD::__convert_to_integral(__orig_n));
@@ -65,7 +67,7 @@ void advance(_InputIter& __i, _Distance __orig_n) {
_VSTD::__advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category());
}
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
// [range.iter.op.advance]
@@ -192,7 +194,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/back_insert_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/back_insert_iterator.h
index e9f9f2abec..4c00a7e397 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/back_insert_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/back_insert_iterator.h
@@ -45,22 +45,23 @@ public:
typedef void reference;
typedef _Container container_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit back_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator=(const typename _Container::value_type& __value)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit back_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator=(const typename _Container::value_type& __value)
{container->push_back(__value); return *this;}
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator=(typename _Container::value_type&& __value)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator=(typename _Container::value_type&& __value)
{container->push_back(_VSTD::move(__value)); return *this;}
#endif // _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator*() {return *this;}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator++() {return *this;}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator operator++(int) {return *this;}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator*() {return *this;}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator++() {return *this;}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator operator++(int) {return *this;}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Container* __get_container() const { return container; }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Container* __get_container() const { return container; }
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(back_insert_iterator);
template <class _Container>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
back_insert_iterator<_Container>
back_inserter(_Container& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/bounded_iter.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/bounded_iter.h
index 0e1944d974..071cbdac99 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/bounded_iter.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/bounded_iter.h
@@ -73,7 +73,7 @@ private:
//
// Since it is non-standard for iterators to have this constructor, ___bounded_iter must
// be created via `std::__make_bounded_iter`.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 explicit ___bounded_iter(
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit ___bounded_iter(
_Iterator __current, _Iterator __begin, _Iterator __end)
: __current_(__current), __begin_(__begin), __end_(__end) {
_LIBCPP_ASSERT(__begin <= __end, "___bounded_iter(current, begin, end): [begin, end) is not a valid range");
@@ -86,19 +86,19 @@ public:
// Dereference and indexing operations.
//
// These operations check that the iterator is dereferenceable, that is within [begin, end).
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference operator*() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator*() const _NOEXCEPT {
_LIBCPP_ASSERT(
__in_bounds(__current_), "___bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
return *__current_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 pointer operator->() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pointer operator->() const _NOEXCEPT {
_LIBCPP_ASSERT(
__in_bounds(__current_), "___bounded_iter::operator->: Attempt to dereference an out-of-range iterator");
return std::__to_address(__current_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference operator[](difference_type __n) const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator[](difference_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT(
__in_bounds(__current_ + __n), "___bounded_iter::operator[]: Attempt to index an iterator out-of-range");
return __current_[__n];
@@ -108,54 +108,54 @@ public:
//
// These operations do not check that the resulting iterator is within the bounds, since that
// would make it impossible to create a past-the-end iterator.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 ___bounded_iter& operator++() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 ___bounded_iter& operator++() _NOEXCEPT {
++__current_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 ___bounded_iter operator++(int) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 ___bounded_iter operator++(int) _NOEXCEPT {
___bounded_iter __tmp(*this);
++*this;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 ___bounded_iter& operator--() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 ___bounded_iter& operator--() _NOEXCEPT {
--__current_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 ___bounded_iter operator--(int) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 ___bounded_iter operator--(int) _NOEXCEPT {
___bounded_iter __tmp(*this);
--*this;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 ___bounded_iter& operator+=(difference_type __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 ___bounded_iter& operator+=(difference_type __n) _NOEXCEPT {
__current_ += __n;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 friend ___bounded_iter
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend ___bounded_iter
operator+(___bounded_iter const& __self, difference_type __n) _NOEXCEPT {
___bounded_iter __tmp(__self);
__tmp += __n;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 friend ___bounded_iter
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend ___bounded_iter
operator+(difference_type __n, ___bounded_iter const& __self) _NOEXCEPT {
___bounded_iter __tmp(__self);
__tmp += __n;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 ___bounded_iter& operator-=(difference_type __n) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 ___bounded_iter& operator-=(difference_type __n) _NOEXCEPT {
__current_ -= __n;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 friend ___bounded_iter
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend ___bounded_iter
operator-(___bounded_iter const& __self, difference_type __n) _NOEXCEPT {
___bounded_iter __tmp(__self);
__tmp -= __n;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 friend difference_type
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend difference_type
operator-(___bounded_iter const& __x, ___bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ - __y.__current_;
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h
index abcc0b675e..a1985c9287 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h
@@ -11,6 +11,13 @@
#define _LIBCPP___ITERATOR_COMMON_ITERATOR_H
#include <__assert>
+#include <__concepts/assignable.h>
+#include <__concepts/constructible.h>
+#include <__concepts/convertible_to.h>
+#include <__concepts/copyable.h>
+#include <__concepts/derived_from.h>
+#include <__concepts/equality_comparable.h>
+#include <__concepts/same_as.h>
#include <__config>
#include <__iterator/concepts.h>
#include <__iterator/incrementable_traits.h>
@@ -18,7 +25,6 @@
#include <__iterator/iter_swap.h>
#include <__iterator/iterator_traits.h>
#include <__iterator/readable_traits.h>
-#include <concepts>
#include <variant>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -147,6 +153,7 @@ public:
template<class _I2, sentinel_for<_Iter> _S2>
requires sentinel_for<_Sent, _I2>
+ _LIBCPP_HIDE_FROM_ABI
friend constexpr bool operator==(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
_LIBCPP_ASSERT(!__x.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
_LIBCPP_ASSERT(!__y.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
@@ -165,6 +172,7 @@ public:
template<class _I2, sentinel_for<_Iter> _S2>
requires sentinel_for<_Sent, _I2> && equality_comparable_with<_Iter, _I2>
+ _LIBCPP_HIDE_FROM_ABI
friend constexpr bool operator==(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
_LIBCPP_ASSERT(!__x.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
_LIBCPP_ASSERT(!__y.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
@@ -186,6 +194,7 @@ public:
template<sized_sentinel_for<_Iter> _I2, sized_sentinel_for<_Iter> _S2>
requires sized_sentinel_for<_Sent, _I2>
+ _LIBCPP_HIDE_FROM_ABI
friend constexpr iter_difference_t<_I2> operator-(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
_LIBCPP_ASSERT(!__x.__hold_.valueless_by_exception(), "Attempted to subtract from a valueless common_iterator");
_LIBCPP_ASSERT(!__y.__hold_.valueless_by_exception(), "Attempted to subtract a valueless common_iterator");
@@ -205,7 +214,7 @@ public:
return _VSTD::__unchecked_get<_Sent>(__x.__hold_) - _VSTD::__unchecked_get<_I2>(__y.__hold_);
}
- friend constexpr iter_rvalue_reference_t<_Iter> iter_move(const common_iterator& __i)
+ _LIBCPP_HIDE_FROM_ABI friend constexpr iter_rvalue_reference_t<_Iter> iter_move(const common_iterator& __i)
noexcept(noexcept(ranges::iter_move(declval<const _Iter&>())))
requires input_iterator<_Iter>
{
@@ -214,7 +223,7 @@ public:
}
template<indirectly_swappable<_Iter> _I2, class _S2>
- friend constexpr void iter_swap(const common_iterator& __x, const common_iterator<_I2, _S2>& __y)
+ _LIBCPP_HIDE_FROM_ABI friend constexpr void iter_swap(const common_iterator& __x, const common_iterator<_I2, _S2>& __y)
noexcept(noexcept(ranges::iter_swap(declval<const _Iter&>(), declval<const _I2&>())))
{
_LIBCPP_ASSERT(holds_alternative<_Iter>(__x.__hold_), "Attempted to iter_swap a non-dereferenceable common_iterator");
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/concepts.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/concepts.h
index bd68889333..246f84c7cf 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/concepts.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/concepts.h
@@ -10,6 +10,21 @@
#ifndef _LIBCPP___ITERATOR_CONCEPTS_H
#define _LIBCPP___ITERATOR_CONCEPTS_H
+#include <__concepts/arithmetic.h>
+#include <__concepts/assignable.h>
+#include <__concepts/common_reference_with.h>
+#include <__concepts/constructible.h>
+#include <__concepts/copyable.h>
+#include <__concepts/derived_from.h>
+#include <__concepts/equality_comparable.h>
+#include <__concepts/invocable.h>
+#include <__concepts/movable.h>
+#include <__concepts/predicate.h>
+#include <__concepts/regular.h>
+#include <__concepts/relation.h>
+#include <__concepts/same_as.h>
+#include <__concepts/semiregular.h>
+#include <__concepts/totally_ordered.h>
#include <__config>
#include <__iterator/incrementable_traits.h>
#include <__iterator/iter_move.h>
@@ -17,7 +32,6 @@
#include <__iterator/readable_traits.h>
#include <__memory/pointer_traits.h>
#include <__utility/forward.h>
-#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/counted_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/counted_iterator.h
index b0f5c66ecf..5edd9c9422 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/counted_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/counted_iterator.h
@@ -6,10 +6,16 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___ITERATOR_COUNTED_ITERATOR_H
#define _LIBCPP___ITERATOR_COUNTED_ITERATOR_H
#include <__assert>
+#include <__concepts/assignable.h>
+#include <__concepts/common_with.h>
+#include <__concepts/constructible.h>
+#include <__concepts/convertible_to.h>
+#include <__concepts/same_as.h>
#include <__config>
#include <__iterator/concepts.h>
#include <__iterator/default_sentinel.h>
@@ -21,7 +27,6 @@
#include <__memory/pointer_traits.h>
#include <__utility/move.h>
#include <compare>
-#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -263,7 +268,7 @@ public:
}
template<common_with<_Iter> _I2>
- friend constexpr strong_ordering operator<=>(
+ _LIBCPP_HIDE_FROM_ABI friend constexpr strong_ordering operator<=>(
const counted_iterator& __lhs, const counted_iterator<_I2>& __rhs)
{
return __rhs.__count_ <=> __lhs.__count_;
@@ -288,6 +293,7 @@ public:
return ranges::iter_swap(__x.__current_, __y.__current_);
}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(counted_iterator);
template<input_iterator _Iter>
requires same_as<_ITER_TRAITS<_Iter>, iterator_traits<_Iter>>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/distance.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/distance.h
index 8819078958..32e41331f6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/distance.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/distance.h
@@ -26,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
typename iterator_traits<_InputIter>::difference_type
__distance(_InputIter __first, _InputIter __last, input_iterator_tag)
{
@@ -37,7 +37,7 @@ __distance(_InputIter __first, _InputIter __last, input_iterator_tag)
}
template <class _RandIter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
typename iterator_traits<_RandIter>::difference_type
__distance(_RandIter __first, _RandIter __last, random_access_iterator_tag)
{
@@ -45,14 +45,14 @@ __distance(_RandIter __first, _RandIter __last, random_access_iterator_tag)
}
template <class _InputIter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
typename iterator_traits<_InputIter>::difference_type
distance(_InputIter __first, _InputIter __last)
{
return _VSTD::__distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
}
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
// [range.iter.op.distance]
@@ -75,7 +75,7 @@ struct __fn {
template<class _Ip, sized_sentinel_for<decay_t<_Ip>> _Sp>
_LIBCPP_HIDE_FROM_ABI
constexpr iter_difference_t<_Ip> operator()(_Ip&& __first, _Sp __last) const {
- if constexpr (sized_sentinel_for<_Sp, __uncvref_t<_Ip>>) {
+ if constexpr (sized_sentinel_for<_Sp, __remove_cvref_t<_Ip>>) {
return __last - __first;
} else {
return __last - decay_t<_Ip>(__first);
@@ -100,7 +100,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/front_insert_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/front_insert_iterator.h
index 9c8ec00282..e278359d87 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/front_insert_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/front_insert_iterator.h
@@ -45,20 +45,21 @@ public:
typedef void reference;
typedef _Container container_type;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit front_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator=(const typename _Container::value_type& __value)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit front_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator=(const typename _Container::value_type& __value)
{container->push_front(__value); return *this;}
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator=(typename _Container::value_type&& __value)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator=(typename _Container::value_type&& __value)
{container->push_front(_VSTD::move(__value)); return *this;}
#endif // _LIBCPP_CXX03_LANG
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator*() {return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator++() {return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator operator++(int) {return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator*() {return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator++() {return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator operator++(int) {return *this;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(front_insert_iterator);
template <class _Container>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
front_insert_iterator<_Container>
front_inserter(_Container& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/incrementable_traits.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/incrementable_traits.h
index e6a5ed720f..6f966ec4c7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/incrementable_traits.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/incrementable_traits.h
@@ -10,9 +10,9 @@
#ifndef _LIBCPP___ITERATOR_INCREMENTABLE_TRAITS_H
#define _LIBCPP___ITERATOR_INCREMENTABLE_TRAITS_H
+#include <__concepts/arithmetic.h>
#include <__config>
#include <__type_traits/is_primary_template.h>
-#include <concepts>
#include <cstddef>
#include <type_traits>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/insert_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/insert_iterator.h
index b35d8bf16a..ecaea61c61 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/insert_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/insert_iterator.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
template <class _Container>
using __insert_iterator_iter_t = ranges::iterator_t<_Container>;
#else
@@ -55,21 +55,21 @@ public:
typedef void reference;
typedef _Container container_type;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator(_Container& __x, __insert_iterator_iter_t<_Container> __i)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator(_Container& __x, __insert_iterator_iter_t<_Container> __i)
: container(_VSTD::addressof(__x)), iter(__i) {}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator=(const typename _Container::value_type& __value)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator=(const typename _Container::value_type& __value)
{iter = container->insert(iter, __value); ++iter; return *this;}
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator=(typename _Container::value_type&& __value)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator=(typename _Container::value_type&& __value)
{iter = container->insert(iter, _VSTD::move(__value)); ++iter; return *this;}
#endif // _LIBCPP_CXX03_LANG
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator*() {return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator++() {return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator++(int) {return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator*() {return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator++() {return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator++(int) {return *this;}
};
template <class _Container>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
insert_iterator<_Container>
inserter(_Container& __x, __insert_iterator_iter_t<_Container> __i)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_swap.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_swap.h
index 9e06464c36..78152e2d9a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_swap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_swap.h
@@ -6,9 +6,12 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___ITERATOR_ITER_SWAP_H
#define _LIBCPP___ITERATOR_ITER_SWAP_H
+#include <__concepts/class_or_enum.h>
+#include <__concepts/swappable.h>
#include <__config>
#include <__iterator/concepts.h>
#include <__iterator/iter_move.h>
@@ -16,7 +19,6 @@
#include <__iterator/readable_traits.h>
#include <__utility/forward.h>
#include <__utility/move.h>
-#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h
index 0cc64adc0d..b4cf072332 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h
@@ -10,10 +10,17 @@
#ifndef _LIBCPP___ITERATOR_ITERATOR_TRAITS_H
#define _LIBCPP___ITERATOR_ITERATOR_TRAITS_H
+#include <__concepts/arithmetic.h>
+#include <__concepts/constructible.h>
+#include <__concepts/convertible_to.h>
+#include <__concepts/copyable.h>
+#include <__concepts/equality_comparable.h>
+#include <__concepts/same_as.h>
+#include <__concepts/totally_ordered.h>
#include <__config>
+#include <__fwd/pair.h>
#include <__iterator/incrementable_traits.h>
#include <__iterator/readable_traits.h>
-#include <concepts>
#include <cstddef>
#include <type_traits>
@@ -107,11 +114,11 @@ struct __has_iterator_typedefs
{
private:
template <class _Up> static false_type __test(...);
- template <class _Up> static true_type __test(typename __void_t<typename _Up::iterator_category>::type* = 0,
- typename __void_t<typename _Up::difference_type>::type* = 0,
- typename __void_t<typename _Up::value_type>::type* = 0,
- typename __void_t<typename _Up::reference>::type* = 0,
- typename __void_t<typename _Up::pointer>::type* = 0);
+ template <class _Up> static true_type __test(__void_t<typename _Up::iterator_category>* = nullptr,
+ __void_t<typename _Up::difference_type>* = nullptr,
+ __void_t<typename _Up::value_type>* = nullptr,
+ __void_t<typename _Up::reference>* = nullptr,
+ __void_t<typename _Up::pointer>* = nullptr);
public:
static const bool value = decltype(__test<_Tp>(0,0,0,0,0))::value;
};
@@ -407,7 +414,7 @@ requires is_object_v<_Tp>
struct _LIBCPP_TEMPLATE_VIS iterator_traits<_Tp*>
{
typedef ptrdiff_t difference_type;
- typedef typename remove_cv<_Tp>::type value_type;
+ typedef __remove_cv_t<_Tp> value_type;
typedef _Tp* pointer;
typedef _Tp& reference;
typedef random_access_iterator_tag iterator_category;
@@ -492,7 +499,7 @@ template<class _InputIterator>
using __iter_value_type = typename iterator_traits<_InputIterator>::value_type;
template<class _InputIterator>
-using __iter_key_type = typename remove_const<typename iterator_traits<_InputIterator>::value_type::first_type>::type;
+using __iter_key_type = __remove_const_t<typename iterator_traits<_InputIterator>::value_type::first_type>;
template<class _InputIterator>
using __iter_mapped_type = typename iterator_traits<_InputIterator>::value_type::second_type;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/move_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/move_iterator.h
index 6be9f216db..b4f2f9ec3d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/move_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/move_iterator.h
@@ -82,18 +82,18 @@ public:
typedef typename iterator_traits<iterator_type>::reference __reference;
typedef typename conditional<
is_reference<__reference>::value,
- typename remove_reference<__reference>::type&&,
+ __libcpp_remove_reference_t<__reference>&&,
__reference
>::type reference;
#endif // _LIBCPP_STD_VER > 17
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
explicit move_iterator(_Iter __i) : __current_(std::move(__i)) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator& operator++() { ++__current_; return *this; }
- _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
pointer operator->() const { return __current_; }
#if _LIBCPP_STD_VER > 17
@@ -133,13 +133,13 @@ public:
_LIBCPP_HIDE_FROM_ABI constexpr
void operator++(int) { ++__current_; }
#else
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator() : __current_() {}
template <class _Up, class = __enable_if_t<
!is_same<_Up, _Iter>::value && is_convertible<const _Up&, _Iter>::value
> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator(const move_iterator<_Up>& __u) : __current_(__u.base()) {}
template <class _Up, class = __enable_if_t<
@@ -147,35 +147,35 @@ public:
is_convertible<const _Up&, _Iter>::value &&
is_assignable<_Iter&, const _Up&>::value
> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator& operator=(const move_iterator<_Up>& __u) {
__current_ = __u.base();
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
_Iter base() const { return __current_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
reference operator*() const { return static_cast<reference>(*__current_); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
reference operator[](difference_type __n) const { return static_cast<reference>(__current_[__n]); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator operator++(int) { move_iterator __tmp(*this); ++__current_; return __tmp; }
#endif // _LIBCPP_STD_VER > 17
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator& operator--() { --__current_; return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator operator--(int) { move_iterator __tmp(*this); --__current_; return __tmp; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator operator+(difference_type __n) const { return move_iterator(__current_ + __n); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator& operator+=(difference_type __n) { __current_ += __n; return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator operator-(difference_type __n) const { return move_iterator(__current_ - __n); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator& operator-=(difference_type __n) { __current_ -= __n; return *this; }
#if _LIBCPP_STD_VER > 17
@@ -222,9 +222,10 @@ private:
_Iter __current_;
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(move_iterator);
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
bool operator==(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
{
return __x.base() == __y.base();
@@ -232,7 +233,7 @@ bool operator==(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& _
#if _LIBCPP_STD_VER <= 17
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
bool operator!=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
{
return __x.base() != __y.base();
@@ -240,28 +241,28 @@ bool operator!=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& _
#endif // _LIBCPP_STD_VER <= 17
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
bool operator<(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
{
return __x.base() < __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
bool operator>(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
{
return __x.base() > __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
bool operator<=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
{
return __x.base() <= __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
bool operator>=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
{
return __x.base() >= __y.base();
@@ -279,7 +280,7 @@ auto operator<=>(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>&
#ifndef _LIBCPP_CXX03_LANG
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
auto operator-(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
-> decltype(__x.base() - __y.base())
{
@@ -305,7 +306,7 @@ move_iterator<_Iter> operator+(iter_difference_t<_Iter> __n, const move_iterator
}
#else
template <class _Iter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator<_Iter>
operator+(typename move_iterator<_Iter>::difference_type __n, const move_iterator<_Iter>& __x)
{
@@ -314,7 +315,7 @@ operator+(typename move_iterator<_Iter>::difference_type __n, const move_iterato
#endif // _LIBCPP_STD_VER > 17
template <class _Iter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator<_Iter>
make_move_iterator(_Iter __i)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/next.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/next.h
index 0d48165168..13de2f3f73 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/next.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/next.h
@@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
typename enable_if<__is_cpp17_input_iterator<_InputIter>::value, _InputIter>::type
next(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) {
_LIBCPP_ASSERT(__n >= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value,
@@ -35,7 +35,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
return __x;
}
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
// [range.iter.op.next]
@@ -77,7 +77,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/ostreambuf_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/ostreambuf_iterator.h
index 6da7598ed2..b75f7b6e84 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/ostreambuf_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/ostreambuf_iterator.h
@@ -65,7 +65,7 @@ public:
template <class _Ch, class _Tr>
friend
- _LIBCPP_HIDDEN
+ _LIBCPP_HIDE_FROM_ABI
ostreambuf_iterator<_Ch, _Tr>
__pad_and_output(ostreambuf_iterator<_Ch, _Tr> __s,
const _Ch* __ob, const _Ch* __op, const _Ch* __oe,
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/prev.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/prev.h
index 42d176ff65..a1d0bc0dbb 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/prev.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/prev.h
@@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
typename enable_if<__is_cpp17_input_iterator<_InputIter>::value, _InputIter>::type
prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) {
_LIBCPP_ASSERT(__n <= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value,
@@ -34,7 +34,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
return __x;
}
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
// [range.iter.op.prev]
@@ -70,7 +70,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/projected.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/projected.h
index 53526bd8e7..3a08b58b8b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/projected.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/projected.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___ITERATOR_PROJECTED_H
#define _LIBCPP___ITERATOR_PROJECTED_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/readable_traits.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/readable_traits.h
index 500b46ac14..dc818d8a23 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/readable_traits.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/readable_traits.h
@@ -10,8 +10,8 @@
#ifndef _LIBCPP___ITERATOR_READABLE_TRAITS_H
#define _LIBCPP___ITERATOR_READABLE_TRAITS_H
+#include <__concepts/same_as.h>
#include <__config>
-#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_access.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_access.h
index 40c266378d..79b599c47c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_access.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_access.h
@@ -24,70 +24,70 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 11
template <class _Tp, size_t _Np>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator<_Tp*> rbegin(_Tp (&__array)[_Np])
{
return reverse_iterator<_Tp*>(__array + _Np);
}
template <class _Tp, size_t _Np>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator<_Tp*> rend(_Tp (&__array)[_Np])
{
return reverse_iterator<_Tp*>(__array);
}
template <class _Ep>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator<const _Ep*> rbegin(initializer_list<_Ep> __il)
{
return reverse_iterator<const _Ep*>(__il.end());
}
template <class _Ep>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator<const _Ep*> rend(initializer_list<_Ep> __il)
{
return reverse_iterator<const _Ep*>(__il.begin());
}
template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto rbegin(_Cp& __c) -> decltype(__c.rbegin())
{
return __c.rbegin();
}
template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto rbegin(const _Cp& __c) -> decltype(__c.rbegin())
{
return __c.rbegin();
}
template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto rend(_Cp& __c) -> decltype(__c.rend())
{
return __c.rend();
}
template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto rend(const _Cp& __c) -> decltype(__c.rend())
{
return __c.rend();
}
template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto crbegin(const _Cp& __c) -> decltype(_VSTD::rbegin(__c))
{
return _VSTD::rbegin(__c);
}
template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto crend(const _Cp& __c) -> decltype(_VSTD::rend(__c))
{
return _VSTD::rend(__c);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h
index 7b002205f3..2933a29fc8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h
@@ -52,7 +52,7 @@ class _LIBCPP_TEMPLATE_VIS reverse_iterator
_LIBCPP_SUPPRESS_DEPRECATED_POP
private:
#ifndef _LIBCPP_ABI_NO_ITERATOR_BASES
- _Iter __t; // no longer used as of LWG #2360, not removed due to ABI break
+ _Iter __t_; // no longer used as of LWG #2360, not removed due to ABI break
#endif
#if _LIBCPP_STD_VER > 17
@@ -81,18 +81,18 @@ public:
#endif
#ifndef _LIBCPP_ABI_NO_ITERATOR_BASES
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
- reverse_iterator() : __t(), current() {}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
+ reverse_iterator() : __t_(), current() {}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
- explicit reverse_iterator(_Iter __x) : __t(__x), current(__x) {}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
+ explicit reverse_iterator(_Iter __x) : __t_(__x), current(__x) {}
template <class _Up, class = __enable_if_t<
!is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value
> >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator(const reverse_iterator<_Up>& __u)
- : __t(__u.base()), current(__u.base())
+ : __t_(__u.base()), current(__u.base())
{ }
template <class _Up, class = __enable_if_t<
@@ -100,22 +100,22 @@ public:
is_convertible<_Up const&, _Iter>::value &&
is_assignable<_Iter&, _Up const&>::value
> >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator& operator=(const reverse_iterator<_Up>& __u) {
- __t = current = __u.base();
+ __t_ = current = __u.base();
return *this;
}
#else
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator() : current() {}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
explicit reverse_iterator(_Iter __x) : current(__x) {}
template <class _Up, class = __enable_if_t<
!is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value
> >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator(const reverse_iterator<_Up>& __u)
: current(__u.base())
{ }
@@ -125,15 +125,15 @@ public:
is_convertible<_Up const&, _Iter>::value &&
is_assignable<_Iter&, _Up const&>::value
> >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator& operator=(const reverse_iterator<_Up>& __u) {
current = __u.base();
return *this;
}
#endif
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
_Iter base() const {return current;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reference operator*() const {_Iter __tmp = current; return *--__tmp;}
#if _LIBCPP_STD_VER > 17
@@ -148,29 +148,29 @@ public:
}
}
#else
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
pointer operator->() const {
return std::addressof(operator*());
}
#endif // _LIBCPP_STD_VER > 17
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator& operator++() {--current; return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator operator++(int) {reverse_iterator __tmp(*this); --current; return __tmp;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator& operator--() {++current; return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator operator--(int) {reverse_iterator __tmp(*this); ++current; return __tmp;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator operator+(difference_type __n) const {return reverse_iterator(current - __n);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator& operator+=(difference_type __n) {current -= __n; return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator operator-(difference_type __n) const {return reverse_iterator(current + __n);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator& operator-=(difference_type __n) {current += __n; return *this;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reference operator[](difference_type __n) const {return *(*this + __n);}
#if _LIBCPP_STD_VER > 17
@@ -202,7 +202,7 @@ template <class _Iter>
struct __is_reverse_iterator<reverse_iterator<_Iter> > : true_type {};
template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator==(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER > 17
@@ -215,7 +215,7 @@ operator==(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>&
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER > 17
@@ -228,7 +228,7 @@ operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& _
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator!=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER > 17
@@ -241,7 +241,7 @@ operator!=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>&
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER > 17
@@ -254,7 +254,7 @@ operator>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& _
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator>=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER > 17
@@ -267,7 +267,7 @@ operator>=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>&
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator<=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER > 17
@@ -291,7 +291,7 @@ operator<=>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>&
#ifndef _LIBCPP_CXX03_LANG
template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto
operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-> decltype(__y.base() - __x.base())
@@ -309,7 +309,7 @@ operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& _
#endif
template <class _Iter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator<_Iter>
operator+(typename reverse_iterator<_Iter>::difference_type __n, const reverse_iterator<_Iter>& __x)
{
@@ -324,7 +324,7 @@ inline constexpr bool disable_sized_sentinel_for<reverse_iterator<_Iter1>, rever
#if _LIBCPP_STD_VER > 11
template <class _Iter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator<_Iter> make_reverse_iterator(_Iter __i)
{
return reverse_iterator<_Iter>(__i);
@@ -499,7 +499,7 @@ struct __unwrap_reverse_iter_impl {
}
};
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
template <ranges::bidirectional_range _Range>
_LIBCPP_HIDE_FROM_ABI constexpr ranges::
subrange<reverse_iterator<ranges::iterator_t<_Range>>, reverse_iterator<ranges::iterator_t<_Range>>>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h
index f780048754..80be74ef58 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h
@@ -38,17 +38,17 @@ public:
#endif
private:
- iterator_type __i;
+ iterator_type __i_;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter() _NOEXCEPT
- : __i()
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter() _NOEXCEPT
+ : __i_()
{
_VSTD::__debug_db_insert_i(this);
}
- template <class _Up> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ template <class _Up> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
__wrap_iter(const __wrap_iter<_Up>& __u,
typename enable_if<is_convertible<_Up, iterator_type>::value>::type* = nullptr) _NOEXCEPT
- : __i(__u.base())
+ : __i_(__u.base())
{
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
if (!__libcpp_is_constant_evaluated())
@@ -56,87 +56,87 @@ public:
#endif
}
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
__wrap_iter(const __wrap_iter& __x)
- : __i(__x.base())
+ : __i_(__x.base())
{
if (!__libcpp_is_constant_evaluated())
__get_db()->__iterator_copy(this, _VSTD::addressof(__x));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
__wrap_iter& operator=(const __wrap_iter& __x)
{
if (this != _VSTD::addressof(__x))
{
if (!__libcpp_is_constant_evaluated())
__get_db()->__iterator_copy(this, _VSTD::addressof(__x));
- __i = __x.__i;
+ __i_ = __x.__i_;
}
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
~__wrap_iter()
{
if (!__libcpp_is_constant_evaluated())
__get_db()->__erase_i(this);
}
#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference operator*() const _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator*() const _NOEXCEPT
{
_LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
"Attempted to dereference a non-dereferenceable iterator");
- return *__i;
+ return *__i_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 pointer operator->() const _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pointer operator->() const _NOEXCEPT
{
_LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
"Attempted to dereference a non-dereferenceable iterator");
- return _VSTD::__to_address(__i);
+ return _VSTD::__to_address(__i_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter& operator++() _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator++() _NOEXCEPT
{
_LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
"Attempted to increment a non-incrementable iterator");
- ++__i;
+ ++__i_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter operator++(int) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter operator++(int) _NOEXCEPT
{__wrap_iter __tmp(*this); ++(*this); return __tmp;}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter& operator--() _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator--() _NOEXCEPT
{
_LIBCPP_DEBUG_ASSERT(__get_const_db()->__decrementable(this),
"Attempted to decrement a non-decrementable iterator");
- --__i;
+ --__i_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter operator--(int) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter operator--(int) _NOEXCEPT
{__wrap_iter __tmp(*this); --(*this); return __tmp;}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter operator+ (difference_type __n) const _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter operator+ (difference_type __n) const _NOEXCEPT
{__wrap_iter __w(*this); __w += __n; return __w;}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter& operator+=(difference_type __n) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator+=(difference_type __n) _NOEXCEPT
{
_LIBCPP_DEBUG_ASSERT(__get_const_db()->__addable(this, __n),
"Attempted to add/subtract an iterator outside its valid range");
- __i += __n;
+ __i_ += __n;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter operator- (difference_type __n) const _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter operator- (difference_type __n) const _NOEXCEPT
{return *this + (-__n);}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter& operator-=(difference_type __n) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator-=(difference_type __n) _NOEXCEPT
{*this += -__n; return *this;}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference operator[](difference_type __n) const _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator[](difference_type __n) const _NOEXCEPT
{
_LIBCPP_DEBUG_ASSERT(__get_const_db()->__subscriptable(this, __n),
"Attempted to subscript an iterator outside its valid range");
- return __i[__n];
+ return __i_[__n];
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 iterator_type base() const _NOEXCEPT {return __i;}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 iterator_type base() const _NOEXCEPT {return __i_;}
private:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
- explicit __wrap_iter(const void* __p, iterator_type __x) _NOEXCEPT : __i(__x)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
+ explicit __wrap_iter(const void* __p, iterator_type __x) _NOEXCEPT : __i_(__x)
{
(void)__p;
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
@@ -166,7 +166,7 @@ bool operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y)
}
template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
{
_LIBCPP_DEBUG_ASSERT(__get_const_db()->__less_than_comparable(_VSTD::addressof(__x), _VSTD::addressof(__y)),
@@ -175,7 +175,7 @@ bool operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _
}
template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
_LIBCPP_DEBUG_ASSERT(__get_const_db()->__less_than_comparable(&__x, &__y),
@@ -240,7 +240,7 @@ bool operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y)
}
template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
#ifndef _LIBCPP_CXX03_LANG
auto operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
-> decltype(__x.base() - __y.base())
@@ -255,7 +255,7 @@ operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXC
}
template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
__wrap_iter<_Iter1> operator+(typename __wrap_iter<_Iter1>::difference_type __n, __wrap_iter<_Iter1> __x) _NOEXCEPT
{
__x += __n;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__locale b/contrib/libs/cxxsupp/libcxx/include/__locale
index 3aa8e7505c..0fe43dcb3e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__locale
+++ b/contrib/libs/cxxsupp/libcxx/include/__locale
@@ -16,13 +16,15 @@
#include <cctype>
#include <cstdint>
#include <locale.h>
-#include <memory>
#include <mutex>
#include <string>
+// Some platforms require more includes than others. Keep the includes on all plaforms for now.
+#include <cstddef>
+#include <cstring>
+
#if defined(_LIBCPP_MSVCRT_LIKE)
# include <__support/win32/locale_win32.h>
-# include <cstring>
#elif defined(_AIX) || defined(__MVS__)
# include <__support/ibm/xlocale.h>
#elif defined(__ANDROID__)
@@ -192,12 +194,12 @@ protected:
explicit facet(size_t __refs = 0)
: __shared_count(static_cast<long>(__refs)-1) {}
- virtual ~facet();
+ ~facet() override;
// facet(const facet&) = delete; // effectively done in __shared_count
// void operator=(const facet&) = delete;
private:
- virtual void __on_zero_shared() _NOEXCEPT;
+ void __on_zero_shared() _NOEXCEPT override;
};
class _LIBCPP_TYPE_VIS locale::id
@@ -289,7 +291,7 @@ public:
static locale::id id;
protected:
- ~collate();
+ ~collate() override;
virtual int do_compare(const char_type* __lo1, const char_type* __hi1,
const char_type* __lo2, const char_type* __hi2) const;
virtual string_type do_transform(const char_type* __lo, const char_type* __hi) const
@@ -348,7 +350,7 @@ template <>
class _LIBCPP_TYPE_VIS collate_byname<char>
: public collate<char>
{
- locale_t __l;
+ locale_t __l_;
public:
typedef char char_type;
typedef basic_string<char_type> string_type;
@@ -357,10 +359,10 @@ public:
explicit collate_byname(const string& __n, size_t __refs = 0);
protected:
- ~collate_byname();
- virtual int do_compare(const char_type* __lo1, const char_type* __hi1,
- const char_type* __lo2, const char_type* __hi2) const;
- virtual string_type do_transform(const char_type* __lo, const char_type* __hi) const;
+ ~collate_byname() override;
+ int do_compare(const char_type* __lo1, const char_type* __hi1,
+ const char_type* __lo2, const char_type* __hi2) const override;
+ string_type do_transform(const char_type* __lo, const char_type* __hi) const override;
};
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
@@ -368,7 +370,7 @@ template <>
class _LIBCPP_TYPE_VIS collate_byname<wchar_t>
: public collate<wchar_t>
{
- locale_t __l;
+ locale_t __l_;
public:
typedef wchar_t char_type;
typedef basic_string<char_type> string_type;
@@ -377,11 +379,11 @@ public:
explicit collate_byname(const string& __n, size_t __refs = 0);
protected:
- ~collate_byname();
+ ~collate_byname() override;
- virtual int do_compare(const char_type* __lo1, const char_type* __hi1,
- const char_type* __lo2, const char_type* __hi2) const;
- virtual string_type do_transform(const char_type* __lo, const char_type* __hi) const;
+ int do_compare(const char_type* __lo1, const char_type* __hi1,
+ const char_type* __lo2, const char_type* __hi2) const override;
+ string_type do_transform(const char_type* __lo, const char_type* __hi) const override;
};
#endif
@@ -508,7 +510,8 @@ public:
static const mask punct = _P;
static const mask xdigit = _X | _N;
static const mask blank = _B;
- static const mask __regex_word = 0x80;
+ // mask is already fully saturated, use a different type in regex_type_traits.
+ static const unsigned short __regex_word = 0x100;
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_XDIGIT
@@ -547,7 +550,8 @@ public:
_LIBCPP_INLINE_VISIBILITY ctype_base() {}
- static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
+ static_assert((__regex_word & ~(std::make_unsigned<mask>::type)(space | print | cntrl | upper | lower | alpha |
+ digit | punct | xdigit | blank)) == __regex_word,
"__regex_word can't overlap other bits");
};
@@ -641,7 +645,7 @@ public:
static locale::id id;
protected:
- ~ctype();
+ ~ctype() override;
virtual bool do_is(mask __m, char_type __c) const;
virtual const char_type* do_is(const char_type* __low, const char_type* __high, mask* __vec) const;
virtual const char_type* do_scan_is(mask __m, const char_type* __low, const char_type* __high) const;
@@ -695,7 +699,7 @@ public:
const char_type* scan_not(mask __m, const char_type* __low, const char_type* __high) const
{
for (; __low != __high; ++__low)
- if (!(isascii(*__low) && (__tab_[static_cast<int>(*__low)] & __m)))
+ if (!isascii(*__low) || !(__tab_[static_cast<int>(*__low)] & __m))
break;
return __low;
}
@@ -771,7 +775,7 @@ public:
#endif
protected:
- ~ctype();
+ ~ctype() override;
virtual char_type do_toupper(char_type __c) const;
virtual const char_type* do_toupper(char_type* __low, const char_type* __high) const;
virtual char_type do_tolower(char_type __c) const;
@@ -790,18 +794,18 @@ template <>
class _LIBCPP_TYPE_VIS ctype_byname<char>
: public ctype<char>
{
- locale_t __l;
+ locale_t __l_;
public:
explicit ctype_byname(const char*, size_t = 0);
explicit ctype_byname(const string&, size_t = 0);
protected:
- ~ctype_byname();
- virtual char_type do_toupper(char_type) const;
- virtual const char_type* do_toupper(char_type* __low, const char_type* __high) const;
- virtual char_type do_tolower(char_type) const;
- virtual const char_type* do_tolower(char_type* __low, const char_type* __high) const;
+ ~ctype_byname() override;
+ char_type do_toupper(char_type) const override;
+ const char_type* do_toupper(char_type* __low, const char_type* __high) const override;
+ char_type do_tolower(char_type) const override;
+ const char_type* do_tolower(char_type* __low, const char_type* __high) const override;
};
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
@@ -809,26 +813,26 @@ template <>
class _LIBCPP_TYPE_VIS ctype_byname<wchar_t>
: public ctype<wchar_t>
{
- locale_t __l;
+ locale_t __l_;
public:
explicit ctype_byname(const char*, size_t = 0);
explicit ctype_byname(const string&, size_t = 0);
protected:
- ~ctype_byname();
- virtual bool do_is(mask __m, char_type __c) const;
- virtual const char_type* do_is(const char_type* __low, const char_type* __high, mask* __vec) const;
- virtual const char_type* do_scan_is(mask __m, const char_type* __low, const char_type* __high) const;
- virtual const char_type* do_scan_not(mask __m, const char_type* __low, const char_type* __high) const;
- virtual char_type do_toupper(char_type) const;
- virtual const char_type* do_toupper(char_type* __low, const char_type* __high) const;
- virtual char_type do_tolower(char_type) const;
- virtual const char_type* do_tolower(char_type* __low, const char_type* __high) const;
- virtual char_type do_widen(char) const;
- virtual const char* do_widen(const char* __low, const char* __high, char_type* __dest) const;
- virtual char do_narrow(char_type, char __dfault) const;
- virtual const char_type* do_narrow(const char_type* __low, const char_type* __high, char __dfault, char* __dest) const;
+ ~ctype_byname() override;
+ bool do_is(mask __m, char_type __c) const override;
+ const char_type* do_is(const char_type* __low, const char_type* __high, mask* __vec) const override;
+ const char_type* do_scan_is(mask __m, const char_type* __low, const char_type* __high) const override;
+ const char_type* do_scan_not(mask __m, const char_type* __low, const char_type* __high) const override;
+ char_type do_toupper(char_type) const override;
+ const char_type* do_toupper(char_type* __low, const char_type* __high) const override;
+ char_type do_tolower(char_type) const override;
+ const char_type* do_tolower(char_type* __low, const char_type* __high) const override;
+ char_type do_widen(char) const override;
+ const char* do_widen(const char* __low, const char* __high, char_type* __dest) const override;
+ char do_narrow(char_type, char __dfault) const override;
+ const char_type* do_narrow(const char_type* __low, const char_type* __high, char __dfault, char* __dest) const override;
};
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
@@ -1019,7 +1023,7 @@ protected:
explicit codecvt(const char*, size_t __refs = 0)
: locale::facet(__refs) {}
- ~codecvt();
+ ~codecvt() override;
virtual result do_out(state_type& __st,
const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
@@ -1043,7 +1047,7 @@ class _LIBCPP_TYPE_VIS codecvt<wchar_t, char, mbstate_t>
: public locale::facet,
public codecvt_base
{
- locale_t __l;
+ locale_t __l_;
public:
typedef wchar_t intern_type;
typedef char extern_type;
@@ -1103,7 +1107,7 @@ public:
protected:
explicit codecvt(const char*, size_t __refs = 0);
- ~codecvt();
+ ~codecvt() override;
virtual result do_out(state_type& __st,
const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
@@ -1190,7 +1194,7 @@ protected:
explicit codecvt(const char*, size_t __refs = 0)
: locale::facet(__refs) {}
- ~codecvt();
+ ~codecvt() override;
virtual result do_out(state_type& __st,
const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
@@ -1278,7 +1282,7 @@ protected:
explicit codecvt(const char*, size_t __refs = 0)
: locale::facet(__refs) {}
- ~codecvt();
+ ~codecvt() override;
virtual result do_out(state_type& __st,
const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
@@ -1366,7 +1370,7 @@ protected:
explicit codecvt(const char*, size_t __refs = 0)
: locale::facet(__refs) {}
- ~codecvt();
+ ~codecvt() override;
virtual result do_out(state_type& __st,
const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
@@ -1454,7 +1458,7 @@ protected:
explicit codecvt(const char*, size_t __refs = 0)
: locale::facet(__refs) {}
- ~codecvt();
+ ~codecvt() override;
virtual result do_out(state_type& __st,
const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
@@ -1486,7 +1490,7 @@ public:
explicit codecvt_byname(const string& __nm, size_t __refs = 0)
: codecvt<_InternT, _ExternT, _StateT>(__nm.c_str(), __refs) {}
protected:
- ~codecvt_byname();
+ ~codecvt_byname() override;
};
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -1538,7 +1542,7 @@ struct _LIBCPP_TYPE_VIS __narrow_to_utf8<16>
__narrow_to_utf8() : codecvt<char16_t, char, mbstate_t>(1) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
- ~__narrow_to_utf8();
+ ~__narrow_to_utf8() override;
template <class _OutputIterator, class _CharT>
_LIBCPP_INLINE_VISIBILITY
@@ -1574,7 +1578,7 @@ struct _LIBCPP_TYPE_VIS __narrow_to_utf8<32>
__narrow_to_utf8() : codecvt<char32_t, char, mbstate_t>(1) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
- ~__narrow_to_utf8();
+ ~__narrow_to_utf8() override;
template <class _OutputIterator, class _CharT>
_LIBCPP_INLINE_VISIBILITY
@@ -1632,7 +1636,7 @@ struct _LIBCPP_TYPE_VIS __widen_from_utf8<16>
__widen_from_utf8() : codecvt<char16_t, char, mbstate_t>(1) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
- ~__widen_from_utf8();
+ ~__widen_from_utf8() override;
template <class _OutputIterator>
_LIBCPP_INLINE_VISIBILITY
@@ -1668,7 +1672,7 @@ struct _LIBCPP_TYPE_VIS __widen_from_utf8<32>
__widen_from_utf8() : codecvt<char32_t, char, mbstate_t>(1) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
- ~__widen_from_utf8();
+ ~__widen_from_utf8() override;
template <class _OutputIterator>
_LIBCPP_INLINE_VISIBILITY
@@ -1718,7 +1722,7 @@ public:
static locale::id id;
protected:
- ~numpunct();
+ ~numpunct() override;
virtual char_type do_decimal_point() const;
virtual char_type do_thousands_sep() const;
virtual string do_grouping() const;
@@ -1750,7 +1754,7 @@ public:
static locale::id id;
protected:
- ~numpunct();
+ ~numpunct() override;
virtual char_type do_decimal_point() const;
virtual char_type do_thousands_sep() const;
virtual string do_grouping() const;
@@ -1779,7 +1783,7 @@ public:
explicit numpunct_byname(const string& __nm, size_t __refs = 0);
protected:
- ~numpunct_byname();
+ ~numpunct_byname() override;
private:
void __init(const char*);
@@ -1798,7 +1802,7 @@ public:
explicit numpunct_byname(const string& __nm, size_t __refs = 0);
protected:
- ~numpunct_byname();
+ ~numpunct_byname() override;
private:
void __init(const char*);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/addressof.h b/contrib/libs/cxxsupp/libcxx/include/__memory/addressof.h
index 75e3dd0647..d4c69b83a8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/addressof.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/addressof.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17
_LIBCPP_NO_CFI _LIBCPP_INLINE_VISIBILITY
_Tp*
addressof(_Tp& __x) _NOEXCEPT
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/align.h b/contrib/libs/cxxsupp/libcxx/include/__memory/align.h
new file mode 100644
index 0000000000..c6792206b0
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/align.h
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___MEMORY_ALIGN_H
+#define _LIBCPP___MEMORY_ALIGN_H
+
+#include <__config>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+_LIBCPP_FUNC_VIS void* align(size_t __align, size_t __sz, void*& __ptr, size_t& __space);
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___MEMORY_ALIGN_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/allocator.h b/contrib/libs/cxxsupp/libcxx/include/__memory/allocator.h
index 57ce23483d..7a930959a1 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/allocator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/allocator.h
@@ -95,14 +95,14 @@ public:
typedef true_type propagate_on_container_move_assignment;
typedef true_type is_always_equal;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
allocator() _NOEXCEPT = default;
template <class _Up>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
allocator(const allocator<_Up>&) _NOEXCEPT { }
- _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_Tp* allocate(size_t __n) {
if (__n > allocator_traits<allocator>::max_size(*this))
__throw_bad_array_new_length();
@@ -120,7 +120,7 @@ public:
}
#endif
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void deallocate(_Tp* __p, size_t __n) _NOEXCEPT {
if (__libcpp_is_constant_evaluated()) {
::operator delete(__p);
@@ -184,14 +184,14 @@ public:
typedef true_type propagate_on_container_move_assignment;
typedef true_type is_always_equal;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
allocator() _NOEXCEPT = default;
template <class _Up>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
allocator(const allocator<_Up>&) _NOEXCEPT { }
- _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
const _Tp* allocate(size_t __n) {
if (__n > allocator_traits<allocator>::max_size(*this))
__throw_bad_array_new_length();
@@ -209,7 +209,7 @@ public:
}
#endif
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void deallocate(const _Tp* __p, size_t __n) {
if (__libcpp_is_constant_evaluated()) {
::operator delete(const_cast<_Tp*>(__p));
@@ -258,11 +258,11 @@ public:
};
template <class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool operator==(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {return true;}
template <class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool operator!=(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {return false;}
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/allocator_arg_t.h b/contrib/libs/cxxsupp/libcxx/include/__memory/allocator_arg_t.h
index 2d63b1f905..44df046ed7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/allocator_arg_t.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/allocator_arg_t.h
@@ -36,7 +36,7 @@ extern _LIBCPP_EXPORTED_FROM_ABI const allocator_arg_t allocator_arg;
template <class _Tp, class _Alloc, class ..._Args>
struct __uses_alloc_ctor_imp
{
- typedef _LIBCPP_NODEBUG __uncvref_t<_Alloc> _RawAlloc;
+ typedef _LIBCPP_NODEBUG __remove_cvref_t<_Alloc> _RawAlloc;
static const bool __ua = uses_allocator<_Tp, _RawAlloc>::value;
static const bool __ic =
is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/allocator_destructor.h b/contrib/libs/cxxsupp/libcxx/include/__memory/allocator_destructor.h
new file mode 100644
index 0000000000..623ad8ad80
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/allocator_destructor.h
@@ -0,0 +1,42 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___MEMORY_ALLOCATOR_DESTRUCTOR_H
+#define _LIBCPP___MEMORY_ALLOCATOR_DESTRUCTOR_H
+
+#include <__config>
+#include <__memory/allocator_traits.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _Alloc>
+class __allocator_destructor
+{
+ typedef _LIBCPP_NODEBUG allocator_traits<_Alloc> __alloc_traits;
+public:
+ typedef _LIBCPP_NODEBUG typename __alloc_traits::pointer pointer;
+ typedef _LIBCPP_NODEBUG typename __alloc_traits::size_type size_type;
+private:
+ _Alloc& __alloc_;
+ size_type __s_;
+public:
+ _LIBCPP_INLINE_VISIBILITY __allocator_destructor(_Alloc& __a, size_type __s)
+ _NOEXCEPT
+ : __alloc_(__a), __s_(__s) {}
+ _LIBCPP_INLINE_VISIBILITY
+ void operator()(pointer __p) _NOEXCEPT
+ {__alloc_traits::deallocate(__alloc_, __p, __s_);}
+};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___MEMORY_ALLOCATOR_DESTRUCTOR_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/allocator_traits.h b/contrib/libs/cxxsupp/libcxx/include/__memory/allocator_traits.h
index 5215556cdf..6acc14aa23 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/allocator_traits.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/allocator_traits.h
@@ -28,12 +28,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#define _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(NAME, PROPERTY) \
template <class _Tp, class = void> struct NAME : false_type { }; \
- template <class _Tp> struct NAME<_Tp, typename __void_t<typename _Tp:: PROPERTY >::type> : true_type { }
+ template <class _Tp> struct NAME<_Tp, __void_t<typename _Tp:: PROPERTY > > : true_type { }
// __pointer
_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_pointer, pointer);
template <class _Tp, class _Alloc,
- class _RawAlloc = typename remove_reference<_Alloc>::type,
+ class _RawAlloc = __libcpp_remove_reference_t<_Alloc>,
bool = __has_pointer<_RawAlloc>::value>
struct __pointer {
using type _LIBCPP_NODEBUG = typename _RawAlloc::pointer;
@@ -152,13 +152,12 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Tp, class _Up, class = void>
struct __has_rebind_other : false_type { };
template <class _Tp, class _Up>
-struct __has_rebind_other<_Tp, _Up, typename __void_t<
- typename _Tp::template rebind<_Up>::other
->::type> : true_type { };
+struct __has_rebind_other<_Tp, _Up, __void_t<typename _Tp::template rebind<_Up>::other> > : true_type { };
template <class _Tp, class _Up, bool = __has_rebind_other<_Tp, _Up>::value>
struct __allocator_traits_rebind {
- using type _LIBCPP_NODEBUG = typename _Tp::template rebind<_Up>::other;
+ static_assert(__has_rebind_other<_Tp, _Up>::value, "This allocator has to implement rebind");
+ using type _LIBCPP_NODEBUG = typename _Tp::template rebind<_Up>::other;
};
template <template <class, class...> class _Alloc, class _Tp, class ..._Args, class _Up>
struct __allocator_traits_rebind<_Alloc<_Tp, _Args...>, _Up, true> {
@@ -257,14 +256,14 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
};
#endif // _LIBCPP_CXX03_LANG
- _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static pointer allocate(allocator_type& __a, size_type __n) {
return __a.allocate(__n);
}
template <class _Ap = _Alloc, class =
__enable_if_t<__has_allocate_hint<_Ap, size_type, const_void_pointer>::value> >
- _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) {
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
return __a.allocate(__n, __hint);
@@ -272,19 +271,19 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
}
template <class _Ap = _Alloc, class = void, class =
__enable_if_t<!__has_allocate_hint<_Ap, size_type, const_void_pointer>::value> >
- _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer) {
return __a.allocate(__n);
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static void deallocate(allocator_type& __a, pointer __p, size_type __n) _NOEXCEPT {
__a.deallocate(__p, __n);
}
template <class _Tp, class... _Args, class =
__enable_if_t<__has_construct<allocator_type, _Tp*, _Args...>::value> >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static void construct(allocator_type& __a, _Tp* __p, _Args&&... __args) {
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
__a.construct(__p, _VSTD::forward<_Args>(__args)...);
@@ -292,7 +291,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
}
template <class _Tp, class... _Args, class = void, class =
__enable_if_t<!__has_construct<allocator_type, _Tp*, _Args...>::value> >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static void construct(allocator_type&, _Tp* __p, _Args&&... __args) {
#if _LIBCPP_STD_VER > 17
_VSTD::construct_at(__p, _VSTD::forward<_Args>(__args)...);
@@ -303,7 +302,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
template <class _Tp, class =
__enable_if_t<__has_destroy<allocator_type, _Tp*>::value> >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static void destroy(allocator_type& __a, _Tp* __p) {
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
__a.destroy(__p);
@@ -311,7 +310,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
}
template <class _Tp, class = void, class =
__enable_if_t<!__has_destroy<allocator_type, _Tp*>::value> >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static void destroy(allocator_type&, _Tp* __p) {
#if _LIBCPP_STD_VER > 17
_VSTD::destroy_at(__p);
@@ -322,7 +321,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
template <class _Ap = _Alloc, class =
__enable_if_t<__has_max_size<const _Ap>::value> >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static size_type max_size(const allocator_type& __a) _NOEXCEPT {
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
return __a.max_size();
@@ -330,33 +329,32 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
}
template <class _Ap = _Alloc, class = void, class =
__enable_if_t<!__has_max_size<const _Ap>::value> >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static size_type max_size(const allocator_type&) _NOEXCEPT {
return numeric_limits<size_type>::max() / sizeof(value_type);
}
template <class _Ap = _Alloc, class =
__enable_if_t<__has_select_on_container_copy_construction<const _Ap>::value> >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static allocator_type select_on_container_copy_construction(const allocator_type& __a) {
return __a.select_on_container_copy_construction();
}
template <class _Ap = _Alloc, class = void, class =
__enable_if_t<!__has_select_on_container_copy_construction<const _Ap>::value> >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static allocator_type select_on_container_copy_construction(const allocator_type& __a) {
return __a;
}
};
-template <class _Traits, class _Tp>
-struct __rebind_alloc_helper {
#ifndef _LIBCPP_CXX03_LANG
- using type _LIBCPP_NODEBUG = typename _Traits::template rebind_alloc<_Tp>;
+template <class _Traits, class _Tp>
+using __rebind_alloc _LIBCPP_NODEBUG = typename _Traits::template rebind_alloc<_Tp>;
#else
- using type = typename _Traits::template rebind_alloc<_Tp>::other;
+template <class _Traits, class _Tp>
+using __rebind_alloc = typename _Traits::template rebind_alloc<_Tp>::other;
#endif
-};
// __is_default_allocator
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/builtin_new_allocator.h b/contrib/libs/cxxsupp/libcxx/include/__memory/builtin_new_allocator.h
new file mode 100644
index 0000000000..cd1a866ca6
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/builtin_new_allocator.h
@@ -0,0 +1,70 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___MEMORY_BUILTIN_NEW_ALLOCATOR_H
+#define _LIBCPP___MEMORY_BUILTIN_NEW_ALLOCATOR_H
+
+#include <__config>
+#include <__memory/unique_ptr.h>
+#include <cstddef>
+#include <new>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+// __builtin_new_allocator -- A non-templated helper for allocating and
+// deallocating memory using __builtin_operator_new and
+// __builtin_operator_delete. It should be used in preference to
+// `std::allocator<T>` to avoid additional instantiations.
+struct __builtin_new_allocator {
+ struct __builtin_new_deleter {
+ typedef void* pointer_type;
+
+ _LIBCPP_CONSTEXPR explicit __builtin_new_deleter(size_t __size, size_t __align)
+ : __size_(__size), __align_(__align) {}
+
+ void operator()(void* __p) const _NOEXCEPT {
+ _VSTD::__libcpp_deallocate(__p, __size_, __align_);
+ }
+
+ private:
+ size_t __size_;
+ size_t __align_;
+ };
+
+ typedef unique_ptr<void, __builtin_new_deleter> __holder_t;
+
+ static __holder_t __allocate_bytes(size_t __s, size_t __align) {
+ return __holder_t(_VSTD::__libcpp_allocate(__s, __align),
+ __builtin_new_deleter(__s, __align));
+ }
+
+ static void __deallocate_bytes(void* __p, size_t __s,
+ size_t __align) _NOEXCEPT {
+ _VSTD::__libcpp_deallocate(__p, __s, __align);
+ }
+
+ template <class _Tp>
+ _LIBCPP_NODEBUG _LIBCPP_ALWAYS_INLINE
+ static __holder_t __allocate_type(size_t __n) {
+ return __allocate_bytes(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
+ }
+
+ template <class _Tp>
+ _LIBCPP_NODEBUG _LIBCPP_ALWAYS_INLINE
+ static void __deallocate_type(void* __p, size_t __n) _NOEXCEPT {
+ __deallocate_bytes(__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
+ }
+};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___MEMORY_BUILTIN_NEW_ALLOCATOR_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h b/contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h
index 89e5820e99..9dd42f8d6e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h
@@ -11,9 +11,13 @@
#define _LIBCPP___MEMORY_COMPRESSED_PAIR_H
#include <__config>
+#include <__fwd/get.h>
+#include <__fwd/tuple.h>
+#include <__tuple/tuple_indices.h>
+#include <__type_traits/dependent_type.h>
#include <__utility/forward.h>
#include <__utility/move.h>
-#include <tuple> // needed in c++03 for some constructors
+#include <__utility/piecewise_construct.h>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -41,12 +45,12 @@ struct __compressed_pair_elem {
#ifndef _LIBCPP_CXX03_LANG
template <class... _Args, size_t... _Indices>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
explicit __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args, __tuple_indices<_Indices...>)
: __value_(std::forward<_Args>(std::get<_Indices>(__args))...) {}
#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference __get() _NOEXCEPT { return __value_; }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference __get() _NOEXCEPT { return __value_; }
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference __get() const _NOEXCEPT { return __value_; }
private:
@@ -70,12 +74,12 @@ struct __compressed_pair_elem<_Tp, _Idx, true> : private _Tp {
#ifndef _LIBCPP_CXX03_LANG
template <class... _Args, size_t... _Indices>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
__compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args, __tuple_indices<_Indices...>)
: __value_type(std::forward<_Args>(std::get<_Indices>(__args))...) {}
#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference __get() _NOEXCEPT { return *this; }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference __get() _NOEXCEPT { return *this; }
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference __get() const _NOEXCEPT { return *this; }
};
@@ -109,14 +113,14 @@ public:
#ifndef _LIBCPP_CXX03_LANG
template <class... _Args1, class... _Args2>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
explicit __compressed_pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args,
tuple<_Args2...> __second_args)
: _Base1(__pc, std::move(__first_args), typename __make_tuple_indices<sizeof...(_Args1)>::type()),
_Base2(__pc, std::move(__second_args), typename __make_tuple_indices<sizeof...(_Args2)>::type()) {}
#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
typename _Base1::reference first() _NOEXCEPT {
return static_cast<_Base1&>(*this).__get();
}
@@ -126,7 +130,7 @@ public:
return static_cast<_Base1 const&>(*this).__get();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
typename _Base2::reference second() _NOEXCEPT {
return static_cast<_Base2&>(*this).__get();
}
@@ -145,7 +149,7 @@ public:
return static_cast<_Base2*>(__pair);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void swap(__compressed_pair& __x)
_NOEXCEPT_(__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value) {
using std::swap;
@@ -155,7 +159,7 @@ public:
};
template <class _T1, class _T2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void swap(__compressed_pair<_T1, _T2>& __x, __compressed_pair<_T1, _T2>& __y)
_NOEXCEPT_(__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value) {
__x.swap(__y);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/concepts.h b/contrib/libs/cxxsupp/libcxx/include/__memory/concepts.h
index 88372d277d..76d2a2e729 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/concepts.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/concepts.h
@@ -10,13 +10,13 @@
#ifndef _LIBCPP___MEMORY_CONCEPTS_H
#define _LIBCPP___MEMORY_CONCEPTS_H
+#include <__concepts/same_as.h>
#include <__config>
#include <__iterator/concepts.h>
#include <__iterator/iterator_traits.h>
#include <__iterator/readable_traits.h>
#include <__ranges/access.h>
#include <__ranges/concepts.h>
-#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -61,7 +61,7 @@ concept __nothrow_forward_range =
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/construct_at.h b/contrib/libs/cxxsupp/libcxx/include/__memory/construct_at.h
index f5985b7731..a11a6ebe44 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/construct_at.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/construct_at.h
@@ -17,6 +17,7 @@
#include <__memory/voidify.h>
#include <__utility/forward.h>
#include <__utility/move.h>
+#include <new>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -53,11 +54,11 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __construct_at(_Tp* __location, _Ar
// taking an array).
template <class _ForwardIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator __destroy(_ForwardIterator, _ForwardIterator);
template <class _Tp, typename enable_if<!is_array<_Tp>::value, int>::type = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __destroy_at(_Tp* __loc) {
_LIBCPP_ASSERT(__loc != nullptr, "null pointer given to destroy_at");
__loc->~_Tp();
@@ -65,7 +66,7 @@ void __destroy_at(_Tp* __loc) {
#if _LIBCPP_STD_VER > 17
template <class _Tp, typename enable_if<is_array<_Tp>::value, int>::type = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __destroy_at(_Tp* __loc) {
_LIBCPP_ASSERT(__loc != nullptr, "null pointer given to destroy_at");
_VSTD::__destroy(_VSTD::begin(*__loc), _VSTD::end(*__loc));
@@ -73,7 +74,7 @@ void __destroy_at(_Tp* __loc) {
#endif
template <class _ForwardIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator __destroy(_ForwardIterator __first, _ForwardIterator __last) {
for (; __first != __last; ++__first)
_VSTD::__destroy_at(_VSTD::addressof(*__first));
@@ -83,27 +84,27 @@ _ForwardIterator __destroy(_ForwardIterator __first, _ForwardIterator __last) {
#if _LIBCPP_STD_VER > 14
template <class _Tp, enable_if_t<!is_array_v<_Tp>, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void destroy_at(_Tp* __loc) {
_VSTD::__destroy_at(__loc);
}
#if _LIBCPP_STD_VER > 17
template <class _Tp, enable_if_t<is_array_v<_Tp>, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void destroy_at(_Tp* __loc) {
_VSTD::__destroy_at(__loc);
}
#endif
template <class _ForwardIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void destroy(_ForwardIterator __first, _ForwardIterator __last) {
(void)_VSTD::__destroy(_VSTD::move(__first), _VSTD::move(__last));
}
template <class _ForwardIterator, class _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator destroy_n(_ForwardIterator __first, _Size __n) {
for (; __n > 0; (void)++__first, --__n)
_VSTD::__destroy_at(_VSTD::addressof(*__first));
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/destruct_n.h b/contrib/libs/cxxsupp/libcxx/include/__memory/destruct_n.h
new file mode 100644
index 0000000000..2cfb2e4c88
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/destruct_n.h
@@ -0,0 +1,64 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___MEMORY_DESTRUCT_N_H
+#define _LIBCPP___MEMORY_DESTRUCT_N_H
+
+#include <__config>
+#include <__type_traits/integral_constant.h>
+#include <__type_traits/is_trivially_destructible.h>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+struct __destruct_n
+{
+private:
+ size_t __size_;
+
+ template <class _Tp>
+ _LIBCPP_INLINE_VISIBILITY void __process(_Tp* __p, false_type) _NOEXCEPT
+ {for (size_t __i = 0; __i < __size_; ++__i, ++__p) __p->~_Tp();}
+
+ template <class _Tp>
+ _LIBCPP_INLINE_VISIBILITY void __process(_Tp*, true_type) _NOEXCEPT
+ {}
+
+ _LIBCPP_INLINE_VISIBILITY void __incr(false_type) _NOEXCEPT
+ {++__size_;}
+ _LIBCPP_INLINE_VISIBILITY void __incr(true_type) _NOEXCEPT
+ {}
+
+ _LIBCPP_INLINE_VISIBILITY void __set(size_t __s, false_type) _NOEXCEPT
+ {__size_ = __s;}
+ _LIBCPP_INLINE_VISIBILITY void __set(size_t, true_type) _NOEXCEPT
+ {}
+public:
+ _LIBCPP_INLINE_VISIBILITY explicit __destruct_n(size_t __s) _NOEXCEPT
+ : __size_(__s) {}
+
+ template <class _Tp>
+ _LIBCPP_INLINE_VISIBILITY void __incr() _NOEXCEPT
+ {__incr(integral_constant<bool, is_trivially_destructible<_Tp>::value>());}
+
+ template <class _Tp>
+ _LIBCPP_INLINE_VISIBILITY void __set(size_t __s, _Tp*) _NOEXCEPT
+ {__set(__s, integral_constant<bool, is_trivially_destructible<_Tp>::value>());}
+
+ template <class _Tp>
+ _LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __p) _NOEXCEPT
+ {__process(__p, integral_constant<bool, is_trivially_destructible<_Tp>::value>());}
+};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___MEMORY_DESTRUCT_N_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/pointer_traits.h b/contrib/libs/cxxsupp/libcxx/include/__memory/pointer_traits.h
index 348f7323a4..fd52647178 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/pointer_traits.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/pointer_traits.h
@@ -25,8 +25,7 @@ template <class _Tp, class = void>
struct __has_element_type : false_type {};
template <class _Tp>
-struct __has_element_type<_Tp,
- typename __void_t<typename _Tp::element_type>::type> : true_type {};
+struct __has_element_type<_Tp, __void_t<typename _Tp::element_type> > : true_type {};
template <class _Ptr, bool = __has_element_type<_Ptr>::value>
struct __pointer_traits_element_type;
@@ -53,8 +52,7 @@ template <class _Tp, class = void>
struct __has_difference_type : false_type {};
template <class _Tp>
-struct __has_difference_type<_Tp,
- typename __void_t<typename _Tp::difference_type>::type> : true_type {};
+struct __has_difference_type<_Tp, __void_t<typename _Tp::difference_type> > : true_type {};
template <class _Ptr, bool = __has_difference_type<_Ptr>::value>
struct __pointer_traits_difference_type
@@ -123,9 +121,8 @@ struct _LIBCPP_TEMPLATE_VIS pointer_traits
private:
struct __nat {};
public:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
- static pointer pointer_to(typename conditional<is_void<element_type>::value,
- __nat, element_type>::type& __r)
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
+ static pointer pointer_to(__conditional_t<is_void<element_type>::value, __nat, element_type>& __r)
{return pointer::pointer_to(__r);}
};
@@ -145,20 +142,18 @@ struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*>
private:
struct __nat {};
public:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
- static pointer pointer_to(typename conditional<is_void<element_type>::value,
- __nat, element_type>::type& __r) _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
+ static pointer pointer_to(__conditional_t<is_void<element_type>::value, __nat, element_type>& __r) _NOEXCEPT
{return _VSTD::addressof(__r);}
};
-template <class _From, class _To>
-struct __rebind_pointer {
#ifndef _LIBCPP_CXX03_LANG
- typedef typename pointer_traits<_From>::template rebind<_To> type;
+template <class _From, class _To>
+using __rebind_pointer_t = typename pointer_traits<_From>::template rebind<_To>;
#else
- typedef typename pointer_traits<_From>::template rebind<_To>::other type;
+template <class _From, class _To>
+using __rebind_pointer_t = typename pointer_traits<_From>::template rebind<_To>::other;
#endif
-};
// to_address
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_construct_at.h b/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_construct_at.h
index 29258023e3..19cd0ff7e8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_construct_at.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_construct_at.h
@@ -22,6 +22,7 @@
#include <__utility/declval.h>
#include <__utility/forward.h>
#include <__utility/move.h>
+#include <new>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -29,7 +30,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
// construct_at
@@ -117,7 +118,7 @@ inline namespace __cpo {
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_uninitialized_algorithms.h b/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_uninitialized_algorithms.h
index 8072496c24..7d2ac3af03 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_uninitialized_algorithms.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_uninitialized_algorithms.h
@@ -24,6 +24,7 @@
#include <__ranges/concepts.h>
#include <__ranges/dangling.h>
#include <__utility/move.h>
+#include <new>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -32,7 +33,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -311,7 +312,7 @@ inline namespace __cpo {
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/raw_storage_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__memory/raw_storage_iterator.h
index 9b6594b888..11971de0fa 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/raw_storage_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/raw_storage_iterator.h
@@ -16,6 +16,7 @@
#include <__memory/addressof.h>
#include <__utility/move.h>
#include <cstddef>
+#include <new>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h b/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h
index 8b7256d038..bab8c8c15c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h
@@ -11,6 +11,8 @@
#define _LIBCPP___MEMORY_SHARED_PTR_H
#include <__availability>
+#include <__compare/compare_three_way.h>
+#include <__compare/ordering.h>
#include <__config>
#include <__functional/binary_function.h>
#include <__functional/operations.h>
@@ -19,6 +21,7 @@
#include <__memory/addressof.h>
#include <__memory/allocation_guard.h>
#include <__memory/allocator.h>
+#include <__memory/allocator_destructor.h>
#include <__memory/allocator_traits.h>
#include <__memory/auto_ptr.h>
#include <__memory/compressed_pair.h>
@@ -32,6 +35,7 @@
#include <cstddef>
#include <cstdlib> // abort
#include <iosfwd>
+#include <new>
#include <stdexcept>
#include <type_traits>
#include <typeinfo>
@@ -39,32 +43,12 @@
# include <atomic>
#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Alloc>
-class __allocator_destructor
-{
- typedef _LIBCPP_NODEBUG allocator_traits<_Alloc> __alloc_traits;
-public:
- typedef _LIBCPP_NODEBUG typename __alloc_traits::pointer pointer;
- typedef _LIBCPP_NODEBUG typename __alloc_traits::size_type size_type;
-private:
- _Alloc& __alloc_;
- size_type __s_;
-public:
- _LIBCPP_INLINE_VISIBILITY __allocator_destructor(_Alloc& __a, size_type __s)
- _NOEXCEPT
- : __alloc_(__a), __s_(__s) {}
- _LIBCPP_INLINE_VISIBILITY
- void operator()(pointer __p) _NOEXCEPT
- {__alloc_traits::deallocate(__alloc_, __p, __s_);}
-};
-
// NOTE: Relaxed and acq/rel atomics (for increment and decrement respectively)
// should be sufficient for thread safety.
// See https://llvm.org/PR22803
@@ -128,8 +112,8 @@ class _LIBCPP_EXCEPTION_ABI bad_weak_ptr
public:
bad_weak_ptr() _NOEXCEPT = default;
bad_weak_ptr(const bad_weak_ptr&) _NOEXCEPT = default;
- virtual ~bad_weak_ptr() _NOEXCEPT;
- virtual const char* what() const _NOEXCEPT;
+ ~bad_weak_ptr() _NOEXCEPT override;
+ const char* what() const _NOEXCEPT override;
};
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
@@ -216,7 +200,7 @@ public:
: __shared_count(__refs),
__shared_weak_owners_(__refs) {}
protected:
- virtual ~__shared_weak_count();
+ ~__shared_weak_count() override;
public:
#if defined(_LIBCPP_SHARED_PTR_DEFINE_LEGACY_INLINE_FUNCTIONS)
@@ -263,12 +247,12 @@ public:
: __data_(__compressed_pair<_Tp, _Dp>(__p, _VSTD::move(__d)), _VSTD::move(__a)) {}
#ifndef _LIBCPP_NO_RTTI
- virtual const void* __get_deleter(const type_info&) const _NOEXCEPT;
+ const void* __get_deleter(const type_info&) const _NOEXCEPT override;
#endif
private:
- virtual void __on_zero_shared() _NOEXCEPT;
- virtual void __on_zero_shared_weak() _NOEXCEPT;
+ void __on_zero_shared() _NOEXCEPT override;
+ void __on_zero_shared_weak() _NOEXCEPT override;
};
#ifndef _LIBCPP_NO_RTTI
@@ -328,7 +312,7 @@ struct __shared_ptr_emplace
_Tp* __get_elem() _NOEXCEPT { return __storage_.__get_elem(); }
private:
- virtual void __on_zero_shared() _NOEXCEPT {
+ void __on_zero_shared() _NOEXCEPT override {
#if _LIBCPP_STD_VER > 17
using _TpAlloc = typename __allocator_traits_rebind<_Alloc, _Tp>::type;
_TpAlloc __tmp(*__get_alloc());
@@ -338,7 +322,7 @@ private:
#endif
}
- virtual void __on_zero_shared_weak() _NOEXCEPT {
+ void __on_zero_shared_weak() _NOEXCEPT override {
using _ControlBlockAlloc = typename __allocator_traits_rebind<_Alloc, __shared_ptr_emplace>::type;
using _ControlBlockPointer = typename allocator_traits<_ControlBlockAlloc>::pointer;
_ControlBlockAlloc __tmp(*__get_alloc());
@@ -713,7 +697,7 @@ public:
{
typedef typename __shared_ptr_default_allocator<_Yp>::type _AllocT;
typedef __shared_ptr_pointer<typename unique_ptr<_Yp, _Dp>::pointer,
- reference_wrapper<typename remove_reference<_Dp>::type>,
+ reference_wrapper<__libcpp_remove_reference_t<_Dp> >,
_AllocT> _CntrlBlk;
__cntrl_ = new _CntrlBlk(__r.get(), _VSTD::ref(__r.get_deleter()), _AllocT());
__enable_weak_this(__r.get(), __r.get());
@@ -828,7 +812,7 @@ public:
}
_LIBCPP_HIDE_FROM_ABI
- typename add_lvalue_reference<element_type>::type operator*() const _NOEXCEPT
+ __add_lvalue_reference_t<element_type> operator*() const _NOEXCEPT
{
return *__ptr_;
}
@@ -881,7 +865,7 @@ public:
#if _LIBCPP_STD_VER > 14
_LIBCPP_HIDE_FROM_ABI
- typename add_lvalue_reference<element_type>::type operator[](ptrdiff_t __i) const
+ __add_lvalue_reference_t<element_type> operator[](ptrdiff_t __i) const
{
static_assert(is_array<_Tp>::value,
"std::shared_ptr<T>::operator[] is only valid when T is an array type.");
@@ -930,7 +914,7 @@ private:
_LIBCPP_HIDE_FROM_ABI
void __enable_weak_this(const enable_shared_from_this<_Yp>* __e, _OrigPtr* __ptr) _NOEXCEPT
{
- typedef typename remove_cv<_Yp>::type _RawYp;
+ typedef __remove_cv_t<_Yp> _RawYp;
if (__e && __e->__weak_this_.expired())
{
__e->__weak_this_ = shared_ptr<_RawYp>(*this,
@@ -1210,6 +1194,8 @@ operator==(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
return __x.get() == __y.get();
}
+#if _LIBCPP_STD_VER <= 17
+
template<class _Tp, class _Up>
inline _LIBCPP_INLINE_VISIBILITY
bool
@@ -1256,6 +1242,17 @@ operator>=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
return !(__x < __y);
}
+#endif // _LIBCPP_STD_VER <= 17
+
+#if _LIBCPP_STD_VER > 17
+template<class _Tp, class _Up>
+_LIBCPP_HIDE_FROM_ABI strong_ordering
+operator<=>(shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) noexcept
+{
+ return compare_three_way()(__x.get(), __y.get());
+}
+#endif
+
template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
@@ -1264,6 +1261,8 @@ operator==(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
return !__x;
}
+#if _LIBCPP_STD_VER <= 17
+
template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
@@ -1352,6 +1351,17 @@ operator>=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
return !(nullptr < __x);
}
+#endif // _LIBCPP_STD_VER <= 17
+
+#if _LIBCPP_STD_VER > 17
+template<class _Tp>
+_LIBCPP_HIDE_FROM_ABI strong_ordering
+operator<=>(shared_ptr<_Tp> const& __x, nullptr_t) noexcept
+{
+ return compare_three_way()(__x.get(), static_cast<typename shared_ptr<_Tp>::element_type*>(nullptr));
+}
+#endif
+
template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
void
@@ -1381,7 +1391,7 @@ dynamic_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
}
template<class _Tp, class _Up>
-shared_ptr<_Tp>
+_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
const_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
{
typedef typename shared_ptr<_Tp>::element_type _RTp;
@@ -1389,7 +1399,7 @@ const_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
}
template<class _Tp, class _Up>
-shared_ptr<_Tp>
+_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
reinterpret_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
{
return shared_ptr<_Tp>(__r,
@@ -1797,7 +1807,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p);
class _LIBCPP_TYPE_VIS __sp_mut
{
- void* __lx;
+ void* __lx_;
public:
void lock() _NOEXCEPT;
void unlock() _NOEXCEPT;
@@ -1823,7 +1833,7 @@ atomic_is_lock_free(const shared_ptr<_Tp>*)
template <class _Tp>
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
-shared_ptr<_Tp>
+_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
atomic_load(const shared_ptr<_Tp>* __p)
{
__sp_mut& __m = __get_sp_mut(__p);
@@ -1844,7 +1854,7 @@ atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order)
template <class _Tp>
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
-void
+_LIBCPP_HIDE_FROM_ABI void
atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
{
__sp_mut& __m = __get_sp_mut(__p);
@@ -1864,7 +1874,7 @@ atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
template <class _Tp>
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
-shared_ptr<_Tp>
+_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
{
__sp_mut& __m = __get_sp_mut(__p);
@@ -1885,7 +1895,7 @@ atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order
template <class _Tp>
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
-bool
+_LIBCPP_HIDE_FROM_ABI bool
atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w)
{
shared_ptr<_Tp> __temp;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/swap_allocator.h b/contrib/libs/cxxsupp/libcxx/include/__memory/swap_allocator.h
index 64970fa9e2..c6e1751f4d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/swap_allocator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/swap_allocator.h
@@ -12,6 +12,7 @@
#include <__config>
#include <__memory/allocator_traits.h>
#include <__type_traits/integral_constant.h>
+#include <__type_traits/is_swappable.h>
#include <__utility/swap.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -21,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <typename _Alloc>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void __swap_allocator(_Alloc& __a1, _Alloc& __a2, true_type)
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __swap_allocator(_Alloc& __a1, _Alloc& __a2, true_type)
#if _LIBCPP_STD_VER > 11
_NOEXCEPT
#else
@@ -33,11 +34,11 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void __swap_allocator(_Alloc
}
template <typename _Alloc>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
__swap_allocator(_Alloc&, _Alloc&, false_type) _NOEXCEPT {}
template <typename _Alloc>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void __swap_allocator(_Alloc& __a1, _Alloc& __a2)
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __swap_allocator(_Alloc& __a1, _Alloc& __a2)
#if _LIBCPP_STD_VER > 11
_NOEXCEPT
#else
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/temp_value.h b/contrib/libs/cxxsupp/libcxx/include/__memory/temp_value.h
new file mode 100644
index 0000000000..164688b15f
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/temp_value.h
@@ -0,0 +1,56 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___MEMORY_TEMP_VALUE_H
+#define _LIBCPP___MEMORY_TEMP_VALUE_H
+
+#include <__config>
+#include <__memory/addressof.h>
+#include <__memory/allocator_traits.h>
+#include <__type_traits/aligned_storage.h>
+#include <__utility/forward.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _Tp, class _Alloc>
+struct __temp_value {
+ typedef allocator_traits<_Alloc> _Traits;
+
+#ifdef _LIBCPP_CXX03_LANG
+ typename aligned_storage<sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)>::type __v;
+#else
+ union { _Tp __v; };
+#endif
+ _Alloc &__a;
+
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp *__addr() {
+#ifdef _LIBCPP_CXX03_LANG
+ return reinterpret_cast<_Tp*>(std::addressof(__v));
+#else
+ return std::addressof(__v);
+#endif
+ }
+
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp & get() { return *__addr(); }
+
+ template<class... _Args>
+ _LIBCPP_NO_CFI
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 __temp_value(_Alloc &__alloc, _Args&& ... __args) : __a(__alloc) {
+ _Traits::construct(__a, __addr(), std::forward<_Args>(__args)...);
+ }
+
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 ~__temp_value() { _Traits::destroy(__a, __addr()); }
+};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___MEMORY_TEMP_VALUE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/temporary_buffer.h b/contrib/libs/cxxsupp/libcxx/include/__memory/temporary_buffer.h
index b1f7a12629..c917f041a0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/temporary_buffer.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/temporary_buffer.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-_LIBCPP_NODISCARD_EXT _LIBCPP_NO_CFI _LIBCPP_DEPRECATED_IN_CXX17
+_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI _LIBCPP_DEPRECATED_IN_CXX17
pair<_Tp*, ptrdiff_t>
get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/uninitialized_algorithms.h b/contrib/libs/cxxsupp/libcxx/include/__memory/uninitialized_algorithms.h
index 58728b7378..948774d53f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/uninitialized_algorithms.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/uninitialized_algorithms.h
@@ -24,6 +24,7 @@
#include <__utility/move.h>
#include <__utility/pair.h>
#include <__utility/transaction.h>
+#include <new>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -64,6 +65,7 @@ __uninitialized_copy(_InputIterator __ifirst, _Sentinel1 __ilast,
}
template <class _InputIterator, class _ForwardIterator>
+_LIBCPP_HIDE_FROM_ABI
_ForwardIterator uninitialized_copy(_InputIterator __ifirst, _InputIterator __ilast,
_ForwardIterator __ofirst) {
typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
@@ -500,7 +502,7 @@ constexpr void __uninitialized_allocator_value_construct_n(_Alloc& __alloc, _Bid
// Destroy all elements in [__first, __last) from left to right using allocator destruction.
template <class _Alloc, class _Iter, class _Sent>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
__allocator_destroy(_Alloc& __alloc, _Iter __first, _Sent __last) {
for (; __first != __last; ++__first)
allocator_traits<_Alloc>::destroy(__alloc, std::__to_address(__first));
@@ -509,11 +511,11 @@ __allocator_destroy(_Alloc& __alloc, _Iter __first, _Sent __last) {
template <class _Alloc, class _Iter>
class _AllocatorDestroyRangeReverse {
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
_AllocatorDestroyRangeReverse(_Alloc& __alloc, _Iter& __first, _Iter& __last)
: __alloc_(__alloc), __first_(__first), __last_(__last) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void operator()() const {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void operator()() const {
std::__allocator_destroy(__alloc_, std::reverse_iterator<_Iter>(__last_), std::reverse_iterator<_Iter>(__first_));
}
@@ -528,7 +530,7 @@ private:
// The caller has to ensure that __first2 can hold at least N uninitialized elements. If an exception is thrown the
// already copied elements are destroyed in reverse order of their construction.
template <class _Alloc, class _Iter1, class _Sent1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter2
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter2
__uninitialized_allocator_copy(_Alloc& __alloc, _Iter1 __first1, _Sent1 __last1, _Iter2 __first2) {
#ifndef _LIBCPP_NO_EXCEPTIONS
auto __destruct_first = __first2;
@@ -557,12 +559,12 @@ struct __allocator_has_trivial_copy_construct<allocator<_Type>, _Type> : true_ty
#ifndef __CUDACC__
template <class _Alloc,
class _Type,
- class _RawType = typename remove_const<_Type>::type,
+ class _RawType = __remove_const_t<_Type>,
__enable_if_t<
// using _RawType because of the allocator<T const> extension
is_trivially_copy_constructible<_RawType>::value && is_trivially_copy_assignable<_RawType>::value &&
__allocator_has_trivial_copy_construct<_Alloc, _RawType>::value>* = nullptr>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Type*
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Type*
__uninitialized_allocator_copy(_Alloc&, const _Type* __first1, const _Type* __last1, _Type* __first2) {
// TODO: Remove the const_cast once we drop support for std::allocator<T const>
if (__libcpp_is_constant_evaluated()) {
@@ -584,7 +586,7 @@ __uninitialized_allocator_copy(_Alloc&, const _Type* __first1, const _Type* __la
// Otherwise try to copy all elements. If an exception is thrown the already copied
// elements are destroyed in reverse order of their construction.
template <class _Alloc, class _Iter1, class _Sent1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter2 __uninitialized_allocator_move_if_noexcept(
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter2 __uninitialized_allocator_move_if_noexcept(
_Alloc& __alloc, _Iter1 __first1, _Sent1 __last1, _Iter2 __first2) {
static_assert(__is_cpp17_move_insertable<_Alloc>::value,
"The specified type does not meet the requirements of Cpp17MoveInsertable");
@@ -624,7 +626,7 @@ template <
class _Type = typename iterator_traits<_Iter1>::value_type,
class = __enable_if_t<is_trivially_move_constructible<_Type>::value && is_trivially_move_assignable<_Type>::value &&
__allocator_has_trivial_move_construct<_Alloc, _Type>::value> >
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter2
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter2
__uninitialized_allocator_move_if_noexcept(_Alloc&, _Iter1 __first1, _Iter1 __last1, _Iter2 __first2) {
if (__libcpp_is_constant_evaluated()) {
while (__first1 != __last1) {
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h b/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h
index 8df73cf4ed..2230d934be 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h
@@ -10,6 +10,9 @@
#ifndef _LIBCPP___MEMORY_UNIQUE_PTR_H
#define _LIBCPP___MEMORY_UNIQUE_PTR_H
+#include <__compare/compare_three_way.h>
+#include <__compare/compare_three_way_result.h>
+#include <__compare/three_way_comparable.h>
#include <__config>
#include <__functional/hash.h>
#include <__functional/operations.h>
@@ -38,12 +41,10 @@ struct _LIBCPP_TEMPLATE_VIS default_delete {
_LIBCPP_INLINE_VISIBILITY default_delete() {}
#endif
template <class _Up>
- _LIBCPP_INLINE_VISIBILITY
- default_delete(const default_delete<_Up>&,
- typename enable_if<is_convertible<_Up*, _Tp*>::value>::type* =
- 0) _NOEXCEPT {}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 default_delete(
+ const default_delete<_Up>&, typename enable_if<is_convertible<_Up*, _Tp*>::value>::type* = 0) _NOEXCEPT {}
- _LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __ptr) const _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator()(_Tp* __ptr) const _NOEXCEPT {
static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
static_assert(!is_void<_Tp>::value, "cannot delete an incomplete type");
delete __ptr;
@@ -65,13 +66,11 @@ public:
#endif
template <class _Up>
- _LIBCPP_INLINE_VISIBILITY
- default_delete(const default_delete<_Up[]>&,
- typename _EnableIfConvertible<_Up>::type* = 0) _NOEXCEPT {}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
+ default_delete(const default_delete<_Up[]>&, typename _EnableIfConvertible<_Up>::type* = 0) _NOEXCEPT {}
template <class _Up>
- _LIBCPP_INLINE_VISIBILITY
- typename _EnableIfConvertible<_Up>::type
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 typename _EnableIfConvertible<_Up>::type
operator()(_Up* __ptr) const _NOEXCEPT {
static_assert(sizeof(_Up) >= 0, "cannot delete an incomplete type");
delete[] __ptr;
@@ -173,22 +172,17 @@ public:
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
- template <bool _Dummy = true,
- class = _EnableIfDeleterDefaultConstructible<_Dummy> >
- _LIBCPP_INLINE_VISIBILITY
- explicit unique_ptr(pointer __p) _NOEXCEPT : __ptr_(__p, __value_init_tag()) {}
+ template <bool _Dummy = true, class = _EnableIfDeleterDefaultConstructible<_Dummy> >
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit unique_ptr(pointer __p) _NOEXCEPT
+ : __ptr_(__p, __value_init_tag()) {}
- template <bool _Dummy = true,
- class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> > >
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr(pointer __p, _LValRefType<_Dummy> __d) _NOEXCEPT
+ template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> > >
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(pointer __p, _LValRefType<_Dummy> __d) _NOEXCEPT
: __ptr_(__p, __d) {}
- template <bool _Dummy = true,
- class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> > >
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr(pointer __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
- : __ptr_(__p, _VSTD::move(__d)) {
+ template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> > >
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
+ unique_ptr(pointer __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT : __ptr_(__p, _VSTD::move(__d)) {
static_assert(!is_reference<deleter_type>::value,
"rvalue deleter bound to reference");
}
@@ -198,17 +192,14 @@ public:
_LIBCPP_INLINE_VISIBILITY
unique_ptr(pointer __p, _BadRValRefType<_Dummy> __d) = delete;
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr(unique_ptr&& __u) _NOEXCEPT
- : __ptr_(__u.release(), _VSTD::forward<deleter_type>(__u.get_deleter())) {
- }
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(unique_ptr&& __u) _NOEXCEPT
+ : __ptr_(__u.release(), _VSTD::forward<deleter_type>(__u.get_deleter())) {}
- template <class _Up, class _Ep,
- class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
- class = _EnableIfDeleterConvertible<_Ep>
- >
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
+ template <class _Up,
+ class _Ep,
+ class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
+ class = _EnableIfDeleterConvertible<_Ep> >
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
: __ptr_(__u.release(), _VSTD::forward<_Ep>(__u.get_deleter())) {}
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
@@ -221,19 +212,17 @@ public:
: __ptr_(__p.release(), __value_init_tag()) {}
#endif
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
reset(__u.release());
__ptr_.second() = _VSTD::forward<deleter_type>(__u.get_deleter());
return *this;
}
- template <class _Up, class _Ep,
- class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
- class = _EnableIfDeleterAssignable<_Ep>
- >
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
+ template <class _Up,
+ class _Ep,
+ class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
+ class = _EnableIfDeleterAssignable<_Ep> >
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
reset(__u.release());
__ptr_.second() = _VSTD::forward<_Ep>(__u.get_deleter());
return *this;
@@ -256,58 +245,44 @@ public:
unique_ptr& operator=(unique_ptr const&) = delete;
#endif
- _LIBCPP_INLINE_VISIBILITY
- ~unique_ptr() { reset(); }
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr& operator=(nullptr_t) _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(nullptr_t) _NOEXCEPT {
reset();
return *this;
}
- _LIBCPP_INLINE_VISIBILITY
- typename add_lvalue_reference<_Tp>::type
- operator*() const {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 __add_lvalue_reference_t<_Tp> operator*() const {
return *__ptr_.first();
}
- _LIBCPP_INLINE_VISIBILITY
- pointer operator->() const _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer operator->() const _NOEXCEPT {
return __ptr_.first();
}
- _LIBCPP_INLINE_VISIBILITY
- pointer get() const _NOEXCEPT {
- return __ptr_.first();
- }
- _LIBCPP_INLINE_VISIBILITY
- deleter_type& get_deleter() _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer get() const _NOEXCEPT { return __ptr_.first(); }
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 deleter_type& get_deleter() _NOEXCEPT {
return __ptr_.second();
}
- _LIBCPP_INLINE_VISIBILITY
- const deleter_type& get_deleter() const _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 const deleter_type& get_deleter() const _NOEXCEPT {
return __ptr_.second();
}
- _LIBCPP_INLINE_VISIBILITY
- explicit operator bool() const _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit operator bool() const _NOEXCEPT {
return __ptr_.first() != nullptr;
}
- _LIBCPP_INLINE_VISIBILITY
- pointer release() _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer release() _NOEXCEPT {
pointer __t = __ptr_.first();
__ptr_.first() = pointer();
return __t;
}
- _LIBCPP_INLINE_VISIBILITY
- void reset(pointer __p = pointer()) _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void reset(pointer __p = pointer()) _NOEXCEPT {
pointer __tmp = __ptr_.first();
__ptr_.first() = __p;
if (__tmp)
__ptr_.second()(__tmp);
}
- _LIBCPP_INLINE_VISIBILITY
- void swap(unique_ptr& __u) _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void swap(unique_ptr& __u) _NOEXCEPT {
__ptr_.swap(__u.__ptr_);
}
};
@@ -395,40 +370,36 @@ public:
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
- template <class _Pp, bool _Dummy = true,
- class = _EnableIfDeleterDefaultConstructible<_Dummy>,
- class = _EnableIfPointerConvertible<_Pp> >
- _LIBCPP_INLINE_VISIBILITY
- explicit unique_ptr(_Pp __p) _NOEXCEPT
+ template <class _Pp,
+ bool _Dummy = true,
+ class = _EnableIfDeleterDefaultConstructible<_Dummy>,
+ class = _EnableIfPointerConvertible<_Pp> >
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit unique_ptr(_Pp __p) _NOEXCEPT
: __ptr_(__p, __value_init_tag()) {}
- template <class _Pp, bool _Dummy = true,
- class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> >,
- class = _EnableIfPointerConvertible<_Pp> >
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr(_Pp __p, _LValRefType<_Dummy> __d) _NOEXCEPT
+ template <class _Pp,
+ bool _Dummy = true,
+ class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> >,
+ class = _EnableIfPointerConvertible<_Pp> >
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(_Pp __p, _LValRefType<_Dummy> __d) _NOEXCEPT
: __ptr_(__p, __d) {}
- template <bool _Dummy = true,
- class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> > >
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr(nullptr_t, _LValRefType<_Dummy> __d) _NOEXCEPT
+ template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> > >
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(nullptr_t, _LValRefType<_Dummy> __d) _NOEXCEPT
: __ptr_(nullptr, __d) {}
- template <class _Pp, bool _Dummy = true,
- class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> >,
- class = _EnableIfPointerConvertible<_Pp> >
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr(_Pp __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
+ template <class _Pp,
+ bool _Dummy = true,
+ class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> >,
+ class = _EnableIfPointerConvertible<_Pp> >
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(_Pp __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
: __ptr_(__p, _VSTD::move(__d)) {
static_assert(!is_reference<deleter_type>::value,
"rvalue deleter bound to reference");
}
- template <bool _Dummy = true,
- class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> > >
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr(nullptr_t, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
+ template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> > >
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(nullptr_t, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
: __ptr_(nullptr, _VSTD::move(__d)) {
static_assert(!is_reference<deleter_type>::value,
"rvalue deleter bound to reference");
@@ -440,34 +411,27 @@ public:
_LIBCPP_INLINE_VISIBILITY
unique_ptr(_Pp __p, _BadRValRefType<_Dummy> __d) = delete;
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr(unique_ptr&& __u) _NOEXCEPT
- : __ptr_(__u.release(), _VSTD::forward<deleter_type>(__u.get_deleter())) {
- }
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(unique_ptr&& __u) _NOEXCEPT
+ : __ptr_(__u.release(), _VSTD::forward<deleter_type>(__u.get_deleter())) {}
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
reset(__u.release());
__ptr_.second() = _VSTD::forward<deleter_type>(__u.get_deleter());
return *this;
}
- template <class _Up, class _Ep,
- class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
- class = _EnableIfDeleterConvertible<_Ep>
- >
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
- : __ptr_(__u.release(), _VSTD::forward<_Ep>(__u.get_deleter())) {
- }
+ template <class _Up,
+ class _Ep,
+ class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
+ class = _EnableIfDeleterConvertible<_Ep> >
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
+ : __ptr_(__u.release(), _VSTD::forward<_Ep>(__u.get_deleter())) {}
- template <class _Up, class _Ep,
- class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
- class = _EnableIfDeleterAssignable<_Ep>
- >
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr&
- operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
+ template <class _Up,
+ class _Ep,
+ class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
+ class = _EnableIfDeleterAssignable<_Ep> >
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
reset(__u.release());
__ptr_.second() = _VSTD::forward<_Ep>(__u.get_deleter());
return *this;
@@ -478,90 +442,77 @@ public:
unique_ptr& operator=(unique_ptr const&) = delete;
#endif
public:
- _LIBCPP_INLINE_VISIBILITY
- ~unique_ptr() { reset(); }
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
- _LIBCPP_INLINE_VISIBILITY
- unique_ptr& operator=(nullptr_t) _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(nullptr_t) _NOEXCEPT {
reset();
return *this;
}
- _LIBCPP_INLINE_VISIBILITY
- typename add_lvalue_reference<_Tp>::type
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 __add_lvalue_reference_t<_Tp>
operator[](size_t __i) const {
return __ptr_.first()[__i];
}
- _LIBCPP_INLINE_VISIBILITY
- pointer get() const _NOEXCEPT {
- return __ptr_.first();
- }
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer get() const _NOEXCEPT { return __ptr_.first(); }
- _LIBCPP_INLINE_VISIBILITY
- deleter_type& get_deleter() _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 deleter_type& get_deleter() _NOEXCEPT {
return __ptr_.second();
}
- _LIBCPP_INLINE_VISIBILITY
- const deleter_type& get_deleter() const _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 const deleter_type& get_deleter() const _NOEXCEPT {
return __ptr_.second();
}
- _LIBCPP_INLINE_VISIBILITY
- explicit operator bool() const _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit operator bool() const _NOEXCEPT {
return __ptr_.first() != nullptr;
}
- _LIBCPP_INLINE_VISIBILITY
- pointer release() _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer release() _NOEXCEPT {
pointer __t = __ptr_.first();
__ptr_.first() = pointer();
return __t;
}
template <class _Pp>
- _LIBCPP_INLINE_VISIBILITY
- typename enable_if<
- _CheckArrayPointerConversion<_Pp>::value
- >::type
- reset(_Pp __p) _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
+ typename enable_if< _CheckArrayPointerConversion<_Pp>::value >::type
+ reset(_Pp __p) _NOEXCEPT {
pointer __tmp = __ptr_.first();
__ptr_.first() = __p;
if (__tmp)
__ptr_.second()(__tmp);
}
- _LIBCPP_INLINE_VISIBILITY
- void reset(nullptr_t = nullptr) _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void reset(nullptr_t = nullptr) _NOEXCEPT {
pointer __tmp = __ptr_.first();
__ptr_.first() = nullptr;
if (__tmp)
__ptr_.second()(__tmp);
}
- _LIBCPP_INLINE_VISIBILITY
- void swap(unique_ptr& __u) _NOEXCEPT {
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void swap(unique_ptr& __u) _NOEXCEPT {
__ptr_.swap(__u.__ptr_);
}
-
};
template <class _Tp, class _Dp>
-inline _LIBCPP_INLINE_VISIBILITY
-typename enable_if<
- __is_swappable<_Dp>::value,
- void
->::type
-swap(unique_ptr<_Tp, _Dp>& __x, unique_ptr<_Tp, _Dp>& __y) _NOEXCEPT {__x.swap(__y);}
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
+ typename enable_if< __is_swappable<_Dp>::value, void >::type
+ swap(unique_ptr<_Tp, _Dp>& __x, unique_ptr<_Tp, _Dp>& __y) _NOEXCEPT {
+ __x.swap(__y);
+}
template <class _T1, class _D1, class _T2, class _D2>
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator==(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return __x.get() == __y.get();}
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
+operator==(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {
+ return __x.get() == __y.get();
+}
+#if _LIBCPP_STD_VER <= 17
template <class _T1, class _D1, class _T2, class _D2>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return !(__x == __y);}
+#endif
template <class _T1, class _D1, class _T2, class _D2>
inline _LIBCPP_INLINE_VISIBILITY
@@ -589,14 +540,26 @@ inline _LIBCPP_INLINE_VISIBILITY
bool
operator>=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return !(__x < __y);}
+
+#if _LIBCPP_STD_VER > 17
+template <class _T1, class _D1, class _T2, class _D2>
+requires three_way_comparable_with<typename unique_ptr<_T1, _D1>::pointer,
+ typename unique_ptr<_T2, _D2>::pointer>
+_LIBCPP_HIDE_FROM_ABI
+compare_three_way_result_t<typename unique_ptr<_T1, _D1>::pointer,
+ typename unique_ptr<_T2, _D2>::pointer>
+operator<=>(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {
+ return compare_three_way()(__x.get(), __y.get());
+}
+#endif
+
template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator==(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT
-{
- return !__x;
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
+operator==(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT {
+ return !__x;
}
+#if _LIBCPP_STD_VER <= 17
template <class _T1, class _D1>
inline _LIBCPP_INLINE_VISIBILITY
bool
@@ -620,73 +583,68 @@ operator!=(nullptr_t, const unique_ptr<_T1, _D1>& __x) _NOEXCEPT
{
return static_cast<bool>(__x);
}
+#endif // _LIBCPP_STD_VER <= 17
template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator<(const unique_ptr<_T1, _D1>& __x, nullptr_t)
-{
- typedef typename unique_ptr<_T1, _D1>::pointer _P1;
- return less<_P1>()(__x.get(), nullptr);
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
+operator<(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
+ typedef typename unique_ptr<_T1, _D1>::pointer _P1;
+ return less<_P1>()(__x.get(), nullptr);
}
template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator<(nullptr_t, const unique_ptr<_T1, _D1>& __x)
-{
- typedef typename unique_ptr<_T1, _D1>::pointer _P1;
- return less<_P1>()(nullptr, __x.get());
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
+operator<(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
+ typedef typename unique_ptr<_T1, _D1>::pointer _P1;
+ return less<_P1>()(nullptr, __x.get());
}
template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator>(const unique_ptr<_T1, _D1>& __x, nullptr_t)
-{
- return nullptr < __x;
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
+operator>(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
+ return nullptr < __x;
}
template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator>(nullptr_t, const unique_ptr<_T1, _D1>& __x)
-{
- return __x < nullptr;
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
+operator>(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
+ return __x < nullptr;
}
template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator<=(const unique_ptr<_T1, _D1>& __x, nullptr_t)
-{
- return !(nullptr < __x);
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
+operator<=(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
+ return !(nullptr < __x);
}
template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator<=(nullptr_t, const unique_ptr<_T1, _D1>& __x)
-{
- return !(__x < nullptr);
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
+operator<=(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
+ return !(__x < nullptr);
}
template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator>=(const unique_ptr<_T1, _D1>& __x, nullptr_t)
-{
- return !(__x < nullptr);
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
+operator>=(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
+ return !(__x < nullptr);
}
template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator>=(nullptr_t, const unique_ptr<_T1, _D1>& __x)
-{
- return !(nullptr < __x);
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
+operator>=(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
+ return !(nullptr < __x);
}
+#if _LIBCPP_STD_VER > 17
+template <class _T1, class _D1>
+ requires three_way_comparable<
+ typename unique_ptr<_T1, _D1>::pointer> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
+ compare_three_way_result_t<typename unique_ptr<_T1, _D1>::pointer>
+operator<=>(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
+ return compare_three_way()(__x.get(), static_cast<typename unique_ptr<_T1, _D1>::pointer>(nullptr));
+}
+#endif
+
#if _LIBCPP_STD_VER > 11
template<class _Tp>
@@ -707,21 +665,17 @@ struct __unique_if<_Tp[_Np]>
typedef void __unique_array_known_bound;
};
-template<class _Tp, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
-typename __unique_if<_Tp>::__unique_single
-make_unique(_Args&&... __args)
-{
- return unique_ptr<_Tp>(new _Tp(_VSTD::forward<_Args>(__args)...));
+template <class _Tp, class... _Args>
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 typename __unique_if<_Tp>::__unique_single
+make_unique(_Args&&... __args) {
+ return unique_ptr<_Tp>(new _Tp(_VSTD::forward<_Args>(__args)...));
}
-template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
-typename __unique_if<_Tp>::__unique_array_unknown_bound
-make_unique(size_t __n)
-{
- typedef typename remove_extent<_Tp>::type _Up;
- return unique_ptr<_Tp>(new _Up[__n]());
+template <class _Tp>
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 typename __unique_if<_Tp>::__unique_array_unknown_bound
+make_unique(size_t __n) {
+ typedef __remove_extent_t<_Tp> _Up;
+ return unique_ptr<_Tp>(new _Up[__n]());
}
template<class _Tp, class... _Args>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/uses_allocator_construction.h b/contrib/libs/cxxsupp/libcxx/include/__memory/uses_allocator_construction.h
new file mode 100644
index 0000000000..02e0668d12
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/uses_allocator_construction.h
@@ -0,0 +1,219 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___MEMORY_USES_ALLOCATOR_CONSTRUCTION_H
+#define _LIBCPP___MEMORY_USES_ALLOCATOR_CONSTRUCTION_H
+
+#include <__config>
+#include <__memory/construct_at.h>
+#include <__memory/uses_allocator.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/is_same.h>
+#include <__utility/pair.h>
+#include <tuple>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER >= 17
+
+template <class _Type>
+inline constexpr bool __is_std_pair = false;
+
+template <class _Type1, class _Type2>
+inline constexpr bool __is_std_pair<pair<_Type1, _Type2>> = true;
+
+template <class _Type, class _Alloc, class... _Args, __enable_if_t<!__is_std_pair<_Type>, int> = 0>
+_LIBCPP_HIDE_FROM_ABI constexpr auto
+__uses_allocator_construction_args(const _Alloc& __alloc, _Args&&... __args) noexcept {
+ if constexpr (!uses_allocator_v<_Type, _Alloc> && is_constructible_v<_Type, _Args...>) {
+ return std::forward_as_tuple(std::forward<_Args>(__args)...);
+ } else if constexpr (uses_allocator_v<_Type, _Alloc> &&
+ is_constructible_v<_Type, allocator_arg_t, const _Alloc&, _Args...>) {
+ return tuple<allocator_arg_t, const _Alloc&, _Args&&...>(allocator_arg, __alloc, std::forward<_Args>(__args)...);
+ } else if constexpr (uses_allocator_v<_Type, _Alloc> && is_constructible_v<_Type, _Args..., const _Alloc&>) {
+ return std::forward_as_tuple(std::forward<_Args>(__args)..., __alloc);
+ } else {
+ static_assert(
+ sizeof(_Type) + 1 == 0, "If uses_allocator_v<Type> is true, the type has to be allocator-constructible");
+ }
+}
+
+template <class _Pair, class _Alloc, class _Tuple1, class _Tuple2, __enable_if_t<__is_std_pair<_Pair>, int> = 0>
+_LIBCPP_HIDE_FROM_ABI constexpr auto __uses_allocator_construction_args(
+ const _Alloc& __alloc, piecewise_construct_t, _Tuple1&& __x, _Tuple2&& __y) noexcept {
+ return std::make_tuple(
+ piecewise_construct,
+ std::apply(
+ [&__alloc](auto&&... __args1) {
+ return std::__uses_allocator_construction_args<typename _Pair::first_type>(
+ __alloc, std::forward<decltype(__args1)>(__args1)...);
+ },
+ std::forward<_Tuple1>(__x)),
+ std::apply(
+ [&__alloc](auto&&... __args2) {
+ return std::__uses_allocator_construction_args<typename _Pair::second_type>(
+ __alloc, std::forward<decltype(__args2)>(__args2)...);
+ },
+ std::forward<_Tuple2>(__y)));
+}
+
+template <class _Pair, class _Alloc, __enable_if_t<__is_std_pair<_Pair>, int> = 0>
+_LIBCPP_HIDE_FROM_ABI constexpr auto __uses_allocator_construction_args(const _Alloc& __alloc) noexcept {
+ return std::__uses_allocator_construction_args<_Pair>(__alloc, piecewise_construct, tuple<>{}, tuple<>{});
+}
+
+template <class _Pair, class _Alloc, class _Up, class _Vp, __enable_if_t<__is_std_pair<_Pair>, int> = 0>
+_LIBCPP_HIDE_FROM_ABI constexpr auto
+__uses_allocator_construction_args(const _Alloc& __alloc, _Up&& __u, _Vp&& __v) noexcept {
+ return std::__uses_allocator_construction_args<_Pair>(
+ __alloc,
+ piecewise_construct,
+ std::forward_as_tuple(std::forward<_Up>(__u)),
+ std::forward_as_tuple(std::forward<_Vp>(__v)));
+}
+
+# if _LIBCPP_STD_VER > 20
+template <class _Pair, class _Alloc, class _Up, class _Vp, __enable_if_t<__is_std_pair<_Pair>, int> = 0>
+_LIBCPP_HIDE_FROM_ABI constexpr auto
+__uses_allocator_construction_args(const _Alloc& __alloc, pair<_Up, _Vp>& __pair) noexcept {
+ return std::__uses_allocator_construction_args<_Pair>(
+ __alloc, piecewise_construct, std::forward_as_tuple(__pair.first), std::forward_as_tuple(__pair.second));
+}
+# endif
+
+template <class _Pair, class _Alloc, class _Up, class _Vp, __enable_if_t<__is_std_pair<_Pair>, int> = 0>
+_LIBCPP_HIDE_FROM_ABI constexpr auto
+__uses_allocator_construction_args(const _Alloc& __alloc, const pair<_Up, _Vp>& __pair) noexcept {
+ return std::__uses_allocator_construction_args<_Pair>(
+ __alloc, piecewise_construct, std::forward_as_tuple(__pair.first), std::forward_as_tuple(__pair.second));
+}
+
+template <class _Pair, class _Alloc, class _Up, class _Vp, __enable_if_t<__is_std_pair<_Pair>, int> = 0>
+_LIBCPP_HIDE_FROM_ABI constexpr auto
+__uses_allocator_construction_args(const _Alloc& __alloc, pair<_Up, _Vp>&& __pair) noexcept {
+ return std::__uses_allocator_construction_args<_Pair>(
+ __alloc,
+ piecewise_construct,
+ std::forward_as_tuple(std::get<0>(std::move(__pair))),
+ std::forward_as_tuple(std::get<1>(std::move(__pair))));
+}
+
+# if _LIBCPP_STD_VER > 20
+template <class _Pair, class _Alloc, class _Up, class _Vp, __enable_if_t<__is_std_pair<_Pair>, int> = 0>
+_LIBCPP_HIDE_FROM_ABI constexpr auto
+__uses_allocator_construction_args(const _Alloc& __alloc, const pair<_Up, _Vp>&& __pair) noexcept {
+ return std::__uses_allocator_construction_args<_Pair>(
+ __alloc,
+ piecewise_construct,
+ std::forward_as_tuple(std::get<0>(std::move(__pair))),
+ std::forward_as_tuple(std::get<1>(std::move(__pair))));
+}
+# endif
+
+namespace __uses_allocator_detail {
+
+template <class _Ap, class _Bp>
+void __fun(const pair<_Ap, _Bp>&);
+
+template <class _Tp>
+decltype(__uses_allocator_detail::__fun(std::declval<_Tp>()), true_type()) __convertible_to_const_pair_ref_impl(int);
+
+template <class>
+false_type __convertible_to_const_pair_ref_impl(...);
+
+template <class _Tp>
+inline constexpr bool __convertible_to_const_pair_ref =
+ decltype(__uses_allocator_detail::__convertible_to_const_pair_ref_impl<_Tp>(0))::value;
+
+} // namespace __uses_allocator_detail
+
+template <
+ class _Pair,
+ class _Alloc,
+ class _Type,
+ __enable_if_t<__is_std_pair<_Pair> && !__uses_allocator_detail::__convertible_to_const_pair_ref<_Type>, int> = 0>
+_LIBCPP_HIDE_FROM_ABI constexpr auto
+__uses_allocator_construction_args(const _Alloc& __alloc, _Type&& __value) noexcept;
+
+template <class _Type, class _Alloc, class... _Args>
+_LIBCPP_HIDE_FROM_ABI constexpr _Type __make_obj_using_allocator(const _Alloc& __alloc, _Args&&... __args);
+
+template <class _Pair,
+ class _Alloc,
+ class _Type,
+ __enable_if_t<__is_std_pair<_Pair> && !__uses_allocator_detail::__convertible_to_const_pair_ref<_Type>, int>>
+_LIBCPP_HIDE_FROM_ABI constexpr auto
+__uses_allocator_construction_args(const _Alloc& __alloc, _Type&& __value) noexcept {
+ struct __pair_constructor {
+ using _PairMutable = remove_cv_t<_Pair>;
+
+ _LIBCPP_HIDE_FROM_ABI constexpr auto __do_construct(const _PairMutable& __pair) const {
+ return std::__make_obj_using_allocator<_PairMutable>(__alloc_, __pair);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr auto __do_construct(_PairMutable&& __pair) const {
+ return std::__make_obj_using_allocator<_PairMutable>(__alloc_, std::move(__pair));
+ }
+
+ const _Alloc& __alloc_;
+ _Type& __value_;
+
+ _LIBCPP_HIDE_FROM_ABI constexpr operator _PairMutable() const {
+ return __do_construct(std::forward<_Type>(this->__value_));
+ }
+ };
+
+ return std::make_tuple(__pair_constructor{__alloc, __value});
+}
+
+template <class _Type, class _Alloc, class... _Args>
+_LIBCPP_HIDE_FROM_ABI constexpr _Type __make_obj_using_allocator(const _Alloc& __alloc, _Args&&... __args) {
+ return std::make_from_tuple<_Type>(
+ std::__uses_allocator_construction_args<_Type>(__alloc, std::forward<_Args>(__args)...));
+}
+
+template <class _Type, class _Alloc, class... _Args>
+_LIBCPP_HIDE_FROM_ABI constexpr _Type*
+__uninitialized_construct_using_allocator(_Type* __ptr, const _Alloc& __alloc, _Args&&... __args) {
+ return std::apply(
+ [&__ptr](auto&&... __xs) { return std::__construct_at(__ptr, std::forward<decltype(__xs)>(__xs)...); },
+ std::__uses_allocator_construction_args<_Type>(__alloc, std::forward<_Args>(__args)...));
+}
+
+#endif // _LIBCPP_STD_VER >= 17
+
+#if _LIBCPP_STD_VER >= 20
+
+template <class _Type, class _Alloc, class... _Args>
+_LIBCPP_HIDE_FROM_ABI constexpr auto uses_allocator_construction_args(const _Alloc& __alloc, _Args&&... __args) noexcept
+ -> decltype(std::__uses_allocator_construction_args<_Type>(__alloc, std::forward<_Args>(__args)...)) {
+ return /*--*/ std::__uses_allocator_construction_args<_Type>(__alloc, std::forward<_Args>(__args)...);
+}
+
+template <class _Type, class _Alloc, class... _Args>
+_LIBCPP_HIDE_FROM_ABI constexpr auto make_obj_using_allocator(const _Alloc& __alloc, _Args&&... __args)
+ -> decltype(std::__make_obj_using_allocator<_Type>(__alloc, std::forward<_Args>(__args)...)) {
+ return /*--*/ std::__make_obj_using_allocator<_Type>(__alloc, std::forward<_Args>(__args)...);
+}
+
+template <class _Type, class _Alloc, class... _Args>
+_LIBCPP_HIDE_FROM_ABI constexpr auto
+uninitialized_construct_using_allocator(_Type* __ptr, const _Alloc& __alloc, _Args&&... __args)
+ -> decltype(std::__uninitialized_construct_using_allocator(__ptr, __alloc, std::forward<_Args>(__args)...)) {
+ return /*--*/ std::__uninitialized_construct_using_allocator(__ptr, __alloc, std::forward<_Args>(__args)...);
+}
+
+#endif // _LIBCPP_STD_VER >= 20
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___MEMORY_USES_ALLOCATOR_CONSTRUCTION_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/voidify.h b/contrib/libs/cxxsupp/libcxx/include/__memory/voidify.h
index 3a65c0e83f..39e10343f4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/voidify.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/voidify.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <typename _Tp>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void* __voidify(_Tp& __from) {
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void* __voidify(_Tp& __from) {
// Cast away cv-qualifiers to allow modifying elements of a range through const iterators.
return const_cast<void*>(static_cast<const volatile void*>(_VSTD::addressof(__from)));
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory_resource/memory_resource.h b/contrib/libs/cxxsupp/libcxx/include/__memory_resource/memory_resource.h
new file mode 100644
index 0000000000..02fdd081cc
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory_resource/memory_resource.h
@@ -0,0 +1,75 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___MEMORY_RESOURCE_MEMORY_RESOURCE_H
+#define _LIBCPP___MEMORY_RESOURCE_MEMORY_RESOURCE_H
+
+#include <__config>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if _LIBCPP_STD_VER > 14
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace pmr {
+
+// [mem.res.class]
+
+class _LIBCPP_TYPE_VIS memory_resource {
+ static const size_t __max_align = alignof(max_align_t);
+
+public:
+ virtual ~memory_resource();
+
+ _LIBCPP_NODISCARD_AFTER_CXX17
+ [[using __gnu__: __returns_nonnull__, __alloc_size__(2), __alloc_align__(3)]] _LIBCPP_HIDE_FROM_ABI void*
+ allocate(size_t __bytes, size_t __align = __max_align) {
+ return do_allocate(__bytes, __align);
+ }
+
+ [[__gnu__::__nonnull__]] _LIBCPP_HIDE_FROM_ABI void
+ deallocate(void* __p, size_t __bytes, size_t __align = __max_align) {
+ do_deallocate(__p, __bytes, __align);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI bool is_equal(const memory_resource& __other) const noexcept { return do_is_equal(__other); }
+
+private:
+ virtual void* do_allocate(size_t, size_t) = 0;
+ virtual void do_deallocate(void*, size_t, size_t) = 0;
+ virtual bool do_is_equal(memory_resource const&) const noexcept = 0;
+};
+
+// [mem.res.eq]
+
+inline _LIBCPP_HIDE_FROM_ABI bool operator==(const memory_resource& __lhs, const memory_resource& __rhs) noexcept {
+ return &__lhs == &__rhs || __lhs.is_equal(__rhs);
+}
+
+inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const memory_resource& __lhs, const memory_resource& __rhs) noexcept {
+ return !(__lhs == __rhs);
+}
+
+// [mem.res.global]
+
+[[__gnu__::__returns_nonnull__]] _LIBCPP_FUNC_VIS memory_resource* get_default_resource() noexcept;
+[[__gnu__::__returns_nonnull__]] _LIBCPP_FUNC_VIS memory_resource* set_default_resource(memory_resource*) noexcept;
+[[using __gnu__: __returns_nonnull__, __const__]] _LIBCPP_FUNC_VIS memory_resource* new_delete_resource() noexcept;
+[[using __gnu__: __returns_nonnull__, __const__]] _LIBCPP_FUNC_VIS memory_resource* null_memory_resource() noexcept;
+
+} // namespace pmr
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_STD_VER > 14
+
+#endif // _LIBCPP___MEMORY_RESOURCE_MEMORY_RESOURCE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory_resource/monotonic_buffer_resource.h b/contrib/libs/cxxsupp/libcxx/include/__memory_resource/monotonic_buffer_resource.h
new file mode 100644
index 0000000000..5c35a62b16
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory_resource/monotonic_buffer_resource.h
@@ -0,0 +1,119 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___MEMORY_RESOURCE_MONOTONIC_BUFFER_RESOURCE_H
+#define _LIBCPP___MEMORY_RESOURCE_MONOTONIC_BUFFER_RESOURCE_H
+
+#include <__config>
+#include <__memory/addressof.h>
+#include <__memory_resource/memory_resource.h>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if _LIBCPP_STD_VER > 14
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace pmr {
+
+// [mem.res.monotonic.buffer]
+
+class _LIBCPP_TYPE_VIS monotonic_buffer_resource : public memory_resource {
+ static const size_t __default_buffer_capacity = 1024;
+ static const size_t __default_buffer_alignment = 16;
+
+ struct __chunk_footer {
+ __chunk_footer* __next_;
+ char* __start_;
+ char* __cur_;
+ size_t __align_;
+ size_t __allocation_size() { return (reinterpret_cast<char*>(this) - __start_) + sizeof(*this); }
+ void* __try_allocate_from_chunk(size_t, size_t);
+ };
+
+ struct __initial_descriptor {
+ char* __start_;
+ char* __cur_;
+ union {
+ char* __end_;
+ size_t __size_;
+ };
+ void* __try_allocate_from_chunk(size_t, size_t);
+ };
+
+public:
+ _LIBCPP_HIDE_FROM_ABI monotonic_buffer_resource()
+ : monotonic_buffer_resource(nullptr, __default_buffer_capacity, get_default_resource()) {}
+
+ _LIBCPP_HIDE_FROM_ABI explicit monotonic_buffer_resource(size_t __initial_size)
+ : monotonic_buffer_resource(nullptr, __initial_size, get_default_resource()) {}
+
+ _LIBCPP_HIDE_FROM_ABI monotonic_buffer_resource(void* __buffer, size_t __buffer_size)
+ : monotonic_buffer_resource(__buffer, __buffer_size, get_default_resource()) {}
+
+ _LIBCPP_HIDE_FROM_ABI explicit monotonic_buffer_resource(memory_resource* __upstream)
+ : monotonic_buffer_resource(nullptr, __default_buffer_capacity, __upstream) {}
+
+ _LIBCPP_HIDE_FROM_ABI monotonic_buffer_resource(size_t __initial_size, memory_resource* __upstream)
+ : monotonic_buffer_resource(nullptr, __initial_size, __upstream) {}
+
+ _LIBCPP_HIDE_FROM_ABI monotonic_buffer_resource(void* __buffer, size_t __buffer_size, memory_resource* __upstream)
+ : __res_(__upstream) {
+ __initial_.__start_ = static_cast<char*>(__buffer);
+ if (__buffer != nullptr) {
+ __initial_.__cur_ = static_cast<char*>(__buffer);
+ __initial_.__end_ = static_cast<char*>(__buffer) + __buffer_size;
+ } else {
+ __initial_.__cur_ = nullptr;
+ __initial_.__size_ = __buffer_size;
+ }
+ __chunks_ = nullptr;
+ }
+
+ monotonic_buffer_resource(const monotonic_buffer_resource&) = delete;
+
+ _LIBCPP_HIDE_FROM_ABI ~monotonic_buffer_resource() override { release(); }
+
+ monotonic_buffer_resource& operator=(const monotonic_buffer_resource&) = delete;
+
+ _LIBCPP_HIDE_FROM_ABI void release() {
+ __initial_.__cur_ = __initial_.__start_;
+ while (__chunks_ != nullptr) {
+ __chunk_footer* __next = __chunks_->__next_;
+ __res_->deallocate(__chunks_->__start_, __chunks_->__allocation_size(), __chunks_->__align_);
+ __chunks_ = __next;
+ }
+ }
+
+ _LIBCPP_HIDE_FROM_ABI memory_resource* upstream_resource() const { return __res_; }
+
+protected:
+ void* do_allocate(size_t __bytes, size_t __alignment) override; // key function
+
+ _LIBCPP_HIDE_FROM_ABI void do_deallocate(void*, size_t, size_t) override {}
+
+ _LIBCPP_HIDE_FROM_ABI bool do_is_equal(const memory_resource& __other) const _NOEXCEPT override {
+ return this == std::addressof(__other);
+ }
+
+private:
+ __initial_descriptor __initial_;
+ __chunk_footer* __chunks_;
+ memory_resource* __res_;
+};
+
+} // namespace pmr
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_STD_VER > 14
+
+#endif // _LIBCPP___MEMORY_RESOURCE_MONOTONIC_BUFFER_RESOURCE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory_resource/polymorphic_allocator.h b/contrib/libs/cxxsupp/libcxx/include/__memory_resource/polymorphic_allocator.h
new file mode 100644
index 0000000000..a5ca39b57e
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory_resource/polymorphic_allocator.h
@@ -0,0 +1,178 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___MEMORY_RESOURCE_POLYMORPHIC_ALLOCATOR_H
+#define _LIBCPP___MEMORY_RESOURCE_POLYMORPHIC_ALLOCATOR_H
+
+#include <__assert>
+#include <__config>
+#include <__memory_resource/memory_resource.h>
+#include <cstddef>
+#include <limits>
+#include <new>
+#include <stdexcept>
+#include <tuple>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+#if _LIBCPP_STD_VER > 14
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace pmr {
+
+// [mem.poly.allocator.class]
+
+template <class _ValueType>
+class _LIBCPP_TEMPLATE_VIS polymorphic_allocator {
+public:
+ using value_type = _ValueType;
+
+ // [mem.poly.allocator.ctor]
+
+ _LIBCPP_HIDE_FROM_ABI polymorphic_allocator() noexcept : __res_(std::pmr::get_default_resource()) {}
+
+ _LIBCPP_HIDE_FROM_ABI polymorphic_allocator(memory_resource* __r) noexcept : __res_(__r) {}
+
+ polymorphic_allocator(const polymorphic_allocator&) = default;
+
+ template <class _Tp>
+ _LIBCPP_HIDE_FROM_ABI polymorphic_allocator(const polymorphic_allocator<_Tp>& __other) noexcept
+ : __res_(__other.resource()) {}
+
+ polymorphic_allocator& operator=(const polymorphic_allocator&) = delete;
+
+ // [mem.poly.allocator.mem]
+
+ _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI _ValueType* allocate(size_t __n) {
+ if (__n > __max_size()) {
+ __throw_bad_array_new_length();
+ }
+ return static_cast<_ValueType*>(__res_->allocate(__n * sizeof(_ValueType), alignof(_ValueType)));
+ }
+
+ _LIBCPP_HIDE_FROM_ABI void deallocate(_ValueType* __p, size_t __n) {
+ _LIBCPP_ASSERT(__n <= __max_size(), "deallocate called for size which exceeds max_size()");
+ __res_->deallocate(__p, __n * sizeof(_ValueType), alignof(_ValueType));
+ }
+
+ template <class _Tp, class... _Ts>
+ _LIBCPP_HIDE_FROM_ABI void construct(_Tp* __p, _Ts&&... __args) {
+ std::__user_alloc_construct_impl(
+ typename __uses_alloc_ctor<_Tp, polymorphic_allocator&, _Ts...>::type(),
+ __p,
+ *this,
+ std::forward<_Ts>(__args)...);
+ }
+
+ template <class _T1, class _T2, class... _Args1, class... _Args2>
+ _LIBCPP_HIDE_FROM_ABI void
+ construct(pair<_T1, _T2>* __p, piecewise_construct_t, tuple<_Args1...> __x, tuple<_Args2...> __y) {
+ ::new ((void*)__p) pair<_T1, _T2>(
+ piecewise_construct,
+ __transform_tuple(typename __uses_alloc_ctor< _T1, polymorphic_allocator&, _Args1... >::type(),
+ std::move(__x),
+ typename __make_tuple_indices<sizeof...(_Args1)>::type{}),
+ __transform_tuple(typename __uses_alloc_ctor< _T2, polymorphic_allocator&, _Args2... >::type(),
+ std::move(__y),
+ typename __make_tuple_indices<sizeof...(_Args2)>::type{}));
+ }
+
+ template <class _T1, class _T2>
+ _LIBCPP_HIDE_FROM_ABI void construct(pair<_T1, _T2>* __p) {
+ construct(__p, piecewise_construct, tuple<>(), tuple<>());
+ }
+
+ template <class _T1, class _T2, class _Up, class _Vp>
+ _LIBCPP_HIDE_FROM_ABI void construct(pair<_T1, _T2>* __p, _Up&& __u, _Vp&& __v) {
+ construct(__p,
+ piecewise_construct,
+ std::forward_as_tuple(std::forward<_Up>(__u)),
+ std::forward_as_tuple(std::forward<_Vp>(__v)));
+ }
+
+ template <class _T1, class _T2, class _U1, class _U2>
+ _LIBCPP_HIDE_FROM_ABI void construct(pair<_T1, _T2>* __p, const pair<_U1, _U2>& __pr) {
+ construct(__p, piecewise_construct, std::forward_as_tuple(__pr.first), std::forward_as_tuple(__pr.second));
+ }
+
+ template <class _T1, class _T2, class _U1, class _U2>
+ _LIBCPP_HIDE_FROM_ABI void construct(pair<_T1, _T2>* __p, pair<_U1, _U2>&& __pr) {
+ construct(__p,
+ piecewise_construct,
+ std::forward_as_tuple(std::forward<_U1>(__pr.first)),
+ std::forward_as_tuple(std::forward<_U2>(__pr.second)));
+ }
+
+ template <class _Tp>
+ _LIBCPP_HIDE_FROM_ABI void destroy(_Tp* __p) {
+ __p->~_Tp();
+ }
+
+ _LIBCPP_HIDE_FROM_ABI polymorphic_allocator select_on_container_copy_construction() const noexcept {
+ return polymorphic_allocator();
+ }
+
+ _LIBCPP_HIDE_FROM_ABI memory_resource* resource() const noexcept { return __res_; }
+
+private:
+ template <class... _Args, size_t... _Is>
+ _LIBCPP_HIDE_FROM_ABI tuple<_Args&&...>
+ __transform_tuple(integral_constant<int, 0>, tuple<_Args...>&& __t, __tuple_indices<_Is...>) {
+ return std::forward_as_tuple(std::get<_Is>(std::move(__t))...);
+ }
+
+ template <class... _Args, size_t... _Is>
+ _LIBCPP_HIDE_FROM_ABI tuple<allocator_arg_t const&, polymorphic_allocator&, _Args&&...>
+ __transform_tuple(integral_constant<int, 1>, tuple<_Args...>&& __t, __tuple_indices<_Is...>) {
+ using _Tup = tuple<allocator_arg_t const&, polymorphic_allocator&, _Args&&...>;
+ return _Tup(allocator_arg, *this, std::get<_Is>(std::move(__t))...);
+ }
+
+ template <class... _Args, size_t... _Is>
+ _LIBCPP_HIDE_FROM_ABI tuple<_Args&&..., polymorphic_allocator&>
+ __transform_tuple(integral_constant<int, 2>, tuple<_Args...>&& __t, __tuple_indices<_Is...>) {
+ using _Tup = tuple<_Args&&..., polymorphic_allocator&>;
+ return _Tup(std::get<_Is>(std::move(__t))..., *this);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI size_t __max_size() const noexcept {
+ return numeric_limits<size_t>::max() / sizeof(value_type);
+ }
+
+ memory_resource* __res_;
+};
+
+// [mem.poly.allocator.eq]
+
+template <class _Tp, class _Up>
+inline _LIBCPP_HIDE_FROM_ABI bool
+operator==(const polymorphic_allocator<_Tp>& __lhs, const polymorphic_allocator<_Up>& __rhs) noexcept {
+ return *__lhs.resource() == *__rhs.resource();
+}
+
+template <class _Tp, class _Up>
+inline _LIBCPP_HIDE_FROM_ABI bool
+operator!=(const polymorphic_allocator<_Tp>& __lhs, const polymorphic_allocator<_Up>& __rhs) noexcept {
+ return !(__lhs == __rhs);
+}
+
+} // namespace pmr
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_STD_VER > 14
+
+_LIBCPP_POP_MACROS
+
+#endif // _LIBCPP___MEMORY_RESOURCE_POLYMORPHIC_ALLOCATOR_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory_resource/pool_options.h b/contrib/libs/cxxsupp/libcxx/include/__memory_resource/pool_options.h
new file mode 100644
index 0000000000..11585a0e3b
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory_resource/pool_options.h
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___MEMORY_RESOURCE_POOL_OPTIONS_H
+#define _LIBCPP___MEMORY_RESOURCE_POOL_OPTIONS_H
+
+#include <__config>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if _LIBCPP_STD_VER > 14
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace pmr {
+
+// [mem.res.pool.options]
+
+struct _LIBCPP_TYPE_VIS pool_options {
+ size_t max_blocks_per_chunk = 0;
+ size_t largest_required_pool_block = 0;
+};
+
+} // namespace pmr
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_STD_VER > 14
+
+#endif // _LIBCPP___MEMORY_RESOURCE_POOL_OPTIONS_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory_resource/synchronized_pool_resource.h b/contrib/libs/cxxsupp/libcxx/include/__memory_resource/synchronized_pool_resource.h
new file mode 100644
index 0000000000..550223c7d9
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory_resource/synchronized_pool_resource.h
@@ -0,0 +1,94 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___MEMORY_RESOURCE_SYNCHRONIZED_POOL_RESOURCE_H
+#define _LIBCPP___MEMORY_RESOURCE_SYNCHRONIZED_POOL_RESOURCE_H
+
+#include <__config>
+#include <__memory_resource/memory_resource.h>
+#include <__memory_resource/pool_options.h>
+#include <__memory_resource/unsynchronized_pool_resource.h>
+#include <cstddef>
+#if !defined(_LIBCPP_HAS_NO_THREADS)
+# include <mutex>
+#endif
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if _LIBCPP_STD_VER > 14
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace pmr {
+
+// [mem.res.pool.overview]
+
+class _LIBCPP_TYPE_VIS synchronized_pool_resource : public memory_resource {
+public:
+ _LIBCPP_HIDE_FROM_ABI synchronized_pool_resource(const pool_options& __opts, memory_resource* __upstream)
+ : __unsync_(__opts, __upstream) {}
+
+ _LIBCPP_HIDE_FROM_ABI synchronized_pool_resource()
+ : synchronized_pool_resource(pool_options(), get_default_resource()) {}
+
+ _LIBCPP_HIDE_FROM_ABI explicit synchronized_pool_resource(memory_resource* __upstream)
+ : synchronized_pool_resource(pool_options(), __upstream) {}
+
+ _LIBCPP_HIDE_FROM_ABI explicit synchronized_pool_resource(const pool_options& __opts)
+ : synchronized_pool_resource(__opts, get_default_resource()) {}
+
+ synchronized_pool_resource(const synchronized_pool_resource&) = delete;
+
+ ~synchronized_pool_resource() override = default;
+
+ synchronized_pool_resource& operator=(const synchronized_pool_resource&) = delete;
+
+ _LIBCPP_HIDE_FROM_ABI void release() {
+# if !defined(_LIBCPP_HAS_NO_THREADS)
+ unique_lock<mutex> __lk(__mut_);
+# endif
+ __unsync_.release();
+ }
+
+ _LIBCPP_HIDE_FROM_ABI memory_resource* upstream_resource() const { return __unsync_.upstream_resource(); }
+
+ _LIBCPP_HIDE_FROM_ABI pool_options options() const { return __unsync_.options(); }
+
+protected:
+ _LIBCPP_HIDE_FROM_ABI void* do_allocate(size_t __bytes, size_t __align) override {
+# if !defined(_LIBCPP_HAS_NO_THREADS)
+ unique_lock<mutex> __lk(__mut_);
+# endif
+ return __unsync_.allocate(__bytes, __align);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI void do_deallocate(void* __p, size_t __bytes, size_t __align) override {
+# if !defined(_LIBCPP_HAS_NO_THREADS)
+ unique_lock<mutex> __lk(__mut_);
+# endif
+ return __unsync_.deallocate(__p, __bytes, __align);
+ }
+
+ bool do_is_equal(const memory_resource& __other) const noexcept override; // key function
+
+private:
+# if !defined(_LIBCPP_HAS_NO_THREADS)
+ mutex __mut_;
+# endif
+ unsynchronized_pool_resource __unsync_;
+};
+
+} // namespace pmr
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_STD_VER > 14
+
+#endif // _LIBCPP___MEMORY_RESOURCE_SYNCHRONIZED_POOL_RESOURCE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory_resource/unsynchronized_pool_resource.h b/contrib/libs/cxxsupp/libcxx/include/__memory_resource/unsynchronized_pool_resource.h
new file mode 100644
index 0000000000..7270cf19e2
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory_resource/unsynchronized_pool_resource.h
@@ -0,0 +1,106 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___MEMORY_RESOURCE_UNSYNCHRONIZED_POOL_RESOURCE_H
+#define _LIBCPP___MEMORY_RESOURCE_UNSYNCHRONIZED_POOL_RESOURCE_H
+
+#include <__config>
+#include <__memory_resource/memory_resource.h>
+#include <__memory_resource/pool_options.h>
+#include <cstddef>
+#include <cstdint>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if _LIBCPP_STD_VER > 14
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace pmr {
+
+// [mem.res.pool.overview]
+
+class _LIBCPP_TYPE_VIS unsynchronized_pool_resource : public memory_resource {
+ class __fixed_pool;
+
+ class __adhoc_pool {
+ struct __chunk_footer;
+ __chunk_footer* __first_;
+
+ public:
+ _LIBCPP_HIDE_FROM_ABI explicit __adhoc_pool() : __first_(nullptr) {}
+
+ void __release_ptr(memory_resource* __upstream);
+ void* __do_allocate(memory_resource* __upstream, size_t __bytes, size_t __align);
+ void __do_deallocate(memory_resource* __upstream, void* __p, size_t __bytes, size_t __align);
+ };
+
+ static const size_t __min_blocks_per_chunk = 16;
+ static const size_t __min_bytes_per_chunk = 1024;
+ static const size_t __max_blocks_per_chunk = (size_t(1) << 20);
+ static const size_t __max_bytes_per_chunk = (size_t(1) << 30);
+
+ static const int __log2_smallest_block_size = 3;
+ static const size_t __smallest_block_size = 8;
+ static const size_t __default_largest_block_size = (size_t(1) << 20);
+ static const size_t __max_largest_block_size = (size_t(1) << 30);
+
+ size_t __pool_block_size(int __i) const;
+ int __log2_pool_block_size(int __i) const;
+ int __pool_index(size_t __bytes, size_t __align) const;
+
+public:
+ unsynchronized_pool_resource(const pool_options& __opts, memory_resource* __upstream);
+
+ _LIBCPP_HIDE_FROM_ABI unsynchronized_pool_resource()
+ : unsynchronized_pool_resource(pool_options(), get_default_resource()) {}
+
+ _LIBCPP_HIDE_FROM_ABI explicit unsynchronized_pool_resource(memory_resource* __upstream)
+ : unsynchronized_pool_resource(pool_options(), __upstream) {}
+
+ _LIBCPP_HIDE_FROM_ABI explicit unsynchronized_pool_resource(const pool_options& __opts)
+ : unsynchronized_pool_resource(__opts, get_default_resource()) {}
+
+ unsynchronized_pool_resource(const unsynchronized_pool_resource&) = delete;
+
+ _LIBCPP_HIDE_FROM_ABI ~unsynchronized_pool_resource() override { release(); }
+
+ unsynchronized_pool_resource& operator=(const unsynchronized_pool_resource&) = delete;
+
+ void release();
+
+ _LIBCPP_HIDE_FROM_ABI memory_resource* upstream_resource() const { return __res_; }
+
+ [[__gnu__::__pure__]] pool_options options() const;
+
+protected:
+ void* do_allocate(size_t __bytes, size_t __align) override; // key function
+
+ void do_deallocate(void* __p, size_t __bytes, size_t __align) override;
+
+ _LIBCPP_HIDE_FROM_ABI bool do_is_equal(const memory_resource& __other) const _NOEXCEPT override {
+ return &__other == this;
+ }
+
+private:
+ memory_resource* __res_;
+ __adhoc_pool __adhoc_pool_;
+ __fixed_pool* __fixed_pools_;
+ int __num_fixed_pools_;
+ uint32_t __options_max_blocks_per_chunk_;
+};
+
+} // namespace pmr
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_STD_VER > 14
+
+#endif // _LIBCPP___MEMORY_RESOURCE_UNSYNCHRONIZED_POOL_RESOURCE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__mutex_base b/contrib/libs/cxxsupp/libcxx/include/__mutex_base
index ac0d090b7d..82d9fa6ecb 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__mutex_base
+++ b/contrib/libs/cxxsupp/libcxx/include/__mutex_base
@@ -103,6 +103,7 @@ private:
lock_guard(lock_guard const&) = delete;
lock_guard& operator=(lock_guard const&) = delete;
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(lock_guard);
template <class _Mutex>
class _LIBCPP_TEMPLATE_VIS unique_lock
@@ -195,6 +196,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
mutex_type* mutex() const _NOEXCEPT {return __m_;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(unique_lock);
template <class _Mutex>
void
diff --git a/contrib/libs/cxxsupp/libcxx/include/__node_handle b/contrib/libs/cxxsupp/libcxx/include/__node_handle
index 71309be62f..bc49272b9f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__node_handle
+++ b/contrib/libs/cxxsupp/libcxx/include/__node_handle
@@ -60,7 +60,8 @@ public:
#include <__assert>
#include <__config>
-#include <memory>
+#include <__memory/allocator_traits.h>
+#include <__memory/pointer_traits.h>
#include <optional>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -90,8 +91,8 @@ class _LIBCPP_TEMPLATE_VIS __basic_node_handle
_NodeType, __basic_node_handle<_NodeType, _Alloc, _MapOrSetSpecifics>>;
typedef allocator_traits<_Alloc> __alloc_traits;
- typedef typename __rebind_pointer<typename __alloc_traits::void_pointer,
- _NodeType>::type
+ typedef __rebind_pointer_t<typename __alloc_traits::void_pointer,
+ _NodeType>
__node_pointer_type;
public:
diff --git a/contrib/libs/cxxsupp/libcxx/include/__numeric/accumulate.h b/contrib/libs/cxxsupp/libcxx/include/__numeric/accumulate.h
index fa759872ce..81fc0c2943 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__numeric/accumulate.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__numeric/accumulate.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_Tp
accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
{
@@ -34,7 +34,7 @@ accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
}
template <class _InputIterator, class _Tp, class _BinaryOperation>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_Tp
accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __binary_op)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__numeric/adjacent_difference.h b/contrib/libs/cxxsupp/libcxx/include/__numeric/adjacent_difference.h
index 5c712ecdf7..57e2f5b280 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__numeric/adjacent_difference.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__numeric/adjacent_difference.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
{
@@ -44,7 +44,7 @@ adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterat
}
template <class _InputIterator, class _OutputIterator, class _BinaryOperation>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result,
_BinaryOperation __binary_op)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__numeric/exclusive_scan.h b/contrib/libs/cxxsupp/libcxx/include/__numeric/exclusive_scan.h
index c0c89b3880..d02e126b53 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__numeric/exclusive_scan.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__numeric/exclusive_scan.h
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 14
template <class _InputIterator, class _OutputIterator, class _Tp, class _BinaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
exclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp __init, _BinaryOp __b) {
if (__first != __last) {
_Tp __tmp(__b(__init, *__first));
@@ -41,7 +41,7 @@ exclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __
}
template <class _InputIterator, class _OutputIterator, class _Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
exclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp __init) {
return _VSTD::exclusive_scan(__first, __last, __result, __init, _VSTD::plus<>());
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__numeric/gcd_lcm.h b/contrib/libs/cxxsupp/libcxx/include/__numeric/gcd_lcm.h
index 9a53a001f2..b3d776b3a4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__numeric/gcd_lcm.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__numeric/gcd_lcm.h
@@ -60,8 +60,8 @@ common_type_t<_Tp,_Up>
gcd(_Tp __m, _Up __n)
{
static_assert((is_integral<_Tp>::value && is_integral<_Up>::value), "Arguments to gcd must be integer types");
- static_assert((!is_same<typename remove_cv<_Tp>::type, bool>::value), "First argument to gcd cannot be bool" );
- static_assert((!is_same<typename remove_cv<_Up>::type, bool>::value), "Second argument to gcd cannot be bool" );
+ static_assert((!is_same<__remove_cv_t<_Tp>, bool>::value), "First argument to gcd cannot be bool" );
+ static_assert((!is_same<__remove_cv_t<_Up>, bool>::value), "Second argument to gcd cannot be bool" );
using _Rp = common_type_t<_Tp,_Up>;
using _Wp = make_unsigned_t<_Rp>;
return static_cast<_Rp>(_VSTD::__gcd(
@@ -75,8 +75,8 @@ common_type_t<_Tp,_Up>
lcm(_Tp __m, _Up __n)
{
static_assert((is_integral<_Tp>::value && is_integral<_Up>::value), "Arguments to lcm must be integer types");
- static_assert((!is_same<typename remove_cv<_Tp>::type, bool>::value), "First argument to lcm cannot be bool" );
- static_assert((!is_same<typename remove_cv<_Up>::type, bool>::value), "Second argument to lcm cannot be bool" );
+ static_assert((!is_same<__remove_cv_t<_Tp>, bool>::value), "First argument to lcm cannot be bool" );
+ static_assert((!is_same<__remove_cv_t<_Up>, bool>::value), "Second argument to lcm cannot be bool" );
if (__m == 0 || __n == 0)
return 0;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__numeric/inclusive_scan.h b/contrib/libs/cxxsupp/libcxx/include/__numeric/inclusive_scan.h
index a6b0050758..e5bf5ac5b7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__numeric/inclusive_scan.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__numeric/inclusive_scan.h
@@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 14
template <class _InputIterator, class _OutputIterator, class _Tp, class _BinaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOp __b, _Tp __init) {
for (; __first != __last; ++__first, (void)++__result) {
__init = __b(__init, *__first);
@@ -34,7 +34,7 @@ inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __
}
template <class _InputIterator, class _OutputIterator, class _BinaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOp __b) {
if (__first != __last) {
typename iterator_traits<_InputIterator>::value_type __init = *__first;
@@ -47,7 +47,7 @@ inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __
}
template <class _InputIterator, class _OutputIterator>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator inclusive_scan(_InputIterator __first,
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator inclusive_scan(_InputIterator __first,
_InputIterator __last,
_OutputIterator __result) {
return _VSTD::inclusive_scan(__first, __last, __result, _VSTD::plus<>());
diff --git a/contrib/libs/cxxsupp/libcxx/include/__numeric/inner_product.h b/contrib/libs/cxxsupp/libcxx/include/__numeric/inner_product.h
index 6fe18bb2b1..e3d68c04c2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__numeric/inner_product.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__numeric/inner_product.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator1, class _InputIterator2, class _Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_Tp
inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init)
{
@@ -34,7 +34,7 @@ inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2
}
template <class _InputIterator1, class _InputIterator2, class _Tp, class _BinaryOperation1, class _BinaryOperation2>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_Tp
inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2,
_Tp __init, _BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__numeric/iota.h b/contrib/libs/cxxsupp/libcxx/include/__numeric/iota.h
index b7127a11cb..eacdc5b6ec 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__numeric/iota.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__numeric/iota.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__numeric/midpoint.h b/contrib/libs/cxxsupp/libcxx/include/__numeric/midpoint.h
index 668030c46b..d8cce7929b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__numeric/midpoint.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__numeric/midpoint.h
@@ -55,12 +55,12 @@ midpoint(_TPtr __a, _TPtr __b) noexcept
template <typename _Tp>
-constexpr int __sign(_Tp __val) {
+_LIBCPP_HIDE_FROM_ABI constexpr int __sign(_Tp __val) {
return (_Tp(0) < __val) - (__val < _Tp(0));
}
template <typename _Fp>
-constexpr _Fp __fp_abs(_Fp __f) { return __f >= 0 ? __f : -__f; }
+_LIBCPP_HIDE_FROM_ABI constexpr _Fp __fp_abs(_Fp __f) { return __f >= 0 ? __f : -__f; }
template <class _Fp>
_LIBCPP_INLINE_VISIBILITY constexpr
diff --git a/contrib/libs/cxxsupp/libcxx/include/__numeric/partial_sum.h b/contrib/libs/cxxsupp/libcxx/include/__numeric/partial_sum.h
index 9acee3afc2..97cca582c0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__numeric/partial_sum.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__numeric/partial_sum.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
{
@@ -43,7 +43,7 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res
}
template <class _InputIterator, class _OutputIterator, class _BinaryOperation>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result,
_BinaryOperation __binary_op)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__numeric/reduce.h b/contrib/libs/cxxsupp/libcxx/include/__numeric/reduce.h
index 90e4d238d8..b64df05bc8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__numeric/reduce.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__numeric/reduce.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 14
template <class _InputIterator, class _Tp, class _BinaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp reduce(_InputIterator __first, _InputIterator __last,
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp reduce(_InputIterator __first, _InputIterator __last,
_Tp __init, _BinaryOp __b) {
for (; __first != __last; ++__first)
__init = __b(__init, *__first);
@@ -30,13 +30,13 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp reduce(_InputIterato
}
template <class _InputIterator, class _Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp reduce(_InputIterator __first, _InputIterator __last,
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp reduce(_InputIterator __first, _InputIterator __last,
_Tp __init) {
return _VSTD::reduce(__first, __last, __init, _VSTD::plus<>());
}
template <class _InputIterator>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 typename iterator_traits<_InputIterator>::value_type
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 typename iterator_traits<_InputIterator>::value_type
reduce(_InputIterator __first, _InputIterator __last) {
return _VSTD::reduce(__first, __last, typename iterator_traits<_InputIterator>::value_type{});
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_exclusive_scan.h b/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_exclusive_scan.h
index 45b3077f66..afbcdb8db8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_exclusive_scan.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_exclusive_scan.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _Tp,
class _BinaryOp, class _UnaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
transform_exclusive_scan(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, _Tp __init,
diff --git a/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_inclusive_scan.h b/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_inclusive_scan.h
index b0d4ab5a88..c050041bc1 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_inclusive_scan.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_inclusive_scan.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 14
template <class _InputIterator, class _OutputIterator, class _Tp, class _BinaryOp, class _UnaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
transform_inclusive_scan(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, _BinaryOp __b, _UnaryOp __u, _Tp __init)
@@ -36,7 +36,7 @@ transform_inclusive_scan(_InputIterator __first, _InputIterator __last,
}
template <class _InputIterator, class _OutputIterator, class _BinaryOp, class _UnaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
transform_inclusive_scan(_InputIterator __first, _InputIterator __last,
_OutputIterator __result, _BinaryOp __b, _UnaryOp __u)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_reduce.h b/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_reduce.h
index da5a77988c..d997521a95 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_reduce.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_reduce.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 14
template <class _InputIterator, class _Tp, class _BinaryOp, class _UnaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp transform_reduce(_InputIterator __first,
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp transform_reduce(_InputIterator __first,
_InputIterator __last, _Tp __init,
_BinaryOp __b, _UnaryOp __u) {
for (; __first != __last; ++__first)
@@ -31,7 +31,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp transform_reduce(_In
}
template <class _InputIterator1, class _InputIterator2, class _Tp, class _BinaryOp1, class _BinaryOp2>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp transform_reduce(_InputIterator1 __first1,
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp transform_reduce(_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2, _Tp __init,
_BinaryOp1 __b1, _BinaryOp2 __b2) {
@@ -41,7 +41,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp transform_reduce(_In
}
template <class _InputIterator1, class _InputIterator2, class _Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp transform_reduce(_InputIterator1 __first1,
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp transform_reduce(_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2, _Tp __init) {
return _VSTD::transform_reduce(__first1, __last1, __first2, _VSTD::move(__init), _VSTD::plus<>(),
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/bernoulli_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/bernoulli_distribution.h
index e97d53f5a4..e38d3dfb89 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/bernoulli_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/bernoulli_distribution.h
@@ -110,7 +110,7 @@ bernoulli_distribution::operator()(_URNG& __g, const param_type& __p)
}
template <class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const bernoulli_distribution& __x)
{
__save_flags<_CharT, _Traits> __lx(__os);
@@ -123,7 +123,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const bernoulli_distribution& _
}
template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, bernoulli_distribution& __x)
{
typedef bernoulli_distribution _Eng;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/binomial_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/binomial_distribution.h
index af60fa2a38..28f176e14f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/binomial_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/binomial_distribution.h
@@ -189,7 +189,7 @@ binomial_distribution<_IntType>::operator()(_URNG& __g, const param_type& __pr)
}
template <class _CharT, class _Traits, class _IntType>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const binomial_distribution<_IntType>& __x)
{
@@ -203,7 +203,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _IntType>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
binomial_distribution<_IntType>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/cauchy_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/cauchy_distribution.h
index 5bc44ee8dd..2fda6b5383 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/cauchy_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/cauchy_distribution.h
@@ -124,7 +124,7 @@ cauchy_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
}
template <class _CharT, class _Traits, class _RT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const cauchy_distribution<_RT>& __x)
{
@@ -139,7 +139,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
cauchy_distribution<_RT>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/chi_squared_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/chi_squared_distribution.h
index b98488c20d..f2922b64dd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/chi_squared_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/chi_squared_distribution.h
@@ -107,7 +107,7 @@ public:
};
template <class _CharT, class _Traits, class _RT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const chi_squared_distribution<_RT>& __x)
{
@@ -120,7 +120,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
chi_squared_distribution<_RT>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/discard_block_engine.h b/contrib/libs/cxxsupp/libcxx/include/__random/discard_block_engine.h
index c58d66b588..db33623d94 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/discard_block_engine.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/discard_block_engine.h
@@ -12,8 +12,8 @@
#include <__config>
#include <__random/is_seed_sequence.h>
#include <__utility/move.h>
-#include <climits>
#include <iosfwd>
+#include <limits>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -33,7 +33,9 @@ class _LIBCPP_TEMPLATE_VIS discard_block_engine
static_assert( 0 < __r, "discard_block_engine invalid parameters");
static_assert(__r <= __p, "discard_block_engine invalid parameters");
- static_assert(__r <= INT_MAX, "discard_block_engine invalid parameters");
+#ifndef _LIBCPP_CXX03_LANG // numeric_limits::max() is not constexpr in C++03
+ static_assert(__r <= numeric_limits<int>::max(), "discard_block_engine invalid parameters");
+#endif
public:
// types
typedef typename _Engine::result_type result_type;
@@ -164,7 +166,7 @@ operator!=(const discard_block_engine<_Eng, _Pp, _Rp>& __x,
template <class _CharT, class _Traits,
class _Eng, size_t _Pp, size_t _Rp>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const discard_block_engine<_Eng, _Pp, _Rp>& __x)
{
@@ -178,7 +180,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
template <class _CharT, class _Traits,
class _Eng, size_t _Pp, size_t _Rp>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
discard_block_engine<_Eng, _Pp, _Rp>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/discrete_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/discrete_distribution.h
index 8dc63c0e98..03f49ba872 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/discrete_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/discrete_distribution.h
@@ -221,7 +221,7 @@ discrete_distribution<_IntType>::operator()(_URNG& __g, const param_type& __p)
}
template <class _CharT, class _Traits, class _IT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const discrete_distribution<_IT>& __x)
{
@@ -239,7 +239,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _IT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
discrete_distribution<_IT>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/exponential_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/exponential_distribution.h
index 1c9e9e0d9e..8edf1ac3f6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/exponential_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/exponential_distribution.h
@@ -121,7 +121,7 @@ exponential_distribution<_RealType>::operator()(_URNG& __g, const param_type& __
}
template <class _CharT, class _Traits, class _RealType>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const exponential_distribution<_RealType>& __x)
{
@@ -133,7 +133,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RealType>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
exponential_distribution<_RealType>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/extreme_value_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/extreme_value_distribution.h
index ba30aa5b88..b3cba39249 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/extreme_value_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/extreme_value_distribution.h
@@ -123,7 +123,7 @@ extreme_value_distribution<_RealType>::operator()(_URNG& __g, const param_type&
}
template <class _CharT, class _Traits, class _RT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const extreme_value_distribution<_RT>& __x)
{
@@ -138,7 +138,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
extreme_value_distribution<_RT>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/fisher_f_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/fisher_f_distribution.h
index 60c7f28c0b..b5479acb47 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/fisher_f_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/fisher_f_distribution.h
@@ -122,7 +122,7 @@ fisher_f_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
}
template <class _CharT, class _Traits, class _RT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const fisher_f_distribution<_RT>& __x)
{
@@ -137,7 +137,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
fisher_f_distribution<_RT>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/gamma_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/gamma_distribution.h
index 986d79b67a..0d7fc3f828 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/gamma_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/gamma_distribution.h
@@ -175,7 +175,7 @@ gamma_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
}
template <class _CharT, class _Traits, class _RT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const gamma_distribution<_RT>& __x)
{
@@ -190,7 +190,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
gamma_distribution<_RT>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/generate_canonical.h b/contrib/libs/cxxsupp/libcxx/include/__random/generate_canonical.h
index 84efa7803c..5fada6df59 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/generate_canonical.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/generate_canonical.h
@@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// generate_canonical
template<class _RealType, size_t __bits, class _URNG>
-_RealType
+_LIBCPP_HIDE_FROM_ABI _RealType
generate_canonical(_URNG& __g)
{
const size_t _Dt = numeric_limits<_RealType>::digits;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/geometric_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/geometric_distribution.h
index 751cf7860e..8f9bdffc7c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/geometric_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/geometric_distribution.h
@@ -108,7 +108,7 @@ public:
};
template <class _CharT, class _Traits, class _IntType>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const geometric_distribution<_IntType>& __x)
{
@@ -120,7 +120,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _IntType>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
geometric_distribution<_IntType>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/independent_bits_engine.h b/contrib/libs/cxxsupp/libcxx/include/__random/independent_bits_engine.h
index e80d6eec49..151492a81b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/independent_bits_engine.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/independent_bits_engine.h
@@ -51,12 +51,8 @@ private:
static_assert(__w <= _Dt, "independent_bits_engine invalid parameters");
typedef typename _Engine::result_type _Engine_result_type;
- typedef typename conditional
- <
- sizeof(_Engine_result_type) <= sizeof(result_type),
- result_type,
- _Engine_result_type
- >::type _Working_result_type;
+ typedef __conditional_t<sizeof(_Engine_result_type) <= sizeof(result_type), result_type, _Engine_result_type>
+ _Working_result_type;
#ifdef _LIBCPP_CXX03_LANG
static const _Working_result_type _Rp = _Engine::_Max - _Engine::_Min
+ _Working_result_type(1);
@@ -244,7 +240,7 @@ operator!=(
template <class _CharT, class _Traits,
class _Eng, size_t _Wp, class _UInt>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const independent_bits_engine<_Eng, _Wp, _UInt>& __x)
{
@@ -253,7 +249,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
template <class _CharT, class _Traits,
class _Eng, size_t _Wp, class _UInt>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
independent_bits_engine<_Eng, _Wp, _UInt>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/is_seed_sequence.h b/contrib/libs/cxxsupp/libcxx/include/__random/is_seed_sequence.h
index a6832f51c1..3c82b2790b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/is_seed_sequence.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/is_seed_sequence.h
@@ -23,7 +23,7 @@ struct __is_seed_sequence
{
static _LIBCPP_CONSTEXPR const bool value =
!is_convertible<_Sseq, typename _Engine::result_type>::value &&
- !is_same<typename remove_cv<_Sseq>::type, _Engine>::value;
+ !is_same<__remove_cv_t<_Sseq>, _Engine>::value;
};
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/linear_congruential_engine.h b/contrib/libs/cxxsupp/libcxx/include/__random/linear_congruential_engine.h
index 42b40813e0..0d91f14120 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/linear_congruential_engine.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/linear_congruential_engine.h
@@ -198,7 +198,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
template <class _CharT, class _Traits,
class _Up, _Up _Ap, _Up _Cp, _Up _Np>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
linear_congruential_engine<_Up, _Ap, _Cp, _Np>& __x);
@@ -372,7 +372,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
template <class _CharT, class _Traits,
class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
linear_congruential_engine<_UIntType, __a, __c, __m>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/log2.h b/contrib/libs/cxxsupp/libcxx/include/__random/log2.h
index b077d211ce..72bf0759ee 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/log2.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/log2.h
@@ -58,15 +58,12 @@ struct __log2
{
static const size_t value = __log2_imp<
#ifndef _LIBCPP_HAS_NO_INT128
- typename conditional<
- sizeof(_UIntType) <= sizeof(unsigned long long),
- unsigned long long,
- __uint128_t
- >::type,
+ __conditional_t<sizeof(_UIntType) <= sizeof(unsigned long long), unsigned long long, __uint128_t>,
#else
unsigned long long,
#endif // _LIBCPP_HAS_NO_INT128
- _Xp, sizeof(_UIntType) * __CHAR_BIT__ - 1>::value;
+ _Xp,
+ sizeof(_UIntType) * __CHAR_BIT__ - 1>::value;
};
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/mersenne_twister_engine.h b/contrib/libs/cxxsupp/libcxx/include/__random/mersenne_twister_engine.h
index 8bceac05dc..3a58e311b0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/mersenne_twister_engine.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/mersenne_twister_engine.h
@@ -36,7 +36,7 @@ class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine;
template <class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
_UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
_UInt _Bp, size_t _Tp, _UInt _Cp, size_t _Lp, _UInt _Fp>
-bool
+_LIBCPP_HIDE_FROM_ABI bool
operator==(const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
_Bp, _Tp, _Cp, _Lp, _Fp>& __x,
const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
@@ -56,7 +56,7 @@ template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
_UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
_UInt _Bp, size_t _Tp, _UInt _Cp, size_t _Lp, _UInt _Fp>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
_Bp, _Tp, _Cp, _Lp, _Fp>& __x);
@@ -65,7 +65,7 @@ template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
_UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
_UInt _Bp, size_t _Tp, _UInt _Cp, size_t _Lp, _UInt _Fp>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
_Bp, _Tp, _Cp, _Lp, _Fp>& __x);
@@ -416,7 +416,7 @@ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b,
template <class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
_UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
_UInt _Bp, size_t _Tp, _UInt _Cp, size_t _Lp, _UInt _Fp>
-bool
+_LIBCPP_HIDE_FROM_ABI bool
operator==(const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
_Bp, _Tp, _Cp, _Lp, _Fp>& __x,
const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
@@ -474,7 +474,7 @@ template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
_UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
_UInt _Bp, size_t _Tp, _UInt _Cp, size_t _Lp, _UInt _Fp>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
_Bp, _Tp, _Cp, _Lp, _Fp>& __x)
@@ -496,7 +496,7 @@ template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
_UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
_UInt _Bp, size_t _Tp, _UInt _Cp, size_t _Lp, _UInt _Fp>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
_Bp, _Tp, _Cp, _Lp, _Fp>& __x)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/negative_binomial_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/negative_binomial_distribution.h
index 90d3f01789..333c9350cd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/negative_binomial_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/negative_binomial_distribution.h
@@ -144,7 +144,7 @@ negative_binomial_distribution<_IntType>::operator()(_URNG& __urng, const param_
}
template <class _CharT, class _Traits, class _IntType>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const negative_binomial_distribution<_IntType>& __x)
{
@@ -158,7 +158,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _IntType>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
negative_binomial_distribution<_IntType>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/normal_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/normal_distribution.h
index 0431df9272..b2ed47e6af 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/normal_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/normal_distribution.h
@@ -58,8 +58,8 @@ public:
private:
param_type __p_;
- result_type _V_;
- bool _V_hot_;
+ result_type __v_;
+ bool __v_hot_;
public:
// constructors and reset functions
@@ -68,18 +68,18 @@ public:
normal_distribution() : normal_distribution(0) {}
_LIBCPP_INLINE_VISIBILITY
explicit normal_distribution(result_type __mean, result_type __stddev = 1)
- : __p_(param_type(__mean, __stddev)), _V_hot_(false) {}
+ : __p_(param_type(__mean, __stddev)), __v_hot_(false) {}
#else
_LIBCPP_INLINE_VISIBILITY
explicit normal_distribution(result_type __mean = 0,
result_type __stddev = 1)
- : __p_(param_type(__mean, __stddev)), _V_hot_(false) {}
+ : __p_(param_type(__mean, __stddev)), __v_hot_(false) {}
#endif
_LIBCPP_INLINE_VISIBILITY
explicit normal_distribution(const param_type& __p)
- : __p_(__p), _V_hot_(false) {}
+ : __p_(__p), __v_hot_(false) {}
_LIBCPP_INLINE_VISIBILITY
- void reset() {_V_hot_ = false;}
+ void reset() {__v_hot_ = false;}
// generating functions
template<class _URNG>
@@ -107,8 +107,8 @@ public:
friend _LIBCPP_INLINE_VISIBILITY
bool operator==(const normal_distribution& __x,
const normal_distribution& __y)
- {return __x.__p_ == __y.__p_ && __x._V_hot_ == __y._V_hot_ &&
- (!__x._V_hot_ || __x._V_ == __y._V_);}
+ {return __x.__p_ == __y.__p_ && __x.__v_hot_ == __y.__v_hot_ &&
+ (!__x.__v_hot_ || __x.__v_ == __y.__v_);}
friend _LIBCPP_INLINE_VISIBILITY
bool operator!=(const normal_distribution& __x,
const normal_distribution& __y)
@@ -134,10 +134,10 @@ normal_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
{
static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
result_type _Up;
- if (_V_hot_)
+ if (__v_hot_)
{
- _V_hot_ = false;
- _Up = _V_;
+ __v_hot_ = false;
+ _Up = __v_;
}
else
{
@@ -152,15 +152,15 @@ normal_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
__s = __u * __u + __v * __v;
} while (__s > 1 || __s == 0);
result_type _Fp = _VSTD::sqrt(-2 * _VSTD::log(__s) / __s);
- _V_ = __v * _Fp;
- _V_hot_ = true;
+ __v_ = __v * _Fp;
+ __v_hot_ = true;
_Up = __u * _Fp;
}
return _Up * __p.stddev() + __p.mean();
}
template <class _CharT, class _Traits, class _RT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const normal_distribution<_RT>& __x)
{
@@ -170,14 +170,14 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
_OStream::scientific);
_CharT __sp = __os.widen(' ');
__os.fill(__sp);
- __os << __x.mean() << __sp << __x.stddev() << __sp << __x._V_hot_;
- if (__x._V_hot_)
- __os << __sp << __x._V_;
+ __os << __x.mean() << __sp << __x.stddev() << __sp << __x.__v_hot_;
+ if (__x.__v_hot_)
+ __os << __sp << __x.__v_;
return __os;
}
template <class _CharT, class _Traits, class _RT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
normal_distribution<_RT>& __x)
{
@@ -197,8 +197,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
if (!__is.fail())
{
__x.param(param_type(__mean, __stddev));
- __x._V_hot_ = _V_hot;
- __x._V_ = _Vp;
+ __x.__v_hot_ = _V_hot;
+ __x.__v_ = _Vp;
}
return __is;
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_constant_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_constant_distribution.h
index 9c9e14b16d..a1f3ef9df5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_constant_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_constant_distribution.h
@@ -294,7 +294,7 @@ piecewise_constant_distribution<_RealType>::operator()(_URNG& __g, const param_t
}
template <class _CharT, class _Traits, class _RT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const piecewise_constant_distribution<_RT>& __x)
{
@@ -320,7 +320,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
piecewise_constant_distribution<_RT>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_linear_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_linear_distribution.h
index 05f00cef06..fc2eb47c7b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_linear_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_linear_distribution.h
@@ -310,7 +310,7 @@ piecewise_linear_distribution<_RealType>::operator()(_URNG& __g, const param_typ
}
template <class _CharT, class _Traits, class _RT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const piecewise_linear_distribution<_RT>& __x)
{
@@ -336,7 +336,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
piecewise_linear_distribution<_RT>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/poisson_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/poisson_distribution.h
index ef55b1be48..334c6102b3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/poisson_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/poisson_distribution.h
@@ -245,7 +245,7 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
}
template <class _CharT, class _Traits, class _IntType>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const poisson_distribution<_IntType>& __x)
{
@@ -257,7 +257,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _IntType>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
poisson_distribution<_IntType>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/shuffle_order_engine.h b/contrib/libs/cxxsupp/libcxx/include/__random/shuffle_order_engine.h
index c2f76f609a..4a27289c2f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/shuffle_order_engine.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/shuffle_order_engine.h
@@ -60,8 +60,8 @@ public:
private:
_Engine __e_;
- result_type _V_[__k];
- result_type _Y_;
+ result_type __v_[__k];
+ result_type __y_;
public:
// engine characteristics
@@ -157,8 +157,8 @@ private:
void __init()
{
for (size_t __i = 0; __i < __k; ++__i)
- _V_[__i] = __e_();
- _Y_ = __e_();
+ __v_[__i] = __e_();
+ __y_ = __e_();
}
_LIBCPP_INLINE_VISIBILITY
@@ -190,11 +190,11 @@ private:
>::type
__eval(__uratio<_Np, _Dp>)
{
- const size_t __j = static_cast<size_t>(__uratio<_Np, _Dp>::num * (_Y_ - _Min)
+ const size_t __j = static_cast<size_t>(__uratio<_Np, _Dp>::num * (__y_ - _Min)
/ __uratio<_Np, _Dp>::den);
- _Y_ = _V_[__j];
- _V_[__j] = __e_();
- return _Y_;
+ __y_ = __v_[__j];
+ __v_[__j] = __e_();
+ return __y_;
}
template <uint64_t __n, uint64_t __d>
@@ -204,10 +204,10 @@ private:
const double _Fp = __d == 0 ?
__n / (2. * 0x8000000000000000ull) :
__n / (double)__d;
- const size_t __j = static_cast<size_t>(_Fp * (_Y_ - _Min));
- _Y_ = _V_[__j];
- _V_[__j] = __e_();
- return _Y_;
+ const size_t __j = static_cast<size_t>(_Fp * (__y_ - _Min));
+ __y_ = __v_[__j];
+ __v_[__j] = __e_();
+ return __y_;
}
};
@@ -215,12 +215,12 @@ template<class _Engine, size_t __k>
_LIBCPP_CONSTEXPR const size_t shuffle_order_engine<_Engine, __k>::table_size;
template<class _Eng, size_t _Kp>
-bool
+_LIBCPP_HIDE_FROM_ABI bool
operator==(
const shuffle_order_engine<_Eng, _Kp>& __x,
const shuffle_order_engine<_Eng, _Kp>& __y)
{
- return __x._Y_ == __y._Y_ && _VSTD::equal(__x._V_, __x._V_ + _Kp, __y._V_) &&
+ return __x.__y_ == __y.__y_ && _VSTD::equal(__x.__v_, __x.__v_ + _Kp, __y.__v_) &&
__x.__e_ == __y.__e_;
}
@@ -236,7 +236,7 @@ operator!=(
template <class _CharT, class _Traits,
class _Eng, size_t _Kp>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const shuffle_order_engine<_Eng, _Kp>& __x)
{
@@ -245,15 +245,15 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
__os.flags(_Ostream::dec | _Ostream::left);
_CharT __sp = __os.widen(' ');
__os.fill(__sp);
- __os << __x.__e_ << __sp << __x._V_[0];
+ __os << __x.__e_ << __sp << __x.__v_[0];
for (size_t __i = 1; __i < _Kp; ++__i)
- __os << __sp << __x._V_[__i];
- return __os << __sp << __x._Y_;
+ __os << __sp << __x.__v_[__i];
+ return __os << __sp << __x.__y_;
}
template <class _CharT, class _Traits,
class _Eng, size_t _Kp>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
shuffle_order_engine<_Eng, _Kp>& __x)
{
@@ -270,8 +270,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
{
__x.__e_ = __e;
for (size_t __i = 0; __i < _Kp; ++__i)
- __x._V_[__i] = _Vp[__i];
- __x._Y_ = _Vp[_Kp];
+ __x.__v_[__i] = _Vp[__i];
+ __x.__y_ = _Vp[_Kp];
}
return __is;
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/student_t_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/student_t_distribution.h
index 9e95f97cef..64847aa66a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/student_t_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/student_t_distribution.h
@@ -118,7 +118,7 @@ student_t_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
}
template <class _CharT, class _Traits, class _RT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const student_t_distribution<_RT>& __x)
{
@@ -131,7 +131,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
student_t_distribution<_RT>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/subtract_with_carry_engine.h b/contrib/libs/cxxsupp/libcxx/include/__random/subtract_with_carry_engine.h
index fdbe2d2e9b..b25ca84e3a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/subtract_with_carry_engine.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/subtract_with_carry_engine.h
@@ -33,7 +33,7 @@ template<class _UIntType, size_t __w, size_t __s, size_t __r>
class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine;
template<class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
-bool
+_LIBCPP_HIDE_FROM_ABI bool
operator==(
const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x,
const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __y);
@@ -47,13 +47,13 @@ operator!=(
template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x);
template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x);
@@ -251,7 +251,7 @@ subtract_with_carry_engine<_UIntType, __w, __s, __r>::operator()()
}
template<class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
-bool
+_LIBCPP_HIDE_FROM_ABI bool
operator==(
const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x,
const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __y)
@@ -305,7 +305,7 @@ operator!=(
template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x)
{
@@ -325,7 +325,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/uniform_int_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/uniform_int_distribution.h
index 46b627f45d..e9930e8575 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/uniform_int_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/uniform_int_distribution.h
@@ -38,12 +38,8 @@ public:
private:
typedef typename _Engine::result_type _Engine_result_type;
- typedef typename conditional
- <
- sizeof(_Engine_result_type) <= sizeof(result_type),
- result_type,
- _Engine_result_type
- >::type _Working_result_type;
+ typedef __conditional_t<sizeof(_Engine_result_type) <= sizeof(result_type), result_type, _Engine_result_type>
+ _Working_result_type;
_Engine& __e_;
size_t __w_;
@@ -178,8 +174,10 @@ public:
result_type a() const {return __a_;}
result_type b() const {return __b_;}
+ _LIBCPP_HIDE_FROM_ABI
friend bool operator==(const param_type& __x, const param_type& __y)
{return __x.__a_ == __y.__a_ && __x.__b_ == __y.__b_;}
+ _LIBCPP_HIDE_FROM_ABI
friend bool operator!=(const param_type& __x, const param_type& __y)
{return !(__x == __y);}
};
@@ -218,9 +216,11 @@ public:
result_type min() const {return a();}
result_type max() const {return b();}
+ _LIBCPP_HIDE_FROM_ABI
friend bool operator==(const uniform_int_distribution& __x,
const uniform_int_distribution& __y)
{return __x.__p_ == __y.__p_;}
+ _LIBCPP_HIDE_FROM_ABI
friend bool operator!=(const uniform_int_distribution& __x,
const uniform_int_distribution& __y)
{return !(__x == __y);}
@@ -233,8 +233,8 @@ uniform_int_distribution<_IntType>::operator()(_URNG& __g, const param_type& __p
_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
{
static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
- typedef typename conditional<sizeof(result_type) <= sizeof(uint32_t), uint32_t,
- typename make_unsigned<result_type>::type>::type _UIntType;
+ typedef __conditional_t<sizeof(result_type) <= sizeof(uint32_t), uint32_t, __make_unsigned_t<result_type> >
+ _UIntType;
const _UIntType _Rp = _UIntType(__p.b()) - _UIntType(__p.a()) + _UIntType(1);
if (_Rp == 1)
return __p.a();
@@ -255,7 +255,7 @@ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
}
template <class _CharT, class _Traits, class _IT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const uniform_int_distribution<_IT>& __x)
{
@@ -268,7 +268,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _IT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
uniform_int_distribution<_IT>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/uniform_real_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/uniform_real_distribution.h
index 7d2ecda732..b52b68977f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/uniform_real_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/uniform_real_distribution.h
@@ -123,7 +123,7 @@ uniform_real_distribution<_RealType>::operator()(_URNG& __g, const param_type& _
}
template <class _CharT, class _Traits, class _RT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const uniform_real_distribution<_RT>& __x)
{
@@ -137,7 +137,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
uniform_real_distribution<_RT>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/weibull_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/weibull_distribution.h
index 85bae65096..df834e6557 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/weibull_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/weibull_distribution.h
@@ -115,7 +115,7 @@ public:
};
template <class _CharT, class _Traits, class _RT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const weibull_distribution<_RT>& __x)
{
@@ -130,7 +130,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
weibull_distribution<_RT>& __x)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/access.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/access.h
index 0f1cca033a..87392a163e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/access.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/access.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_ACCESS_H
#define _LIBCPP___RANGES_ACCESS_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/all.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/all.h
index 181477419c..c30c9e32e4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/all.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/all.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_ALL_H
#define _LIBCPP___RANGES_ALL_H
@@ -28,7 +29,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges::views {
@@ -76,7 +77,7 @@ using all_t = decltype(views::all(declval<_Range>()));
} // namespace ranges::views
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/common_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/common_view.h
index 61b9b61f26..8d7ae58415 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/common_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/common_view.h
@@ -6,9 +6,12 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_COMMON_VIEW_H
#define _LIBCPP___RANGES_COMMON_VIEW_H
+#include <__concepts/constructible.h>
+#include <__concepts/copyable.h>
#include <__config>
#include <__iterator/common_iterator.h>
#include <__iterator/iterator_traits.h>
@@ -21,7 +24,6 @@
#include <__ranges/view_interface.h>
#include <__utility/forward.h>
#include <__utility/move.h>
-#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -30,7 +32,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -128,7 +130,7 @@ inline namespace __cpo {
} // namespace views
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/concepts.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/concepts.h
index 87df1d18ba..739e14184a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/concepts.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/concepts.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_CONCEPTS_H
#define _LIBCPP___RANGES_CONCEPTS_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/copyable_box.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/copyable_box.h
index 6012497db5..fb3d6e409c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/copyable_box.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/copyable_box.h
@@ -10,11 +10,13 @@
#ifndef _LIBCPP___RANGES_COPYABLE_BOX_H
#define _LIBCPP___RANGES_COPYABLE_BOX_H
+#include <__concepts/constructible.h>
+#include <__concepts/copyable.h>
+#include <__concepts/movable.h>
#include <__config>
#include <__memory/addressof.h>
#include <__memory/construct_at.h>
#include <__utility/move.h>
-#include <concepts>
#include <optional>
#include <type_traits>
@@ -24,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
// __copyable_box allows turning a type that is copy-constructible (but maybe not copy-assignable) into
// a type that is both copy-constructible and copy-assignable. It does that by introducing an empty state
@@ -171,7 +173,7 @@ namespace ranges {
};
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/counted.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/counted.h
index f45f1e8900..138aa0e1dd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/counted.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/counted.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_COUNTED_H
#define _LIBCPP___RANGES_COUNTED_H
@@ -29,7 +30,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges::views {
@@ -74,7 +75,7 @@ inline namespace __cpo {
} // namespace ranges::views
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/data.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/data.h
index 35d1af1e64..cadbfc8cf3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/data.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/data.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_DATA_H
#define _LIBCPP___RANGES_DATA_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/drop_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/drop_view.h
index b2a8ee5814..8f3564a8c7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/drop_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/drop_view.h
@@ -6,11 +6,14 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_DROP_VIEW_H
#define _LIBCPP___RANGES_DROP_VIEW_H
#include <__algorithm/min.h>
#include <__assert>
+#include <__concepts/constructible.h>
+#include <__concepts/convertible_to.h>
#include <__config>
#include <__functional/bind_back.h>
#include <__fwd/span.h>
@@ -33,7 +36,6 @@
#include <__utility/auto_cast.h>
#include <__utility/forward.h>
#include <__utility/move.h>
-#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -45,7 +47,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template<view _View>
@@ -297,7 +299,7 @@ inline namespace __cpo {
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/drop_while_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/drop_while_view.h
new file mode 100644
index 0000000000..7c28992f18
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/drop_while_view.h
@@ -0,0 +1,129 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___RANGES_DROP_WHILE_VIEW_H
+#define _LIBCPP___RANGES_DROP_WHILE_VIEW_H
+
+#include <__algorithm/ranges_find_if_not.h>
+#include <__assert>
+#include <__concepts/constructible.h>
+#include <__config>
+#include <__functional/bind_back.h>
+#include <__functional/reference_wrapper.h>
+#include <__iterator/concepts.h>
+#include <__ranges/access.h>
+#include <__ranges/all.h>
+#include <__ranges/concepts.h>
+#include <__ranges/copyable_box.h>
+#include <__ranges/enable_borrowed_range.h>
+#include <__ranges/non_propagating_cache.h>
+#include <__ranges/range_adaptor.h>
+#include <__ranges/view_interface.h>
+#include <__type_traits/conditional.h>
+#include <__type_traits/decay.h>
+#include <__type_traits/is_nothrow_constructible.h>
+#include <__type_traits/is_object.h>
+#include <__utility/forward.h>
+#include <__utility/in_place.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER >= 20
+
+namespace ranges {
+
+template <view _View, class _Pred>
+ requires input_range<_View> && is_object_v<_Pred> && indirect_unary_predicate<const _Pred, iterator_t<_View>>
+class drop_while_view : public view_interface<drop_while_view<_View, _Pred>> {
+public:
+ _LIBCPP_HIDE_FROM_ABI drop_while_view()
+ requires default_initializable<_View> && default_initializable<_Pred>
+ = default;
+
+ _LIBCPP_HIDE_FROM_ABI constexpr drop_while_view(_View __base, _Pred __pred)
+ : __base_(std::move(__base)), __pred_(std::in_place, std::move(__pred)) {}
+
+ _LIBCPP_HIDE_FROM_ABI constexpr _View base() const&
+ requires copy_constructible<_View>
+ {
+ return __base_;
+ }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr const _Pred& pred() const { return *__pred_; }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr auto begin() {
+ _LIBCPP_ASSERT(__pred_.__has_value(),
+ "drop_while_view needs to have a non-empty predicate before calling begin() -- did a previous "
+ "assignment to this drop_while_view fail?");
+ if constexpr (_UseCache) {
+ if (!__cached_begin_.__has_value()) {
+ __cached_begin_.__emplace(ranges::find_if_not(__base_, std::cref(*__pred_)));
+ }
+ return *__cached_begin_;
+ } else {
+ return ranges::find_if_not(__base_, std::cref(*__pred_));
+ }
+ }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr auto end() { return ranges::end(__base_); }
+
+private:
+ _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
+ _LIBCPP_NO_UNIQUE_ADDRESS __copyable_box<_Pred> __pred_;
+
+ static constexpr bool _UseCache = forward_range<_View>;
+ using _Cache = _If<_UseCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
+ _LIBCPP_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();
+};
+
+template <class _View, class _Pred>
+inline constexpr bool enable_borrowed_range<drop_while_view<_View, _Pred>> = enable_borrowed_range<_View>;
+
+template <class _Range, class _Pred>
+drop_while_view(_Range&&, _Pred) -> drop_while_view<views::all_t<_Range>, _Pred>;
+
+namespace views {
+namespace __drop_while {
+
+struct __fn {
+ template <class _Range, class _Pred>
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range, _Pred&& __pred) const
+ noexcept(noexcept(/**/ drop_while_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred))))
+ -> decltype(/*--*/ drop_while_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred))) {
+ return /*-------------*/ drop_while_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred));
+ }
+
+ template <class _Pred>
+ requires constructible_from<decay_t<_Pred>, _Pred>
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Pred&& __pred) const
+ noexcept(is_nothrow_constructible_v<decay_t<_Pred>, _Pred>) {
+ return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Pred>(__pred)));
+ }
+};
+
+} // namespace __drop_while
+
+inline namespace __cpo {
+inline constexpr auto drop_while = __drop_while::__fn{};
+} // namespace __cpo
+} // namespace views
+} // namespace ranges
+
+#endif // _LIBCPP_STD_VER >= 20
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___RANGES_DROP_WHILE_VIEW_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/empty.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/empty.h
index 46c97ca7e3..2370f1373c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/empty.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/empty.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_EMPTY_H
#define _LIBCPP___RANGES_EMPTY_H
@@ -22,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
// [range.prim.empty]
@@ -75,7 +76,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/empty_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/empty_view.h
index 3299fe825d..58e69ac19f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/empty_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/empty_view.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_EMPTY_VIEW_H
#define _LIBCPP___RANGES_EMPTY_VIEW_H
@@ -20,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template<class _Tp>
@@ -45,7 +46,7 @@ namespace ranges {
} // namespace views
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/enable_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/enable_view.h
index a1e5721404..2dc4752ff4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/enable_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/enable_view.h
@@ -10,8 +10,9 @@
#ifndef _LIBCPP___RANGES_ENABLE_VIEW_H
#define _LIBCPP___RANGES_ENABLE_VIEW_H
+#include <__concepts/derived_from.h>
+#include <__concepts/same_as.h>
#include <__config>
-#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/filter_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/filter_view.h
index b040ea57b7..0622da54ef 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/filter_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/filter_view.h
@@ -6,10 +6,15 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_FILTER_VIEW_H
#define _LIBCPP___RANGES_FILTER_VIEW_H
#include <__algorithm/ranges_find_if.h>
+#include <__concepts/constructible.h>
+#include <__concepts/copyable.h>
+#include <__concepts/derived_from.h>
+#include <__concepts/equality_comparable.h>
#include <__config>
#include <__debug>
#include <__functional/bind_back.h>
@@ -30,7 +35,6 @@
#include <__utility/forward.h>
#include <__utility/in_place.h>
#include <__utility/move.h>
-#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -39,7 +43,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template<input_range _View, indirect_unary_predicate<iterator_t<_View>> _Pred>
@@ -252,7 +256,7 @@ inline namespace __cpo {
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/iota_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/iota_view.h
index e1f03bafa0..8f9148a684 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/iota_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/iota_view.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_IOTA_VIEW_H
#define _LIBCPP___RANGES_IOTA_VIEW_H
@@ -39,7 +40,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template<class _Int>
@@ -221,6 +222,7 @@ namespace ranges {
return !(__x < __y);
}
+ _LIBCPP_HIDE_FROM_ABI
friend constexpr auto operator<=>(const __iterator& __x, const __iterator& __y)
requires totally_ordered<_Start> && three_way_comparable<_Start>
{
@@ -401,7 +403,7 @@ inline namespace __cpo {
} // namespace views
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/istream_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/istream_view.h
new file mode 100644
index 0000000000..4113b329b2
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/istream_view.h
@@ -0,0 +1,140 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___RANGES_ISTREAM_VIEW_H
+#define _LIBCPP___RANGES_ISTREAM_VIEW_H
+
+#include <__concepts/constructible.h>
+#include <__concepts/derived_from.h>
+#include <__concepts/movable.h>
+#include <__config>
+#include <__iterator/default_sentinel.h>
+#include <__iterator/iterator_traits.h>
+#include <__memory/addressof.h>
+#include <__ranges/view_interface.h>
+#include <__type_traits/remove_cvref.h>
+#include <__utility/forward.h>
+#include <cstddef>
+#include <iosfwd>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if _LIBCPP_STD_VER >= 20
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace ranges {
+
+template <class _Val, class _CharT, class _Traits>
+concept __stream_extractable = requires(basic_istream<_CharT, _Traits>& __is, _Val& __t) { __is >> __t; };
+
+template <movable _Val, class _CharT, class _Traits = char_traits<_CharT>>
+ requires default_initializable<_Val> && __stream_extractable<_Val, _CharT, _Traits>
+class basic_istream_view : public view_interface<basic_istream_view<_Val, _CharT, _Traits>> {
+public:
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit basic_istream_view(basic_istream<_CharT, _Traits>& __stream)
+ : __stream_(std::addressof(__stream)) {}
+
+ _LIBCPP_HIDE_FROM_ABI constexpr auto begin() {
+ *__stream_ >> __value_;
+ return __iterator{*this};
+ }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr default_sentinel_t end() const noexcept { return default_sentinel; }
+
+private:
+ class __iterator;
+
+ basic_istream<_CharT, _Traits>* __stream_;
+ _LIBCPP_NO_UNIQUE_ADDRESS _Val __value_ = _Val();
+};
+
+template <movable _Val, class _CharT, class _Traits>
+ requires default_initializable<_Val> && __stream_extractable<_Val, _CharT, _Traits>
+class basic_istream_view<_Val, _CharT, _Traits>::__iterator {
+public:
+ using iterator_concept = input_iterator_tag;
+ using difference_type = ptrdiff_t;
+ using value_type = _Val;
+
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit __iterator(basic_istream_view& __parent) noexcept
+ : __parent_(std::addressof(__parent)) {}
+
+ __iterator(const __iterator&) = delete;
+ _LIBCPP_HIDE_FROM_ABI __iterator(__iterator&&) = default;
+
+ __iterator& operator=(const __iterator&) = delete;
+ _LIBCPP_HIDE_FROM_ABI __iterator& operator=(__iterator&&) = default;
+
+ _LIBCPP_HIDE_FROM_ABI __iterator& operator++() {
+ *__parent_->__stream_ >> __parent_->__value_;
+ return *this;
+ }
+
+ _LIBCPP_HIDE_FROM_ABI void operator++(int) { ++*this; }
+
+ _LIBCPP_HIDE_FROM_ABI _Val& operator*() const { return __parent_->__value_; }
+
+ _LIBCPP_HIDE_FROM_ABI friend bool operator==(const __iterator& __x, default_sentinel_t) {
+ return !*__x.__get_parent_stream();
+ }
+
+private:
+ basic_istream_view* __parent_;
+
+ _LIBCPP_HIDE_FROM_ABI constexpr basic_istream<_CharT, _Traits>* __get_parent_stream() const {
+ return __parent_->__stream_;
+ }
+};
+
+template <class _Val>
+using istream_view = basic_istream_view<_Val, char>;
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <class _Val>
+using wistream_view = basic_istream_view<_Val, wchar_t>;
+#endif
+
+namespace views {
+namespace __istream {
+
+// clang-format off
+template <class _Tp>
+struct __fn {
+ template <class _Up, class _UnCVRef = remove_cvref_t<_Up>>
+ requires derived_from<_UnCVRef, basic_istream<typename _UnCVRef::char_type,
+ typename _UnCVRef::traits_type>>
+ _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Up&& __u) const
+ noexcept(noexcept(basic_istream_view<_Tp, typename _UnCVRef::char_type,
+ typename _UnCVRef::traits_type>(std::forward<_Up>(__u))))
+ -> decltype( basic_istream_view<_Tp, typename _UnCVRef::char_type,
+ typename _UnCVRef::traits_type>(std::forward<_Up>(__u)))
+ { return basic_istream_view<_Tp, typename _UnCVRef::char_type,
+ typename _UnCVRef::traits_type>(std::forward<_Up>(__u));
+ }
+};
+// clang-format on
+
+} // namespace __istream
+
+inline namespace __cpo {
+template <class _Tp>
+ inline constexpr auto istream = __istream::__fn<_Tp>{};
+} // namespace __cpo
+} // namespace views
+
+} // namespace ranges
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_STD_VER >= 20
+
+#endif // _LIBCPP___RANGES_ISTREAM_VIEW_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
index 6c16b68268..293926cc12 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_JOIN_VIEW_H
#define _LIBCPP___RANGES_JOIN_VIEW_H
@@ -25,6 +26,7 @@
#include <__ranges/non_propagating_cache.h>
#include <__ranges/range_adaptor.h>
#include <__ranges/view_interface.h>
+#include <__type_traits/maybe_const.h>
#include <__utility/forward.h>
#include <optional>
#include <type_traits>
@@ -35,7 +37,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template<class>
@@ -363,7 +365,7 @@ inline namespace __cpo {
} // namespace views
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/lazy_split_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/lazy_split_view.h
index e559a76ef7..3a95075884 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/lazy_split_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/lazy_split_view.h
@@ -10,7 +10,6 @@
#ifndef _LIBCPP___RANGES_LAZY_SPLIT_VIEW_H
#define _LIBCPP___RANGES_LAZY_SPLIT_VIEW_H
-#include <__algorithm/in_in_result.h>
#include <__algorithm/ranges_find.h>
#include <__algorithm/ranges_mismatch.h>
#include <__concepts/constructible.h>
@@ -35,6 +34,7 @@
#include <__ranges/single_view.h>
#include <__ranges/subrange.h>
#include <__ranges/view_interface.h>
+#include <__type_traits/maybe_const.h>
#include <__utility/forward.h>
#include <__utility/move.h>
#include <type_traits>
@@ -45,7 +45,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -458,7 +458,7 @@ inline namespace __cpo {
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/non_propagating_cache.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/non_propagating_cache.h
index 7255705256..d50c577fc3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/non_propagating_cache.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/non_propagating_cache.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_NON_PROPAGATING_CACHE_H
#define _LIBCPP___RANGES_NON_PROPAGATING_CACHE_H
@@ -14,7 +15,6 @@
#include <__iterator/iterator_traits.h> // iter_reference_t
#include <__memory/addressof.h>
#include <__utility/forward.h>
-#include <concepts> // constructible_from
#include <optional>
#include <type_traits>
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
// __non_propagating_cache is a helper type that allows storing an optional value in it,
@@ -107,7 +107,7 @@ namespace ranges {
struct __empty_cache { };
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/owning_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/owning_view.h
index ac1ef08fec..e150f6d9f2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/owning_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/owning_view.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_OWNING_VIEW_H
#define _LIBCPP___RANGES_OWNING_VIEW_H
@@ -28,7 +29,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template<range _Rp>
@@ -68,13 +69,14 @@ public:
_LIBCPP_HIDE_FROM_ABI constexpr auto data() const requires contiguous_range<const _Rp>
{ return ranges::data(__r_); }
};
+ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(owning_view);
template<class _Tp>
inline constexpr bool enable_borrowed_range<owning_view<_Tp>> = enable_borrowed_range<_Tp>;
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/range_adaptor.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/range_adaptor.h
index b65233b563..37e48179e3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/range_adaptor.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/range_adaptor.h
@@ -10,13 +10,16 @@
#ifndef _LIBCPP___RANGES_RANGE_ADAPTOR_H
#define _LIBCPP___RANGES_RANGE_ADAPTOR_H
+#include <__concepts/constructible.h>
+#include <__concepts/derived_from.h>
+#include <__concepts/invocable.h>
+#include <__concepts/same_as.h>
#include <__config>
#include <__functional/compose.h>
#include <__functional/invoke.h>
#include <__ranges/concepts.h>
#include <__utility/forward.h>
#include <__utility/move.h>
-#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -25,7 +28,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
// CRTP base that one can derive from in order to be considered a range adaptor closure
// by the library. When deriving from this class, a pipe operator will be provided to
@@ -41,6 +44,7 @@ template <class _Fn>
struct __range_adaptor_closure_t : _Fn, __range_adaptor_closure<__range_adaptor_closure_t<_Fn>> {
constexpr explicit __range_adaptor_closure_t(_Fn&& __f) : _Fn(std::move(__f)) { }
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(__range_adaptor_closure_t);
template <class _Tp>
concept _RangeAdaptorClosure = derived_from<remove_cvref_t<_Tp>, __range_adaptor_closure<remove_cvref_t<_Tp>>>;
@@ -66,7 +70,7 @@ struct __range_adaptor_closure {
{ return __range_adaptor_closure_t(std::__compose(std::forward<_OtherClosure>(__c2), std::forward<_Closure>(__c1))); }
};
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/rbegin.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/rbegin.h
index 9291359fdf..26b47321de 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/rbegin.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/rbegin.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_RBEGIN_H
#define _LIBCPP___RANGES_RBEGIN_H
@@ -25,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
// [ranges.access.rbegin]
@@ -123,7 +124,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/ref_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/ref_view.h
index e69c715fb9..e949f75344 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/ref_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/ref_view.h
@@ -6,9 +6,12 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_REF_VIEW_H
#define _LIBCPP___RANGES_REF_VIEW_H
+#include <__concepts/convertible_to.h>
+#include <__concepts/different_from.h>
#include <__config>
#include <__iterator/concepts.h>
#include <__iterator/incrementable_traits.h>
@@ -22,7 +25,6 @@
#include <__ranges/size.h>
#include <__ranges/view_interface.h>
#include <__utility/forward.h>
-#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -31,7 +33,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template<range _Range>
@@ -79,7 +81,7 @@ public:
inline constexpr bool enable_borrowed_range<ref_view<_Tp>> = true;
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/rend.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/rend.h
index e507b25872..d2987e9fa8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/rend.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/rend.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_REND_H
#define _LIBCPP___RANGES_REND_H
@@ -26,7 +27,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
// [range.access.rend]
@@ -127,7 +128,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h
index b1df8fbc33..d7b1378054 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_REVERSE_VIEW_H
#define _LIBCPP___RANGES_REVERSE_VIEW_H
@@ -33,7 +34,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template<view _View>
@@ -183,7 +184,7 @@ namespace ranges {
} // namespace views
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/single_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/single_view.h
index 98ebe5f383..5c4b91869c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/single_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/single_view.h
@@ -6,9 +6,11 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_SINGLE_VIEW_H
#define _LIBCPP___RANGES_SINGLE_VIEW_H
+#include <__concepts/constructible.h>
#include <__config>
#include <__ranges/copyable_box.h>
#include <__ranges/range_adaptor.h>
@@ -16,7 +18,6 @@
#include <__utility/forward.h>
#include <__utility/in_place.h>
#include <__utility/move.h>
-#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -25,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template<copy_constructible _Tp>
@@ -94,7 +95,7 @@ inline namespace __cpo {
} // namespace views
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/size.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/size.h
index 0e6d295651..720e3d4fd2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/size.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/size.h
@@ -6,16 +6,17 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_SIZE_H
#define _LIBCPP___RANGES_SIZE_H
+#include <__concepts/arithmetic.h>
#include <__concepts/class_or_enum.h>
#include <__config>
#include <__iterator/concepts.h>
#include <__iterator/iterator_traits.h>
#include <__ranges/access.h>
#include <__utility/auto_cast.h>
-#include <concepts>
#include <cstddef>
#include <type_traits>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/subrange.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/subrange.h
index 7e42da6ce7..3efcd9602a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/subrange.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/subrange.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_SUBRANGE_H
#define _LIBCPP___RANGES_SUBRANGE_H
@@ -16,6 +17,7 @@
#include <__concepts/derived_from.h>
#include <__concepts/different_from.h>
#include <__config>
+#include <__fwd/get.h>
#include <__iterator/advance.h>
#include <__iterator/concepts.h>
#include <__iterator/incrementable_traits.h>
@@ -26,7 +28,8 @@
#include <__ranges/enable_borrowed_range.h>
#include <__ranges/size.h>
#include <__ranges/view_interface.h>
-#include <__tuple>
+#include <__tuple/tuple_element.h>
+#include <__tuple/tuple_size.h>
#include <__utility/move.h>
#include <type_traits>
@@ -36,7 +39,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template<class _From, class _To>
@@ -285,7 +288,7 @@ struct tuple_element<1, const ranges::subrange<_Ip, _Sp, _Kp>> {
using type = _Sp;
};
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/take_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/take_view.h
index 11d5c9fc36..546e898aec 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/take_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/take_view.h
@@ -6,11 +6,14 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_TAKE_VIEW_H
#define _LIBCPP___RANGES_TAKE_VIEW_H
#include <__algorithm/min.h>
#include <__algorithm/ranges_min.h>
+#include <__concepts/constructible.h>
+#include <__concepts/convertible_to.h>
#include <__config>
#include <__functional/bind_back.h>
#include <__fwd/span.h>
@@ -30,10 +33,10 @@
#include <__ranges/size.h>
#include <__ranges/subrange.h>
#include <__ranges/view_interface.h>
+#include <__type_traits/maybe_const.h>
#include <__utility/auto_cast.h>
#include <__utility/forward.h>
#include <__utility/move.h>
-#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -45,7 +48,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -225,6 +228,7 @@ struct __passthrough_type<basic_string_view<_CharT, _Traits>> {
};
template <class _Iter, class _Sent, subrange_kind _Kind>
+ requires requires{typename subrange<_Iter>;}
struct __passthrough_type<subrange<_Iter, _Sent, _Kind>> {
using type = subrange<_Iter>;
};
@@ -328,7 +332,7 @@ inline namespace __cpo {
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/take_while_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/take_while_view.h
new file mode 100644
index 0000000000..77d7390dce
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/take_while_view.h
@@ -0,0 +1,177 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___RANGES_TAKE_WHILE_VIEW_H
+#define _LIBCPP___RANGES_TAKE_WHILE_VIEW_H
+
+#include <__concepts/constructible.h>
+#include <__concepts/convertible_to.h>
+#include <__config>
+#include <__functional/bind_back.h>
+#include <__functional/invoke.h>
+#include <__iterator/concepts.h>
+#include <__memory/addressof.h>
+#include <__ranges/access.h>
+#include <__ranges/all.h>
+#include <__ranges/concepts.h>
+#include <__ranges/copyable_box.h>
+#include <__ranges/range_adaptor.h>
+#include <__ranges/view_interface.h>
+#include <__type_traits/decay.h>
+#include <__type_traits/is_nothrow_constructible.h>
+#include <__type_traits/is_object.h>
+#include <__type_traits/maybe_const.h>
+#include <__utility/forward.h>
+#include <__utility/in_place.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER >= 20
+
+namespace ranges {
+
+// The spec uses the unnamed requirement inside the `begin` and `end` member functions:
+// constexpr auto begin() const
+// requires range<const V> && indirect_unary_predicate<const Pred, iterator_t<const V>>
+// However, due to a clang-14 and clang-15 bug, the above produces a hard error when `const V` is not a range.
+// The workaround is to create a named concept and use the concept instead.
+// As of take_while_view is implemented, the clang-trunk has already fixed the bug.
+// It is OK to remove the workaround once our CI no longer uses clang-14, clang-15 based compilers,
+// because we don't actually expect a lot of vendors to ship a new libc++ with an old clang.
+template <class _View, class _Pred>
+concept __take_while_const_is_range =
+ range<const _View> && indirect_unary_predicate<const _Pred, iterator_t<const _View>>;
+
+template <view _View, class _Pred>
+ requires input_range<_View> && is_object_v<_Pred> && indirect_unary_predicate<const _Pred, iterator_t<_View>>
+class take_while_view : public view_interface<take_while_view<_View, _Pred>> {
+ template <bool>
+ class __sentinel;
+
+ _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
+ _LIBCPP_NO_UNIQUE_ADDRESS __copyable_box<_Pred> __pred_;
+
+public:
+ _LIBCPP_HIDE_FROM_ABI take_while_view()
+ requires default_initializable<_View> && default_initializable<_Pred>
+ = default;
+
+ _LIBCPP_HIDE_FROM_ABI constexpr take_while_view(_View __base, _Pred __pred)
+ : __base_(std::move(__base)), __pred_(std::in_place, std::move(__pred)) {}
+
+ _LIBCPP_HIDE_FROM_ABI constexpr _View base() const&
+ requires copy_constructible<_View>
+ {
+ return __base_;
+ }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr const _Pred& pred() const { return *__pred_; }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr auto begin()
+ requires(!__simple_view<_View>)
+ {
+ return ranges::begin(__base_);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr auto begin() const
+ requires __take_while_const_is_range<_View, _Pred>
+ {
+ return ranges::begin(__base_);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr auto end()
+ requires(!__simple_view<_View>)
+ {
+ return __sentinel</*_Const=*/false>(ranges::end(__base_), std::addressof(*__pred_));
+ }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr auto end() const
+ requires __take_while_const_is_range<_View, _Pred>
+ {
+ return __sentinel</*_Const=*/true>(ranges::end(__base_), std::addressof(*__pred_));
+ }
+};
+
+template <class _Range, class _Pred>
+take_while_view(_Range&&, _Pred) -> take_while_view<views::all_t<_Range>, _Pred>;
+
+template <view _View, class _Pred>
+ requires input_range<_View> && is_object_v<_Pred> && indirect_unary_predicate<const _Pred, iterator_t<_View>>
+template <bool _Const>
+class take_while_view<_View, _Pred>::__sentinel {
+ using _Base = __maybe_const<_Const, _View>;
+
+ sentinel_t<_Base> __end_ = sentinel_t<_Base>();
+ const _Pred* __pred_ = nullptr;
+
+ friend class __sentinel<!_Const>;
+
+public:
+ _LIBCPP_HIDE_FROM_ABI __sentinel() = default;
+
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit __sentinel(sentinel_t<_Base> __end, const _Pred* __pred)
+ : __end_(std::move(__end)), __pred_(__pred) {}
+
+ _LIBCPP_HIDE_FROM_ABI constexpr __sentinel(__sentinel<!_Const> __s)
+ requires _Const && convertible_to<sentinel_t<_View>, sentinel_t<_Base>>
+ : __end_(std::move(__s.__end_)), __pred_(__s.__pred_) {}
+
+ _LIBCPP_HIDE_FROM_ABI constexpr sentinel_t<_Base> base() const { return __end_; }
+
+ _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const iterator_t<_Base>& __x, const __sentinel& __y) {
+ return __x == __y.__end_ || !std::invoke(*__y.__pred_, *__x);
+ }
+
+ template <bool _OtherConst = !_Const>
+ requires sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
+ _LIBCPP_HIDE_FROM_ABI friend constexpr bool
+ operator==(const iterator_t<__maybe_const<_OtherConst, _View>>& __x, const __sentinel& __y) {
+ return __x == __y.__end_ || !std::invoke(*__y.__pred_, *__x);
+ }
+};
+
+namespace views {
+namespace __take_while {
+
+struct __fn {
+ template <class _Range, class _Pred>
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range, _Pred&& __pred) const
+ noexcept(noexcept(/**/ take_while_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred))))
+ -> decltype(/*--*/ take_while_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred))) {
+ return /*-------------*/ take_while_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred));
+ }
+
+ template <class _Pred>
+ requires constructible_from<decay_t<_Pred>, _Pred>
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Pred&& __pred) const
+ noexcept(is_nothrow_constructible_v<decay_t<_Pred>, _Pred>) {
+ return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Pred>(__pred)));
+ }
+};
+
+} // namespace __take_while
+
+inline namespace __cpo {
+inline constexpr auto take_while = __take_while::__fn{};
+} // namespace __cpo
+} // namespace views
+} // namespace ranges
+
+#endif // _LIBCPP_STD_VER >= 20
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___RANGES_TAKE_WHILE_VIEW_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/transform_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/transform_view.h
index c5a7128c36..0b5ced3df4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/transform_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/transform_view.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_TRANSFORM_VIEW_H
#define _LIBCPP___RANGES_TRANSFORM_VIEW_H
@@ -30,6 +31,7 @@
#include <__ranges/range_adaptor.h>
#include <__ranges/size.h>
#include <__ranges/view_interface.h>
+#include <__type_traits/maybe_const.h>
#include <__utility/forward.h>
#include <__utility/in_place.h>
#include <__utility/move.h>
@@ -41,7 +43,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -433,7 +435,7 @@ inline namespace __cpo {
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/view_interface.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/view_interface.h
index 4b36e02f7d..b89ee999f8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/view_interface.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/view_interface.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_VIEW_INTERFACE_H
#define _LIBCPP___RANGES_VIEW_INTERFACE_H
@@ -28,7 +29,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -167,7 +168,7 @@ public:
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/views.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/views.h
index 8cc5ba3d2a..d40c64ad8c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/views.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/views.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -28,7 +28,7 @@ namespace views { }
namespace views = ranges::views;
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/zip_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/zip_view.h
index a8035bc79e..6eb0ffdf84 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/zip_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/zip_view.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___RANGES_ZIP_VIEW_H
#define _LIBCPP___RANGES_ZIP_VIEW_H
@@ -44,7 +45,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 20
namespace ranges {
@@ -502,7 +503,7 @@ inline namespace __cpo {
} // namespace views
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 20
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__split_buffer b/contrib/libs/cxxsupp/libcxx/include/__split_buffer
index 79e11840fd..5750a71531 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__split_buffer
+++ b/contrib/libs/cxxsupp/libcxx/include/__split_buffer
@@ -17,11 +17,14 @@
#include <__iterator/distance.h>
#include <__iterator/iterator_traits.h>
#include <__iterator/move_iterator.h>
+#include <__memory/allocate_at_least.h>
#include <__memory/allocator.h>
+#include <__memory/allocator_traits.h>
#include <__memory/compressed_pair.h>
+#include <__memory/pointer_traits.h>
#include <__memory/swap_allocator.h>
#include <__utility/forward.h>
-#include <memory>
+#include <__utility/move.h>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -34,6 +37,10 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
+// __split_buffer allocates a contiguous chunk of memory and stores objects in the range [__begin_, __end_).
+// It has uninitialized memory in the ranges [__first_, __begin_) and [__end_, __end_cap_.first()). That allows
+// it to grow both in the front and back without having to move the data.
+
template <class _Tp, class _Allocator = allocator<_Tp> >
struct __split_buffer
{
@@ -43,7 +50,7 @@ private:
public:
typedef _Tp value_type;
typedef _Allocator allocator_type;
- typedef typename remove_reference<allocator_type>::type __alloc_rr;
+ typedef __libcpp_remove_reference_t<allocator_type> __alloc_rr;
typedef allocator_traits<__alloc_rr> __alloc_traits;
typedef value_type& reference;
typedef const value_type& const_reference;
@@ -59,111 +66,110 @@ public:
pointer __end_;
__compressed_pair<pointer, allocator_type> __end_cap_;
- typedef typename add_lvalue_reference<allocator_type>::type __alloc_ref;
- typedef typename add_lvalue_reference<allocator_type>::type __alloc_const_ref;
+ typedef __add_lvalue_reference_t<allocator_type> __alloc_ref;
+ typedef __add_lvalue_reference_t<allocator_type> __alloc_const_ref;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY __alloc_rr& __alloc() _NOEXCEPT {return __end_cap_.second();}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const __alloc_rr& __alloc() const _NOEXCEPT {return __end_cap_.second();}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY pointer& __end_cap() _NOEXCEPT {return __end_cap_.first();}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const pointer& __end_cap() const _NOEXCEPT {return __end_cap_.first();}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __alloc_rr& __alloc() _NOEXCEPT {return __end_cap_.second();}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const __alloc_rr& __alloc() const _NOEXCEPT {return __end_cap_.second();}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pointer& __end_cap() _NOEXCEPT {return __end_cap_.first();}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const pointer& __end_cap() const _NOEXCEPT {return __end_cap_.first();}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
__split_buffer()
_NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
explicit __split_buffer(__alloc_rr& __a);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
explicit __split_buffer(const __alloc_rr& __a);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 __split_buffer(size_type __cap, size_type __start, __alloc_rr& __a);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 ~__split_buffer();
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __split_buffer(size_type __cap, size_type __start, __alloc_rr& __a);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI ~__split_buffer();
- _LIBCPP_CONSTEXPR_AFTER_CXX17 __split_buffer(__split_buffer&& __c)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __split_buffer(__split_buffer&& __c)
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 __split_buffer(__split_buffer&& __c, const __alloc_rr& __a);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 __split_buffer& operator=(__split_buffer&& __c)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __split_buffer(__split_buffer&& __c, const __alloc_rr& __a);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __split_buffer& operator=(__split_buffer&& __c)
_NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value &&
is_nothrow_move_assignable<allocator_type>::value) ||
!__alloc_traits::propagate_on_container_move_assignment::value);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY iterator begin() _NOEXCEPT {return __begin_;}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_iterator begin() const _NOEXCEPT {return __begin_;}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY iterator end() _NOEXCEPT {return __end_;}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_iterator end() const _NOEXCEPT {return __end_;}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT {return __begin_;}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT {return __begin_;}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT {return __end_;}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT {return __end_;}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void clear() _NOEXCEPT
{__destruct_at_end(__begin_);}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type size() const {return static_cast<size_type>(__end_ - __begin_);}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY bool empty() const {return __end_ == __begin_;}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type capacity() const {return static_cast<size_type>(__end_cap() - __first_);}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type __front_spare() const {return static_cast<size_type>(__begin_ - __first_);}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type __back_spare() const {return static_cast<size_type>(__end_cap() - __end_);}
-
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY reference front() {return *__begin_;}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference front() const {return *__begin_;}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY reference back() {return *(__end_ - 1);}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference back() const {return *(__end_ - 1);}
-
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void reserve(size_type __n);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void push_front(const_reference __x);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void push_front(value_type&& __x);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void push_back(value_type&& __x);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type size() const {return static_cast<size_type>(__end_ - __begin_);}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool empty() const {return __end_ == __begin_;}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type capacity() const {return static_cast<size_type>(__end_cap() - __first_);}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type __front_spare() const {return static_cast<size_type>(__begin_ - __first_);}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type __back_spare() const {return static_cast<size_type>(__end_cap() - __end_);}
+
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference front() {return *__begin_;}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference front() const {return *__begin_;}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference back() {return *(__end_ - 1);}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference back() const {return *(__end_ - 1);}
+
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void reserve(size_type __n);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void shrink_to_fit() _NOEXCEPT;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_front(const_reference __x);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(const_reference __x);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_front(value_type&& __x);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(value_type&& __x);
template <class... _Args>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void emplace_back(_Args&&... __args);
-
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void pop_front() {__destruct_at_begin(__begin_+1);}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void pop_back() {__destruct_at_end(__end_-1);}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void emplace_back(_Args&&... __args);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void pop_front() {__destruct_at_begin(__begin_+1);}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void pop_back() {__destruct_at_end(__end_-1);}
void __uninitialized_at_end(size_type __n);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n, const_reference __x);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n, const_reference __x);
template <class _InputIter>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIter>::value>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIter>::value>
__construct_at_end(_InputIter __first, _InputIter __last);
template <class _ForwardIterator>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value>
__construct_at_end(_ForwardIterator __first, _ForwardIterator __last);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void __destruct_at_begin(pointer __new_begin)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __destruct_at_begin(pointer __new_begin)
{__destruct_at_begin(__new_begin, is_trivially_destructible<value_type>());}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __destruct_at_begin(pointer __new_begin, false_type);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __destruct_at_begin(pointer __new_begin, true_type);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __destruct_at_end(pointer __new_last) _NOEXCEPT
{__destruct_at_end(__new_last, false_type());}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __destruct_at_end(pointer __new_last, false_type) _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __destruct_at_end(pointer __new_last, true_type) _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(__split_buffer& __x)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void swap(__split_buffer& __x)
_NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value||
__is_nothrow_swappable<__alloc_rr>::value);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 bool __invariants() const;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool __invariants() const;
private:
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __move_assign_alloc(__split_buffer& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
__alloc() = _VSTD::move(__c.__alloc());
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __move_assign_alloc(__split_buffer&, false_type) _NOEXCEPT
{}
struct _ConstructTransaction {
- _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit _ConstructTransaction(pointer* __p, size_type __n) _NOEXCEPT
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit _ConstructTransaction(pointer* __p, size_type __n) _NOEXCEPT
: __pos_(*__p), __end_(*__p + __n), __dest_(__p) {
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 ~_ConstructTransaction() {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI ~_ConstructTransaction() {
*__dest_ = __pos_;
}
pointer __pos_;
@@ -174,7 +180,7 @@ private:
};
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
bool
__split_buffer<_Tp, _Allocator>::__invariants() const
{
@@ -212,7 +218,7 @@ __split_buffer<_Tp, _Allocator>::__uninitialized_at_end(size_type __n)
// Precondition: size() + __n <= capacity()
// Postcondition: size() == size() + __n
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n)
{
@@ -229,7 +235,7 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n)
// Postcondition: size() == old size() + __n
// Postcondition: [i] == __x for all i in [size() - __n, __n)
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
{
@@ -242,7 +248,7 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n, const_referen
template <class _Tp, class _Allocator>
template <class _InputIter>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIter>::value>
+_LIBCPP_CONSTEXPR_SINCE_CXX20 __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIter>::value>
__split_buffer<_Tp, _Allocator>::__construct_at_end(_InputIter __first, _InputIter __last)
{
__alloc_rr& __a = this->__alloc();
@@ -265,7 +271,7 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end(_InputIter __first, _InputIt
template <class _Tp, class _Allocator>
template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value>
+_LIBCPP_CONSTEXPR_SINCE_CXX20 __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value>
__split_buffer<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last)
{
_ConstructTransaction __tx(&this->__end_, _VSTD::distance(__first, __last));
@@ -276,7 +282,7 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _F
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
inline
void
__split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, false_type)
@@ -286,7 +292,7 @@ __split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, false_
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
inline
void
__split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, true_type)
@@ -295,8 +301,8 @@ __split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, true_t
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
void
__split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, false_type) _NOEXCEPT
{
@@ -305,8 +311,8 @@ __split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, false_typ
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
void
__split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, true_type) _NOEXCEPT
{
@@ -314,7 +320,7 @@ __split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, true_type
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__split_buffer<_Tp, _Allocator>::__split_buffer(size_type __cap, size_type __start, __alloc_rr& __a)
: __end_cap_(nullptr, __a)
{
@@ -330,7 +336,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(size_type __cap, size_type __sta
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
inline
__split_buffer<_Tp, _Allocator>::__split_buffer()
_NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
@@ -339,7 +345,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer()
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
inline
__split_buffer<_Tp, _Allocator>::__split_buffer(__alloc_rr& __a)
: __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __a)
@@ -347,7 +353,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(__alloc_rr& __a)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
inline
__split_buffer<_Tp, _Allocator>::__split_buffer(const __alloc_rr& __a)
: __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __a)
@@ -355,7 +361,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(const __alloc_rr& __a)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__split_buffer<_Tp, _Allocator>::~__split_buffer()
{
clear();
@@ -364,7 +370,7 @@ __split_buffer<_Tp, _Allocator>::~__split_buffer()
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
: __first_(_VSTD::move(__c.__first_)),
@@ -379,7 +385,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c, const __alloc_rr& __a)
: __end_cap_(nullptr, __a)
{
@@ -406,7 +412,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c, const __al
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__split_buffer<_Tp, _Allocator>&
__split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c)
_NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value &&
@@ -427,7 +433,7 @@ __split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::swap(__split_buffer& __x)
_NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value||
@@ -441,7 +447,7 @@ __split_buffer<_Tp, _Allocator>::swap(__split_buffer& __x)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::reserve(size_type __n)
{
@@ -458,7 +464,7 @@ __split_buffer<_Tp, _Allocator>::reserve(size_type __n)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT
{
@@ -486,7 +492,7 @@ __split_buffer<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::push_front(const_reference __x)
{
@@ -516,7 +522,7 @@ __split_buffer<_Tp, _Allocator>::push_front(const_reference __x)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
{
@@ -547,8 +553,8 @@ __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
void
__split_buffer<_Tp, _Allocator>::push_back(const_reference __x)
{
@@ -578,7 +584,7 @@ __split_buffer<_Tp, _Allocator>::push_back(const_reference __x)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::push_back(value_type&& __x)
{
@@ -610,7 +616,7 @@ __split_buffer<_Tp, _Allocator>::push_back(value_type&& __x)
template <class _Tp, class _Allocator>
template <class... _Args>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args)
{
@@ -641,8 +647,8 @@ __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
void
swap(__split_buffer<_Tp, _Allocator>& __x, __split_buffer<_Tp, _Allocator>& __y)
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
diff --git a/contrib/libs/cxxsupp/libcxx/include/__string/char_traits.h b/contrib/libs/cxxsupp/libcxx/include/__string/char_traits.h
index aa2b936341..dc9afbd336 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__string/char_traits.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__string/char_traits.h
@@ -14,14 +14,16 @@
#include <__algorithm/find_end.h>
#include <__algorithm/find_first_of.h>
#include <__algorithm/min.h>
+#include <__compare/ordering.h>
#include <__config>
#include <__functional/hash.h>
#include <__iterator/iterator_traits.h>
+#include <__type_traits/is_constant_evaluated.h>
+#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <iosfwd>
-#include <type_traits>
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
# include <cwchar> // for wmemcpy
@@ -37,35 +39,124 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT>
-struct _LIBCPP_TEMPLATE_VIS char_traits
+struct char_traits;
+/*
+The Standard does not define the base template for char_traits because it is impossible to provide
+a correct definition for arbitrary character types. Instead, it requires implementations to provide
+specializations for predefined character types like `char`, `wchar_t` and others. We provide this as
+exposition-only to document what members a char_traits specialization should provide:
+{
+ using char_type = _CharT;
+ using int_type = ...;
+ using off_type = ...;
+ using pos_type = ...;
+ using state_type = ...;
+
+ static void assign(char_type&, const char_type&);
+ static bool eq(char_type, char_type);
+ static bool lt(char_type, char_type);
+
+ static int compare(const char_type*, const char_type*, size_t);
+ static size_t length(const char_type*);
+ static const char_type* find(const char_type*, size_t, const char_type&);
+ static char_type* move(char_type*, const char_type*, size_t);
+ static char_type* copy(char_type*, const char_type*, size_t);
+ static char_type* assign(char_type*, size_t, char_type);
+
+ static int_type not_eof(int_type);
+ static char_type to_char_type(int_type);
+ static int_type to_int_type(char_type);
+ static bool eq_int_type(int_type, int_type);
+ static int_type eof();
+};
+*/
+
+//
+// Temporary extension to provide a base template for std::char_traits.
+// TODO: Remove in LLVM 18.
+//
+template <class _CharT>
+struct _LIBCPP_DEPRECATED_("char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 18, so please migrate off of it.")
+ char_traits
{
- typedef _CharT char_type;
- typedef int int_type;
- typedef streamoff off_type;
- typedef streampos pos_type;
- typedef mbstate_t state_type;
+ using char_type = _CharT;
+ using int_type = int;
+ using off_type = streamoff;
+ using pos_type = streampos;
+ using state_type = mbstate_t;
- static inline void _LIBCPP_CONSTEXPR_AFTER_CXX14
+ static inline void _LIBCPP_CONSTEXPR_SINCE_CXX17
assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}
static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
{return __c1 == __c2;}
static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
{return __c1 < __c2;}
- static _LIBCPP_CONSTEXPR_AFTER_CXX14
- int compare(const char_type* __s1, const char_type* __s2, size_t __n);
- _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
- size_t length(const char_type* __s);
- _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
- const char_type* find(const char_type* __s, size_t __n, const char_type& __a);
- static _LIBCPP_CONSTEXPR_AFTER_CXX17
- char_type* move(char_type* __s1, const char_type* __s2, size_t __n);
+ static _LIBCPP_CONSTEXPR_SINCE_CXX17
+ int compare(const char_type* __s1, const char_type* __s2, size_t __n) {
+ for (; __n; --__n, ++__s1, ++__s2)
+ {
+ if (lt(*__s1, *__s2))
+ return -1;
+ if (lt(*__s2, *__s1))
+ return 1;
+ }
+ return 0;
+ }
+ _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
+ size_t length(const char_type* __s) {
+ size_t __len = 0;
+ for (; !eq(*__s, char_type(0)); ++__s)
+ ++__len;
+ return __len;
+ }
+ _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
+ const char_type* find(const char_type* __s, size_t __n, const char_type& __a) {
+ for (; __n; --__n)
+ {
+ if (eq(*__s, __a))
+ return __s;
+ ++__s;
+ }
+ return nullptr;
+ }
+ static _LIBCPP_CONSTEXPR_SINCE_CXX20
+ char_type* move(char_type* __s1, const char_type* __s2, size_t __n) {
+ if (__n == 0) return __s1;
+ char_type* __r = __s1;
+ if (__s1 < __s2)
+ {
+ for (; __n; --__n, ++__s1, ++__s2)
+ assign(*__s1, *__s2);
+ }
+ else if (__s2 < __s1)
+ {
+ __s1 += __n;
+ __s2 += __n;
+ for (; __n; --__n)
+ assign(*--__s1, *--__s2);
+ }
+ return __r;
+ }
_LIBCPP_INLINE_VISIBILITY
- static _LIBCPP_CONSTEXPR_AFTER_CXX17
- char_type* copy(char_type* __s1, const char_type* __s2, size_t __n);
+ static _LIBCPP_CONSTEXPR_SINCE_CXX20
+ char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) {
+ if (!__libcpp_is_constant_evaluated()) {
+ _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
+ }
+ char_type* __r = __s1;
+ for (; __n; --__n, ++__s1, ++__s2)
+ assign(*__s1, *__s2);
+ return __r;
+ }
_LIBCPP_INLINE_VISIBILITY
- static _LIBCPP_CONSTEXPR_AFTER_CXX17
- char_type* assign(char_type* __s, size_t __n, char_type __a);
+ static _LIBCPP_CONSTEXPR_SINCE_CXX20
+ char_type* assign(char_type* __s, size_t __n, char_type __a) {
+ char_type* __r = __s;
+ for (; __n; --__n, ++__s)
+ assign(*__s, __a);
+ return __r;
+ }
static inline _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT
{return eq_int_type(__c, eof()) ? ~eof() : __c;}
@@ -80,92 +171,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits
};
template <class _CharT>
-_LIBCPP_CONSTEXPR_AFTER_CXX14 int
-char_traits<_CharT>::compare(const char_type* __s1, const char_type* __s2, size_t __n)
-{
- for (; __n; --__n, ++__s1, ++__s2)
- {
- if (lt(*__s1, *__s2))
- return -1;
- if (lt(*__s2, *__s1))
- return 1;
- }
- return 0;
-}
-
-template <class _CharT>
-inline
-_LIBCPP_CONSTEXPR_AFTER_CXX14 size_t
-char_traits<_CharT>::length(const char_type* __s)
-{
- size_t __len = 0;
- for (; !eq(*__s, char_type(0)); ++__s)
- ++__len;
- return __len;
-}
-
-template <class _CharT>
-inline
-_LIBCPP_CONSTEXPR_AFTER_CXX14 const _CharT*
-char_traits<_CharT>::find(const char_type* __s, size_t __n, const char_type& __a)
-{
- for (; __n; --__n)
- {
- if (eq(*__s, __a))
- return __s;
- ++__s;
- }
- return nullptr;
-}
-
-template <class _CharT>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 _CharT*
-char_traits<_CharT>::move(char_type* __s1, const char_type* __s2, size_t __n)
-{
- if (__n == 0) return __s1;
- char_type* __r = __s1;
- if (__s1 < __s2)
- {
- for (; __n; --__n, ++__s1, ++__s2)
- assign(*__s1, *__s2);
- }
- else if (__s2 < __s1)
- {
- __s1 += __n;
- __s2 += __n;
- for (; __n; --__n)
- assign(*--__s1, *--__s2);
- }
- return __r;
-}
-
-template <class _CharT>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-_CharT*
-char_traits<_CharT>::copy(char_type* __s1, const char_type* __s2, size_t __n)
-{
- if (!__libcpp_is_constant_evaluated()) {
- _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
- }
- char_type* __r = __s1;
- for (; __n; --__n, ++__s1, ++__s2)
- assign(*__s1, *__s2);
- return __r;
-}
-
-template <class _CharT>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-_CharT*
-char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a)
-{
- char_type* __r = __s;
- for (; __n; --__n, ++__s)
- assign(*__s, __a);
- return __r;
-}
-
-template <class _CharT>
-static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI static inline _LIBCPP_CONSTEXPR_SINCE_CXX20
_CharT* __char_traits_move(_CharT* __dest, const _CharT* __source, size_t __n) _NOEXCEPT
{
#ifdef _LIBCPP_COMPILER_GCC
@@ -188,23 +194,26 @@ _CharT* __char_traits_move(_CharT* __dest, const _CharT* __source, size_t __n) _
template <>
struct _LIBCPP_TEMPLATE_VIS char_traits<char>
{
- typedef char char_type;
- typedef int int_type;
- typedef streamoff off_type;
- typedef streampos pos_type;
- typedef mbstate_t state_type;
+ using char_type = char;
+ using int_type = int;
+ using off_type = streamoff;
+ using pos_type = streampos;
+ using state_type = mbstate_t;
+#if _LIBCPP_STD_VER > 17
+ using comparison_category = strong_ordering;
+#endif
- static inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+ static inline _LIBCPP_CONSTEXPR_SINCE_CXX17
void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}
static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
{return __c1 == __c2;}
static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
{return (unsigned char)__c1 < (unsigned char)__c2;}
- static _LIBCPP_CONSTEXPR_AFTER_CXX14
+ static _LIBCPP_CONSTEXPR_SINCE_CXX17
int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
- static inline size_t _LIBCPP_CONSTEXPR_AFTER_CXX14 length(const char_type* __s) _NOEXCEPT {
+ static inline size_t _LIBCPP_CONSTEXPR_SINCE_CXX17 length(const char_type* __s) _NOEXCEPT {
// GCC currently does not support __builtin_strlen during constant evaluation.
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70816
#ifdef _LIBCPP_COMPILER_GCC
@@ -218,15 +227,15 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char>
return __builtin_strlen(__s);
}
- static _LIBCPP_CONSTEXPR_AFTER_CXX14
+ static _LIBCPP_CONSTEXPR_SINCE_CXX17
const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
- static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+ static inline _LIBCPP_CONSTEXPR_SINCE_CXX20
char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
return std::__char_traits_move(__s1, __s2, __n);
}
- static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+ static inline _LIBCPP_CONSTEXPR_SINCE_CXX20
char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
if (!__libcpp_is_constant_evaluated())
_LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
@@ -234,7 +243,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char>
return __s1;
}
- static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+ static inline _LIBCPP_CONSTEXPR_SINCE_CXX20
char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
std::fill_n(__s, __n, __a);
return __s;
@@ -252,7 +261,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char>
{return int_type(EOF);}
};
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17
int
char_traits<char>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
{
@@ -274,7 +283,7 @@ char_traits<char>::compare(const char_type* __s1, const char_type* __s2, size_t
#endif
}
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17
const char*
char_traits<char>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
{
@@ -295,39 +304,41 @@ char_traits<char>::find(const char_type* __s, size_t __n, const char_type& __a)
#endif
}
-
// char_traits<wchar_t>
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
struct _LIBCPP_TEMPLATE_VIS char_traits<wchar_t>
{
- typedef wchar_t char_type;
- typedef wint_t int_type;
- typedef streamoff off_type;
- typedef streampos pos_type;
- typedef mbstate_t state_type;
+ using char_type = wchar_t;
+ using int_type = wint_t;
+ using off_type = streamoff;
+ using pos_type = streampos;
+ using state_type = mbstate_t;
+#if _LIBCPP_STD_VER > 17
+ using comparison_category = strong_ordering;
+#endif
- static inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+ static inline _LIBCPP_CONSTEXPR_SINCE_CXX17
void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}
static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
{return __c1 == __c2;}
static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
{return __c1 < __c2;}
- static _LIBCPP_CONSTEXPR_AFTER_CXX14
+ static _LIBCPP_CONSTEXPR_SINCE_CXX17
int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
- static _LIBCPP_CONSTEXPR_AFTER_CXX14
+ static _LIBCPP_CONSTEXPR_SINCE_CXX17
size_t length(const char_type* __s) _NOEXCEPT;
- static _LIBCPP_CONSTEXPR_AFTER_CXX14
+ static _LIBCPP_CONSTEXPR_SINCE_CXX17
const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
- static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+ static inline _LIBCPP_CONSTEXPR_SINCE_CXX20
char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
return std::__char_traits_move(__s1, __s2, __n);
}
- static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+ static inline _LIBCPP_CONSTEXPR_SINCE_CXX20
char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
if (!__libcpp_is_constant_evaluated())
_LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
@@ -335,7 +346,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<wchar_t>
return __s1;
}
- static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+ static inline _LIBCPP_CONSTEXPR_SINCE_CXX20
char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
std::fill_n(__s, __n, __a);
return __s;
@@ -353,7 +364,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<wchar_t>
{return int_type(WEOF);}
};
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17
int
char_traits<wchar_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
{
@@ -375,7 +386,7 @@ char_traits<wchar_t>::compare(const char_type* __s1, const char_type* __s2, size
#endif
}
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17
size_t
char_traits<wchar_t>::length(const char_type* __s) _NOEXCEPT
{
@@ -391,7 +402,7 @@ char_traits<wchar_t>::length(const char_type* __s) _NOEXCEPT
#endif
}
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17
const wchar_t*
char_traits<wchar_t>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
{
@@ -418,11 +429,14 @@ char_traits<wchar_t>::find(const char_type* __s, size_t __n, const char_type& __
template <>
struct _LIBCPP_TEMPLATE_VIS char_traits<char8_t>
{
- typedef char8_t char_type;
- typedef unsigned int int_type;
- typedef streamoff off_type;
- typedef u8streampos pos_type;
- typedef mbstate_t state_type;
+ using char_type = char8_t;
+ using int_type = unsigned int;
+ using off_type = streamoff;
+ using pos_type = u8streampos;
+ using state_type = mbstate_t;
+#if _LIBCPP_STD_VER > 17
+ using comparison_category = strong_ordering;
+#endif
static inline constexpr void assign(char_type& __c1, const char_type& __c2) noexcept
{__c1 = __c2;}
@@ -440,12 +454,12 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char8_t>
_LIBCPP_INLINE_VISIBILITY static constexpr
const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
- static _LIBCPP_CONSTEXPR_AFTER_CXX17
+ static _LIBCPP_CONSTEXPR_SINCE_CXX20
char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
return std::__char_traits_move(__s1, __s2, __n);
}
- static _LIBCPP_CONSTEXPR_AFTER_CXX17
+ static _LIBCPP_CONSTEXPR_SINCE_CXX20
char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
if (!__libcpp_is_constant_evaluated())
_LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
@@ -453,7 +467,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char8_t>
return __s1;
}
- static _LIBCPP_CONSTEXPR_AFTER_CXX17
+ static _LIBCPP_CONSTEXPR_SINCE_CXX20
char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
std::fill_n(__s, __n, __a);
return __s;
@@ -519,32 +533,35 @@ char_traits<char8_t>::find(const char_type* __s, size_t __n, const char_type& __
template <>
struct _LIBCPP_TEMPLATE_VIS char_traits<char16_t>
{
- typedef char16_t char_type;
- typedef uint_least16_t int_type;
- typedef streamoff off_type;
- typedef u16streampos pos_type;
- typedef mbstate_t state_type;
+ using char_type = char16_t;
+ using int_type = uint_least16_t;
+ using off_type = streamoff;
+ using pos_type = u16streampos;
+ using state_type = mbstate_t;
+#if _LIBCPP_STD_VER > 17
+ using comparison_category = strong_ordering;
+#endif
- static inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+ static inline _LIBCPP_CONSTEXPR_SINCE_CXX17
void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}
static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
{return __c1 == __c2;}
static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
{return __c1 < __c2;}
- _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
size_t length(const char_type* __s) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
return std::__char_traits_move(__s1, __s2, __n);
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
if (!__libcpp_is_constant_evaluated())
_LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
@@ -552,7 +569,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char16_t>
return __s1;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
std::fill_n(__s, __n, __a);
return __s;
@@ -570,7 +587,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char16_t>
{return int_type(0xFFFF);}
};
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17
int
char_traits<char16_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
{
@@ -584,7 +601,7 @@ char_traits<char16_t>::compare(const char_type* __s1, const char_type* __s2, siz
return 0;
}
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17
size_t
char_traits<char16_t>::length(const char_type* __s) _NOEXCEPT
{
@@ -594,7 +611,7 @@ char_traits<char16_t>::length(const char_type* __s) _NOEXCEPT
return __len;
}
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17
const char16_t*
char_traits<char16_t>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
{
@@ -610,38 +627,41 @@ char_traits<char16_t>::find(const char_type* __s, size_t __n, const char_type& _
template <>
struct _LIBCPP_TEMPLATE_VIS char_traits<char32_t>
{
- typedef char32_t char_type;
- typedef uint_least32_t int_type;
- typedef streamoff off_type;
- typedef u32streampos pos_type;
- typedef mbstate_t state_type;
+ using char_type = char32_t;
+ using int_type = uint_least32_t;
+ using off_type = streamoff;
+ using pos_type = u32streampos;
+ using state_type = mbstate_t;
+#if _LIBCPP_STD_VER > 17
+ using comparison_category = strong_ordering;
+#endif
- static inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+ static inline _LIBCPP_CONSTEXPR_SINCE_CXX17
void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}
static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
{return __c1 == __c2;}
static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
{return __c1 < __c2;}
- _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
size_t length(const char_type* __s) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
return std::__char_traits_move(__s1, __s2, __n);
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
std::copy_n(__s2, __n, __s1);
return __s1;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
std::fill_n(__s, __n, __a);
return __s;
@@ -659,7 +679,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char32_t>
{return int_type(0xFFFFFFFF);}
};
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17
int
char_traits<char32_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
{
@@ -673,7 +693,7 @@ char_traits<char32_t>::compare(const char_type* __s1, const char_type* __s2, siz
return 0;
}
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17
size_t
char_traits<char32_t>::length(const char_type* __s) _NOEXCEPT
{
@@ -683,7 +703,7 @@ char_traits<char32_t>::length(const char_type* __s) _NOEXCEPT
return __len;
}
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17
const char32_t*
char_traits<char32_t>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
{
@@ -700,7 +720,7 @@ char_traits<char32_t>::find(const char_type* __s, size_t __n, const char_type& _
// __str_find
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find(const _CharT *__p, _SizeT __sz,
_CharT __c, _SizeT __pos) _NOEXCEPT
{
@@ -713,7 +733,7 @@ __str_find(const _CharT *__p, _SizeT __sz,
}
template <class _CharT, class _Traits>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX11 const _CharT *
+_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR_SINCE_CXX14 const _CharT *
__search_substring(const _CharT *__first1, const _CharT *__last1,
const _CharT *__first2, const _CharT *__last2) _NOEXCEPT {
// Take advantage of knowing source and pattern lengths.
@@ -752,7 +772,7 @@ __search_substring(const _CharT *__first1, const _CharT *__last1,
}
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find(const _CharT *__p, _SizeT __sz,
const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
{
@@ -774,7 +794,7 @@ __str_find(const _CharT *__p, _SizeT __sz,
// __str_rfind
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_rfind(const _CharT *__p, _SizeT __sz,
_CharT __c, _SizeT __pos) _NOEXCEPT
{
@@ -793,7 +813,7 @@ __str_rfind(const _CharT *__p, _SizeT __sz,
}
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_rfind(const _CharT *__p, _SizeT __sz,
const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
{
@@ -810,7 +830,7 @@ __str_rfind(const _CharT *__p, _SizeT __sz,
// __str_find_first_of
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find_first_of(const _CharT *__p, _SizeT __sz,
const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
{
@@ -826,7 +846,7 @@ __str_find_first_of(const _CharT *__p, _SizeT __sz,
// __str_find_last_of
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find_last_of(const _CharT *__p, _SizeT __sz,
const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
{
@@ -849,7 +869,7 @@ __str_find_last_of(const _CharT *__p, _SizeT __sz,
// __str_find_first_not_of
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find_first_not_of(const _CharT *__p, _SizeT __sz,
const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
{
@@ -865,7 +885,7 @@ __str_find_first_not_of(const _CharT *__p, _SizeT __sz,
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find_first_not_of(const _CharT *__p, _SizeT __sz,
_CharT __c, _SizeT __pos) _NOEXCEPT
{
@@ -882,7 +902,7 @@ __str_find_first_not_of(const _CharT *__p, _SizeT __sz,
// __str_find_last_not_of
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find_last_not_of(const _CharT *__p, _SizeT __sz,
const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
{
@@ -898,7 +918,7 @@ __str_find_last_not_of(const _CharT *__p, _SizeT __sz,
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find_last_not_of(const _CharT *__p, _SizeT __sz,
_CharT __c, _SizeT __pos) _NOEXCEPT
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/android/locale_bionic.h b/contrib/libs/cxxsupp/libcxx/include/__support/android/locale_bionic.h
index c41e26420f..5f4a89a7c6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/android/locale_bionic.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/android/locale_bionic.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_SUPPORT_ANDROID_LOCALE_BIONIC_H
-#define _LIBCPP_SUPPORT_ANDROID_LOCALE_BIONIC_H
+#ifndef _LIBCPP___SUPPORT_ANDROID_LOCALE_BIONIC_H
+#define _LIBCPP___SUPPORT_ANDROID_LOCALE_BIONIC_H
#if defined(__BIONIC__)
@@ -72,4 +72,4 @@ strtol_l(const char* __nptr, char** __endptr, int __base, locale_t) {
#endif // defined(__ANDROID__)
#endif // defined(__BIONIC__)
-#endif // _LIBCPP_SUPPORT_ANDROID_LOCALE_BIONIC_H
+#endif // _LIBCPP___SUPPORT_ANDROID_LOCALE_BIONIC_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/fuchsia/xlocale.h b/contrib/libs/cxxsupp/libcxx/include/__support/fuchsia/xlocale.h
index e8def81480..1e4ece8dd3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/fuchsia/xlocale.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/fuchsia/xlocale.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H
-#define _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H
+#ifndef _LIBCPP___SUPPORT_FUCHSIA_XLOCALE_H
+#define _LIBCPP___SUPPORT_FUCHSIA_XLOCALE_H
#if defined(__Fuchsia__)
@@ -19,4 +19,4 @@
#endif // defined(__Fuchsia__)
-#endif // _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H
+#endif // _LIBCPP___SUPPORT_FUCHSIA_XLOCALE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/ibm/gettod_zos.h b/contrib/libs/cxxsupp/libcxx/include/__support/ibm/gettod_zos.h
index 2b2d927bae..fe7dc8bc17 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/ibm/gettod_zos.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/ibm/gettod_zos.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_SUPPORT_IBM_GETTOD_ZOS_H
-#define _LIBCPP_SUPPORT_IBM_GETTOD_ZOS_H
+#ifndef _LIBCPP___SUPPORT_IBM_GETTOD_ZOS_H
+#define _LIBCPP___SUPPORT_IBM_GETTOD_ZOS_H
#include <time.h>
@@ -51,4 +51,4 @@ gettimeofdayMonotonic(struct timespec64* Output) {
return 0;
}
-#endif // _LIBCPP_SUPPORT_IBM_GETTOD_ZOS_H
+#endif // _LIBCPP___SUPPORT_IBM_GETTOD_ZOS_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/ibm/locale_mgmt_zos.h b/contrib/libs/cxxsupp/libcxx/include/__support/ibm/locale_mgmt_zos.h
index 90ad2c2c86..179f563eb7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/ibm/locale_mgmt_zos.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/ibm/locale_mgmt_zos.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_ZOS_H
-#define _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_ZOS_H
+#ifndef _LIBCPP___SUPPORT_IBM_LOCALE_MGMT_ZOS_H
+#define _LIBCPP___SUPPORT_IBM_LOCALE_MGMT_ZOS_H
#if defined(__MVS__)
#include <locale.h>
@@ -50,4 +50,4 @@ locale_t uselocale(locale_t newloc);
}
#endif
#endif // defined(__MVS__)
-#endif // _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_ZOS_H
+#endif // _LIBCPP___SUPPORT_IBM_LOCALE_MGMT_ZOS_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/ibm/nanosleep.h b/contrib/libs/cxxsupp/libcxx/include/__support/ibm/nanosleep.h
index 9c6b976c00..7a32c66c11 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/ibm/nanosleep.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/ibm/nanosleep.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_SUPPORT_IBM_NANOSLEEP_H
-#define _LIBCPP_SUPPORT_IBM_NANOSLEEP_H
+#ifndef _LIBCPP___SUPPORT_IBM_NANOSLEEP_H
+#define _LIBCPP___SUPPORT_IBM_NANOSLEEP_H
#include <unistd.h>
@@ -52,4 +52,4 @@ inline int nanosleep(const struct timespec* __req, struct timespec* __rem) {
return 0;
}
-#endif // _LIBCPP_SUPPORT_IBM_NANOSLEEP_H
+#endif // _LIBCPP___SUPPORT_IBM_NANOSLEEP_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/ibm/xlocale.h b/contrib/libs/cxxsupp/libcxx/include/__support/ibm/xlocale.h
index 5a09212c6a..03302b0d4f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/ibm/xlocale.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/ibm/xlocale.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_SUPPORT_IBM_XLOCALE_H
-#define _LIBCPP_SUPPORT_IBM_XLOCALE_H
+#ifndef _LIBCPP___SUPPORT_IBM_XLOCALE_H
+#define _LIBCPP___SUPPORT_IBM_XLOCALE_H
#if defined(__MVS__)
#include <__support/ibm/locale_mgmt_zos.h>
@@ -126,4 +126,4 @@ vasprintf(char **strp, const char *fmt, va_list ap) {
#ifdef __cplusplus
}
#endif
-#endif // _LIBCPP_SUPPORT_IBM_XLOCALE_H
+#endif // _LIBCPP___SUPPORT_IBM_XLOCALE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/musl/xlocale.h b/contrib/libs/cxxsupp/libcxx/include/__support/musl/xlocale.h
index f564c87885..675ba93e11 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/musl/xlocale.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/musl/xlocale.h
@@ -14,8 +14,8 @@
// in Musl.
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_SUPPORT_MUSL_XLOCALE_H
-#define _LIBCPP_SUPPORT_MUSL_XLOCALE_H
+#ifndef _LIBCPP___SUPPORT_MUSL_XLOCALE_H
+#define _LIBCPP___SUPPORT_MUSL_XLOCALE_H
#include <cstdlib>
#include <cwchar>
@@ -53,4 +53,4 @@ wcstold_l(const wchar_t *__nptr, wchar_t **__endptr, locale_t) {
}
#endif
-#endif // _LIBCPP_SUPPORT_MUSL_XLOCALE_H
+#endif // _LIBCPP___SUPPORT_MUSL_XLOCALE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/newlib/xlocale.h b/contrib/libs/cxxsupp/libcxx/include/__support/newlib/xlocale.h
index b75f9263a4..4e546500fc 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/newlib/xlocale.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/newlib/xlocale.h
@@ -6,15 +6,11 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_SUPPORT_NEWLIB_XLOCALE_H
-#define _LIBCPP_SUPPORT_NEWLIB_XLOCALE_H
+#ifndef _LIBCPP___SUPPORT_NEWLIB_XLOCALE_H
+#define _LIBCPP___SUPPORT_NEWLIB_XLOCALE_H
#if defined(_NEWLIB_VERSION)
-#include <cstdlib>
-#include <clocale>
-#include <cwctype>
-#include <ctype.h>
#if !defined(__NEWLIB__) || __NEWLIB__ < 2 || \
__NEWLIB__ == 2 && __NEWLIB_MINOR__ < 5
#include <__support/xlocale/__nop_locale_mgmt.h>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/openbsd/xlocale.h b/contrib/libs/cxxsupp/libcxx/include/__support/openbsd/xlocale.h
index 2be8dc7a00..0269e8133b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/openbsd/xlocale.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/openbsd/xlocale.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_SUPPORT_OPENBSD_XLOCALE_H
-#define _LIBCPP_SUPPORT_OPENBSD_XLOCALE_H
+#ifndef _LIBCPP___SUPPORT_OPENBSD_XLOCALE_H
+#define _LIBCPP___SUPPORT_OPENBSD_XLOCALE_H
#include <__support/xlocale/__strtonum_fallback.h>
#include <clocale>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/win32/limits_msvc_win32.h b/contrib/libs/cxxsupp/libcxx/include/__support/win32/limits_msvc_win32.h
deleted file mode 100644
index 87e4e7db66..0000000000
--- a/contrib/libs/cxxsupp/libcxx/include/__support/win32/limits_msvc_win32.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// -*- C++ -*-
-//===-----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
-#define _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
-
-#if !defined(_LIBCPP_MSVCRT)
-#error "This header complements the Microsoft C Runtime library, and should not be included otherwise."
-#endif
-#if defined(__clang__)
-#error "This header should only be included when using Microsoft's C1XX frontend"
-#endif
-
-#include <float.h> // limit constants
-#include <limits.h> // CHAR_BIT
-#include <math.h> // HUGE_VAL
-#include <ymath.h> // internal MSVC header providing the needed functionality
-
-#define __CHAR_BIT__ CHAR_BIT
-
-#define __FLT_MANT_DIG__ FLT_MANT_DIG
-#define __FLT_DIG__ FLT_DIG
-#define __FLT_RADIX__ FLT_RADIX
-#define __FLT_MIN_EXP__ FLT_MIN_EXP
-#define __FLT_MIN_10_EXP__ FLT_MIN_10_EXP
-#define __FLT_MAX_EXP__ FLT_MAX_EXP
-#define __FLT_MAX_10_EXP__ FLT_MAX_10_EXP
-#define __FLT_MIN__ FLT_MIN
-#define __FLT_MAX__ FLT_MAX
-#define __FLT_EPSILON__ FLT_EPSILON
-// predefined by MinGW GCC
-#define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F
-
-#define __DBL_MANT_DIG__ DBL_MANT_DIG
-#define __DBL_DIG__ DBL_DIG
-#define __DBL_RADIX__ DBL_RADIX
-#define __DBL_MIN_EXP__ DBL_MIN_EXP
-#define __DBL_MIN_10_EXP__ DBL_MIN_10_EXP
-#define __DBL_MAX_EXP__ DBL_MAX_EXP
-#define __DBL_MAX_10_EXP__ DBL_MAX_10_EXP
-#define __DBL_MIN__ DBL_MIN
-#define __DBL_MAX__ DBL_MAX
-#define __DBL_EPSILON__ DBL_EPSILON
-// predefined by MinGW GCC
-#define __DBL_DENORM_MIN__ double(4.94065645841246544177e-324L)
-
-#define __LDBL_MANT_DIG__ LDBL_MANT_DIG
-#define __LDBL_DIG__ LDBL_DIG
-#define __LDBL_RADIX__ LDBL_RADIX
-#define __LDBL_MIN_EXP__ LDBL_MIN_EXP
-#define __LDBL_MIN_10_EXP__ LDBL_MIN_10_EXP
-#define __LDBL_MAX_EXP__ LDBL_MAX_EXP
-#define __LDBL_MAX_10_EXP__ LDBL_MAX_10_EXP
-#define __LDBL_MIN__ LDBL_MIN
-#define __LDBL_MAX__ LDBL_MAX
-#define __LDBL_EPSILON__ LDBL_EPSILON
-// predefined by MinGW GCC
-#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
-
-// __builtin replacements/workarounds
-#define __builtin_huge_vall() _LInf._Long_double
-#define __builtin_nanl(__dummmy) _LNan._Long_double
-#define __builtin_nansl(__dummy) _LSnan._Long_double
-
-#endif // _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/win32/locale_win32.h b/contrib/libs/cxxsupp/libcxx/include/__support/win32/locale_win32.h
index b5e31611ec..d15cd6b4c1 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/win32/locale_win32.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/win32/locale_win32.h
@@ -7,13 +7,14 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
-#define _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
+#ifndef _LIBCPP___SUPPORT_WIN32_LOCALE_WIN32_H
+#define _LIBCPP___SUPPORT_WIN32_LOCALE_WIN32_H
#include <__config>
#include <cstddef>
#include <locale.h> // _locale_t
#include <stdio.h>
+#include <string>
#define _X_ALL LC_ALL
#define _X_COLLATE LC_COLLATE
@@ -46,92 +47,92 @@
class __lconv_storage {
public:
__lconv_storage(const lconv *__lc_input) {
- __lc = *__lc_input;
-
- __decimal_point = __lc_input->decimal_point;
- __thousands_sep = __lc_input->thousands_sep;
- __grouping = __lc_input->grouping;
- __int_curr_symbol = __lc_input->int_curr_symbol;
- __currency_symbol = __lc_input->currency_symbol;
- __mon_decimal_point = __lc_input->mon_decimal_point;
- __mon_thousands_sep = __lc_input->mon_thousands_sep;
- __mon_grouping = __lc_input->mon_grouping;
- __positive_sign = __lc_input->positive_sign;
- __negative_sign = __lc_input->negative_sign;
-
- __lc.decimal_point = const_cast<char *>(__decimal_point.c_str());
- __lc.thousands_sep = const_cast<char *>(__thousands_sep.c_str());
- __lc.grouping = const_cast<char *>(__grouping.c_str());
- __lc.int_curr_symbol = const_cast<char *>(__int_curr_symbol.c_str());
- __lc.currency_symbol = const_cast<char *>(__currency_symbol.c_str());
- __lc.mon_decimal_point = const_cast<char *>(__mon_decimal_point.c_str());
- __lc.mon_thousands_sep = const_cast<char *>(__mon_thousands_sep.c_str());
- __lc.mon_grouping = const_cast<char *>(__mon_grouping.c_str());
- __lc.positive_sign = const_cast<char *>(__positive_sign.c_str());
- __lc.negative_sign = const_cast<char *>(__negative_sign.c_str());
+ __lc_ = *__lc_input;
+
+ __decimal_point_ = __lc_input->decimal_point;
+ __thousands_sep_ = __lc_input->thousands_sep;
+ __grouping_ = __lc_input->grouping;
+ __int_curr_symbol_ = __lc_input->int_curr_symbol;
+ __currency_symbol_ = __lc_input->currency_symbol;
+ __mon_decimal_point_ = __lc_input->mon_decimal_point;
+ __mon_thousands_sep_ = __lc_input->mon_thousands_sep;
+ __mon_grouping_ = __lc_input->mon_grouping;
+ __positive_sign_ = __lc_input->positive_sign;
+ __negative_sign_ = __lc_input->negative_sign;
+
+ __lc_.decimal_point = const_cast<char *>(__decimal_point_.c_str());
+ __lc_.thousands_sep = const_cast<char *>(__thousands_sep_.c_str());
+ __lc_.grouping = const_cast<char *>(__grouping_.c_str());
+ __lc_.int_curr_symbol = const_cast<char *>(__int_curr_symbol_.c_str());
+ __lc_.currency_symbol = const_cast<char *>(__currency_symbol_.c_str());
+ __lc_.mon_decimal_point = const_cast<char *>(__mon_decimal_point_.c_str());
+ __lc_.mon_thousands_sep = const_cast<char *>(__mon_thousands_sep_.c_str());
+ __lc_.mon_grouping = const_cast<char *>(__mon_grouping_.c_str());
+ __lc_.positive_sign = const_cast<char *>(__positive_sign_.c_str());
+ __lc_.negative_sign = const_cast<char *>(__negative_sign_.c_str());
}
lconv *__get() {
- return &__lc;
+ return &__lc_;
}
private:
- lconv __lc;
- std::string __decimal_point;
- std::string __thousands_sep;
- std::string __grouping;
- std::string __int_curr_symbol;
- std::string __currency_symbol;
- std::string __mon_decimal_point;
- std::string __mon_thousands_sep;
- std::string __mon_grouping;
- std::string __positive_sign;
- std::string __negative_sign;
+ lconv __lc_;
+ std::string __decimal_point_;
+ std::string __thousands_sep_;
+ std::string __grouping_;
+ std::string __int_curr_symbol_;
+ std::string __currency_symbol_;
+ std::string __mon_decimal_point_;
+ std::string __mon_thousands_sep_;
+ std::string __mon_grouping_;
+ std::string __positive_sign_;
+ std::string __negative_sign_;
};
class locale_t {
public:
locale_t()
- : __locale(nullptr), __locale_str(nullptr), __lc(nullptr) {}
+ : __locale_(nullptr), __locale_str_(nullptr), __lc_(nullptr) {}
locale_t(std::nullptr_t)
- : __locale(nullptr), __locale_str(nullptr), __lc(nullptr) {}
+ : __locale_(nullptr), __locale_str_(nullptr), __lc_(nullptr) {}
locale_t(_locale_t __xlocale, const char* __xlocale_str)
- : __locale(__xlocale), __locale_str(__xlocale_str), __lc(nullptr) {}
+ : __locale_(__xlocale), __locale_str_(__xlocale_str), __lc_(nullptr) {}
locale_t(const locale_t &__l)
- : __locale(__l.__locale), __locale_str(__l.__locale_str), __lc(nullptr) {}
+ : __locale_(__l.__locale_), __locale_str_(__l.__locale_str_), __lc_(nullptr) {}
~locale_t() {
- delete __lc;
+ delete __lc_;
}
locale_t &operator =(const locale_t &__l) {
- __locale = __l.__locale;
- __locale_str = __l.__locale_str;
- // __lc not copied
+ __locale_ = __l.__locale_;
+ __locale_str_ = __l.__locale_str_;
+ // __lc_ not copied
return *this;
}
friend bool operator==(const locale_t& __left, const locale_t& __right) {
- return __left.__locale == __right.__locale;
+ return __left.__locale_ == __right.__locale_;
}
friend bool operator==(const locale_t& __left, int __right) {
- return __left.__locale == nullptr && __right == 0;
+ return __left.__locale_ == nullptr && __right == 0;
}
friend bool operator==(const locale_t& __left, long long __right) {
- return __left.__locale == nullptr && __right == 0;
+ return __left.__locale_ == nullptr && __right == 0;
}
friend bool operator==(const locale_t& __left, std::nullptr_t) {
- return __left.__locale == nullptr;
+ return __left.__locale_ == nullptr;
}
friend bool operator==(int __left, const locale_t& __right) {
- return __left == 0 && nullptr == __right.__locale;
+ return __left == 0 && nullptr == __right.__locale_;
}
friend bool operator==(std::nullptr_t, const locale_t& __right) {
- return nullptr == __right.__locale;
+ return nullptr == __right.__locale_;
}
friend bool operator!=(const locale_t& __left, const locale_t& __right) {
@@ -159,24 +160,24 @@ public:
}
operator bool() const {
- return __locale != nullptr;
+ return __locale_ != nullptr;
}
- const char* __get_locale() const { return __locale_str; }
+ const char* __get_locale() const { return __locale_str_; }
operator _locale_t() const {
- return __locale;
+ return __locale_;
}
lconv *__store_lconv(const lconv *__input_lc) {
- delete __lc;
- __lc = new __lconv_storage(__input_lc);
- return __lc->__get();
+ delete __lc_;
+ __lc_ = new __lconv_storage(__input_lc);
+ return __lc_->__get();
}
private:
- _locale_t __locale;
- const char* __locale_str;
- __lconv_storage *__lc = nullptr;
+ _locale_t __locale_;
+ const char* __locale_str_;
+ __lconv_storage *__lc_ = nullptr;
};
// Locale management functions
@@ -257,4 +258,4 @@ _LIBCPP_FUNC_VIS int snprintf_l(char *__ret, size_t __n, locale_t __loc, const c
_LIBCPP_FUNC_VIS int asprintf_l( char **__ret, locale_t __loc, const char *__format, ... );
_LIBCPP_FUNC_VIS int vasprintf_l( char **__ret, locale_t __loc, const char *__format, va_list __ap );
-#endif // _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
+#endif // _LIBCPP___SUPPORT_WIN32_LOCALE_WIN32_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__nop_locale_mgmt.h b/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__nop_locale_mgmt.h
index 3d26183faf..23727a5a3b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__nop_locale_mgmt.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__nop_locale_mgmt.h
@@ -7,8 +7,10 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
-#define _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
+#ifndef _LIBCPP___SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
+#define _LIBCPP___SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
+
+#include <__config>
#ifdef __cplusplus
extern "C" {
@@ -53,4 +55,4 @@ uselocale(locale_t) {
} // extern "C"
#endif
-#endif // _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
+#endif // _LIBCPP___SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__posix_l_fallback.h b/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__posix_l_fallback.h
index 294149eb8f..8196c2362c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__posix_l_fallback.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__posix_l_fallback.h
@@ -12,8 +12,16 @@
// Android's bionic and Newlib).
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H
-#define _LIBCPP_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H
+#ifndef _LIBCPP___SUPPORT_XLOCALE_POSIX_L_FALLBACK_H
+#define _LIBCPP___SUPPORT_XLOCALE_POSIX_L_FALLBACK_H
+
+#include <__config>
+#include <ctype.h>
+#include <time.h>
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# include <wctype.h>
+#endif
#ifdef __cplusplus
extern "C" {
@@ -67,6 +75,15 @@ inline _LIBCPP_HIDE_FROM_ABI int isxdigit_l(int __c, locale_t) {
return ::isxdigit(__c);
}
+inline _LIBCPP_HIDE_FROM_ABI int toupper_l(int __c, locale_t) {
+ return ::toupper(__c);
+}
+
+inline _LIBCPP_HIDE_FROM_ABI int tolower_l(int __c, locale_t) {
+ return ::tolower(__c);
+}
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI int iswalnum_l(wint_t __c, locale_t) {
return ::iswalnum(__c);
}
@@ -115,14 +132,6 @@ inline _LIBCPP_HIDE_FROM_ABI int iswxdigit_l(wint_t __c, locale_t) {
return ::iswxdigit(__c);
}
-inline _LIBCPP_HIDE_FROM_ABI int toupper_l(int __c, locale_t) {
- return ::toupper(__c);
-}
-
-inline _LIBCPP_HIDE_FROM_ABI int tolower_l(int __c, locale_t) {
- return ::tolower(__c);
-}
-
inline _LIBCPP_HIDE_FROM_ABI wint_t towupper_l(wint_t __c, locale_t) {
return ::towupper(__c);
}
@@ -130,6 +139,7 @@ inline _LIBCPP_HIDE_FROM_ABI wint_t towupper_l(wint_t __c, locale_t) {
inline _LIBCPP_HIDE_FROM_ABI wint_t towlower_l(wint_t __c, locale_t) {
return ::towlower(__c);
}
+#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI int
strcoll_l(const char *__s1, const char *__s2, locale_t) {
@@ -147,6 +157,7 @@ strftime_l(char *__s, size_t __max, const char *__format, const struct tm *__tm,
return ::strftime(__s, __max, __format, __tm);
}
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI int
wcscoll_l(const wchar_t *__ws1, const wchar_t *__ws2, locale_t) {
return ::wcscoll(__ws1, __ws2);
@@ -156,9 +167,10 @@ inline _LIBCPP_HIDE_FROM_ABI size_t
wcsxfrm_l(wchar_t *__dest, const wchar_t *__src, size_t __n, locale_t) {
return ::wcsxfrm(__dest, __src, __n);
}
+#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
#ifdef __cplusplus
}
#endif
-#endif // _LIBCPP_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H
+#endif // _LIBCPP___SUPPORT_XLOCALE_POSIX_L_FALLBACK_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__strtonum_fallback.h b/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__strtonum_fallback.h
index 19780909b2..d1ef8aaa83 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__strtonum_fallback.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__strtonum_fallback.h
@@ -12,8 +12,15 @@
// convert strings to some numeric type.
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
-#define _LIBCPP_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
+#ifndef _LIBCPP___SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
+#define _LIBCPP___SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
+
+#include <__config>
+#include <stdlib.h>
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# include <wchar.h>
+#endif
#ifdef __cplusplus
extern "C" {
@@ -44,6 +51,7 @@ strtoull_l(const char *__nptr, char **__endptr, int __base, locale_t) {
return ::strtoull(__nptr, __endptr, __base);
}
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI long long
wcstoll_l(const wchar_t *__nptr, wchar_t **__endptr, int __base, locale_t) {
return ::wcstoll(__nptr, __endptr, __base);
@@ -58,9 +66,10 @@ inline _LIBCPP_HIDE_FROM_ABI long double
wcstold_l(const wchar_t *__nptr, wchar_t **__endptr, locale_t) {
return ::wcstold(__nptr, __endptr);
}
+#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
#ifdef __cplusplus
}
#endif
-#endif // _LIBCPP_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
+#endif // _LIBCPP___SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__thread/poll_with_backoff.h b/contrib/libs/cxxsupp/libcxx/include/__thread/poll_with_backoff.h
index 0bbafd1866..d027a2779d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__thread/poll_with_backoff.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__thread/poll_with_backoff.h
@@ -6,16 +6,14 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___THREAD_POLL_WITH_BACKOFF_H
#define _LIBCPP___THREAD_POLL_WITH_BACKOFF_H
#include <__availability>
#include <__chrono/duration.h>
#include <__chrono/high_resolution_clock.h>
-#include <__chrono/steady_clock.h>
-#include <__chrono/time_point.h>
#include <__config>
-#include <__filesystem/file_time_type.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/__thread/timed_backoff_policy.h b/contrib/libs/cxxsupp/libcxx/include/__thread/timed_backoff_policy.h
index 28fe75d6fd..a54b296ae5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__thread/timed_backoff_policy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__thread/timed_backoff_policy.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP___THREAD_TIMED_BACKOFF_POLICY_H
#define _LIBCPP___THREAD_TIMED_BACKOFF_POLICY_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__threading_support b/contrib/libs/cxxsupp/libcxx/include/__threading_support
index f4dbd39822..07d684146d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__threading_support
+++ b/contrib/libs/cxxsupp/libcxx/include/__threading_support
@@ -13,7 +13,9 @@
#include <__availability>
#include <__chrono/convert_to_timespec.h>
#include <__chrono/duration.h>
+#include <__compare/ordering.h>
#include <__config>
+#include <__fwd/hash.h>
#include <__thread/poll_with_backoff.h>
#include <errno.h>
#include <iosfwd>
@@ -609,40 +611,28 @@ class _LIBCPP_TEMPLATE_VIS __thread_id
// on other platforms. We assume 0 works everywhere for now.
__libcpp_thread_id __id_;
-public:
- _LIBCPP_INLINE_VISIBILITY
- __thread_id() _NOEXCEPT : __id_(0) {}
-
- friend _LIBCPP_INLINE_VISIBILITY
- bool operator==(__thread_id __x, __thread_id __y) _NOEXCEPT
- { // don't pass id==0 to underlying routines
- if (__x.__id_ == 0) return __y.__id_ == 0;
- if (__y.__id_ == 0) return false;
- return __libcpp_thread_id_equal(__x.__id_, __y.__id_);
- }
- friend _LIBCPP_INLINE_VISIBILITY
- bool operator!=(__thread_id __x, __thread_id __y) _NOEXCEPT
- {return !(__x == __y);}
- friend _LIBCPP_INLINE_VISIBILITY
- bool operator< (__thread_id __x, __thread_id __y) _NOEXCEPT
+ static _LIBCPP_HIDE_FROM_ABI
+ bool __lt_impl(__thread_id __x, __thread_id __y) _NOEXCEPT
{ // id==0 is always less than any other thread_id
if (__x.__id_ == 0) return __y.__id_ != 0;
if (__y.__id_ == 0) return false;
return __libcpp_thread_id_less(__x.__id_, __y.__id_);
}
- friend _LIBCPP_INLINE_VISIBILITY
- bool operator<=(__thread_id __x, __thread_id __y) _NOEXCEPT
- {return !(__y < __x);}
- friend _LIBCPP_INLINE_VISIBILITY
- bool operator> (__thread_id __x, __thread_id __y) _NOEXCEPT
- {return __y < __x ;}
- friend _LIBCPP_INLINE_VISIBILITY
- bool operator>=(__thread_id __x, __thread_id __y) _NOEXCEPT
- {return !(__x < __y);}
+
+public:
+ _LIBCPP_INLINE_VISIBILITY
+ __thread_id() _NOEXCEPT : __id_(0) {}
_LIBCPP_INLINE_VISIBILITY
void __reset() { __id_ = 0; }
+ friend _LIBCPP_HIDE_FROM_ABI bool operator==(__thread_id __x, __thread_id __y) _NOEXCEPT;
+#if _LIBCPP_STD_VER <= 17
+ friend _LIBCPP_HIDE_FROM_ABI bool operator<(__thread_id __x, __thread_id __y) _NOEXCEPT;
+#else // _LIBCPP_STD_VER <= 17
+ friend _LIBCPP_HIDE_FROM_ABI strong_ordering operator<=>(__thread_id __x, __thread_id __y) noexcept;
+#endif // _LIBCPP_STD_VER <= 17
+
template<class _CharT, class _Traits>
friend
_LIBCPP_INLINE_VISIBILITY
@@ -658,6 +648,45 @@ private:
friend struct _LIBCPP_TEMPLATE_VIS hash<__thread_id>;
};
+inline _LIBCPP_HIDE_FROM_ABI
+bool operator==(__thread_id __x, __thread_id __y) _NOEXCEPT {
+ // Don't pass id==0 to underlying routines
+ if (__x.__id_ == 0)
+ return __y.__id_ == 0;
+ if (__y.__id_ == 0)
+ return false;
+ return __libcpp_thread_id_equal(__x.__id_, __y.__id_);
+}
+
+#if _LIBCPP_STD_VER <= 17
+
+inline _LIBCPP_HIDE_FROM_ABI
+bool operator!=(__thread_id __x, __thread_id __y) _NOEXCEPT {
+ return !(__x == __y);
+}
+
+inline _LIBCPP_HIDE_FROM_ABI
+bool operator<(__thread_id __x, __thread_id __y) _NOEXCEPT {
+ return __thread_id::__lt_impl(__x.__id_, __y.__id_);
+}
+
+inline _LIBCPP_HIDE_FROM_ABI bool operator<=(__thread_id __x, __thread_id __y) _NOEXCEPT { return !(__y < __x); }
+inline _LIBCPP_HIDE_FROM_ABI bool operator>(__thread_id __x, __thread_id __y) _NOEXCEPT { return __y < __x; }
+inline _LIBCPP_HIDE_FROM_ABI bool operator>=(__thread_id __x, __thread_id __y) _NOEXCEPT { return !(__x < __y); }
+
+#else // _LIBCPP_STD_VER <= 17
+
+inline _LIBCPP_HIDE_FROM_ABI
+strong_ordering operator<=>(__thread_id __x, __thread_id __y) noexcept {
+ if (__x == __y)
+ return strong_ordering::equal;
+ if (__thread_id::__lt_impl(__x, __y))
+ return strong_ordering::less;
+ return strong_ordering::greater;
+}
+
+#endif // _LIBCPP_STD_VER <= 17
+
namespace this_thread
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__tree b/contrib/libs/cxxsupp/libcxx/include/__tree
index 59525a0304..05a3da1580 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__tree
+++ b/contrib/libs/cxxsupp/libcxx/include/__tree
@@ -17,11 +17,17 @@
#include <__iterator/distance.h>
#include <__iterator/iterator_traits.h>
#include <__iterator/next.h>
+#include <__memory/allocator_traits.h>
+#include <__memory/compressed_pair.h>
+#include <__memory/pointer_traits.h>
#include <__memory/swap_allocator.h>
+#include <__memory/unique_ptr.h>
+#include <__type_traits/can_extract_key.h>
#include <__utility/forward.h>
+#include <__utility/move.h>
+#include <__utility/pair.h>
#include <__utility/swap.h>
#include <limits>
-#include <memory>
#include <stdexcept>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -126,7 +132,7 @@ __tree_sub_invariant(_NodePtr __x)
// __root == nullptr is a proper tree. Returns true is __root is a proper
// red black tree, else returns false.
template <class _NodePtr>
-bool
+_LIBCPP_HIDE_FROM_ABI bool
__tree_invariant(_NodePtr __root)
{
if (__root == nullptr)
@@ -169,7 +175,7 @@ __tree_max(_NodePtr __x) _NOEXCEPT
// Returns: pointer to the next in-order node after __x.
template <class _NodePtr>
-_NodePtr
+_LIBCPP_HIDE_FROM_ABI _NodePtr
__tree_next(_NodePtr __x) _NOEXCEPT
{
_LIBCPP_ASSERT(__x != nullptr, "node shouldn't be null");
@@ -211,7 +217,7 @@ __tree_prev_iter(_EndNodePtr __x) _NOEXCEPT
// Returns: pointer to a node which has no children
template <class _NodePtr>
-_NodePtr
+_LIBCPP_HIDE_FROM_ABI _NodePtr
__tree_leaf(_NodePtr __x) _NOEXCEPT
{
_LIBCPP_ASSERT(__x != nullptr, "node shouldn't be null");
@@ -235,7 +241,7 @@ __tree_leaf(_NodePtr __x) _NOEXCEPT
// Effects: Makes __x->__right_ the subtree root with __x as its left child
// while preserving in-order order.
template <class _NodePtr>
-void
+_LIBCPP_HIDE_FROM_ABI void
__tree_left_rotate(_NodePtr __x) _NOEXCEPT
{
_LIBCPP_ASSERT(__x != nullptr, "node shouldn't be null");
@@ -256,7 +262,7 @@ __tree_left_rotate(_NodePtr __x) _NOEXCEPT
// Effects: Makes __x->__left_ the subtree root with __x as its right child
// while preserving in-order order.
template <class _NodePtr>
-void
+_LIBCPP_HIDE_FROM_ABI void
__tree_right_rotate(_NodePtr __x) _NOEXCEPT
{
_LIBCPP_ASSERT(__x != nullptr, "node shouldn't be null");
@@ -282,7 +288,7 @@ __tree_right_rotate(_NodePtr __x) _NOEXCEPT
// Postcondition: __tree_invariant(end_node->__left_) == true. end_node->__left_
// may be different than the value passed in as __root.
template <class _NodePtr>
-void
+_LIBCPP_HIDE_FROM_ABI void
__tree_balance_after_insert(_NodePtr __root, _NodePtr __x) _NOEXCEPT
{
_LIBCPP_ASSERT(__root != nullptr, "Root of the tree shouldn't be null");
@@ -352,7 +358,7 @@ __tree_balance_after_insert(_NodePtr __root, _NodePtr __x) _NOEXCEPT
// nor any of its children refer to __z. end_node->__left_
// may be different than the value passed in as __root.
template <class _NodePtr>
-void
+_LIBCPP_HIDE_FROM_ABI void
__tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
{
_LIBCPP_ASSERT(__root != nullptr, "Root node should not be null");
@@ -554,7 +560,7 @@ template <class ..._Args>
struct __is_tree_value_type : false_type {};
template <class _One>
-struct __is_tree_value_type<_One> : __is_tree_value_type_imp<__uncvref_t<_One> > {};
+struct __is_tree_value_type<_One> : __is_tree_value_type_imp<__remove_cvref_t<_One> > {};
template <class _Tp>
struct __tree_key_value_types {
@@ -632,19 +638,17 @@ struct __tree_node_base_types {
typedef _VoidPtr __void_pointer;
typedef __tree_node_base<__void_pointer> __node_base_type;
- typedef typename __rebind_pointer<_VoidPtr, __node_base_type>::type
+ typedef __rebind_pointer_t<_VoidPtr, __node_base_type>
__node_base_pointer;
typedef __tree_end_node<__node_base_pointer> __end_node_type;
- typedef typename __rebind_pointer<_VoidPtr, __end_node_type>::type
+ typedef __rebind_pointer_t<_VoidPtr, __end_node_type>
__end_node_pointer;
#if defined(_LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB)
typedef __end_node_pointer __parent_pointer;
#else
- typedef typename conditional<
- is_pointer<__end_node_pointer>::value,
- __end_node_pointer,
- __node_base_pointer>::type __parent_pointer;
+ typedef __conditional_t< is_pointer<__end_node_pointer>::value, __end_node_pointer, __node_base_pointer>
+ __parent_pointer;
#endif
private:
@@ -659,9 +663,9 @@ struct __tree_map_pointer_types {};
template <class _Tp, class _AllocPtr, class _KVTypes>
struct __tree_map_pointer_types<_Tp, _AllocPtr, _KVTypes, true> {
typedef typename _KVTypes::__map_value_type _Mv;
- typedef typename __rebind_pointer<_AllocPtr, _Mv>::type
+ typedef __rebind_pointer_t<_AllocPtr, _Mv>
__map_value_type_pointer;
- typedef typename __rebind_pointer<_AllocPtr, const _Mv>::type
+ typedef __rebind_pointer_t<_AllocPtr, const _Mv>
__const_map_value_type_pointer;
};
@@ -683,28 +687,26 @@ public:
typedef _NodePtr __node_pointer;
typedef _Tp __node_value_type;
- typedef typename __rebind_pointer<_VoidPtr, __node_value_type>::type
+ typedef __rebind_pointer_t<_VoidPtr, __node_value_type>
__node_value_type_pointer;
- typedef typename __rebind_pointer<_VoidPtr, const __node_value_type>::type
+ typedef __rebind_pointer_t<_VoidPtr, const __node_value_type>
__const_node_value_type_pointer;
#if defined(_LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB)
typedef typename __base::__end_node_pointer __iter_pointer;
#else
- typedef typename conditional<
- is_pointer<__node_pointer>::value,
- typename __base::__end_node_pointer,
- __node_pointer>::type __iter_pointer;
+ typedef __conditional_t< is_pointer<__node_pointer>::value, typename __base::__end_node_pointer, __node_pointer>
+ __iter_pointer;
#endif
private:
static_assert(!is_const<__node_type>::value,
"_NodePtr should never be a pointer to const");
- static_assert((is_same<typename __rebind_pointer<_VoidPtr, __node_type>::type,
+ static_assert((is_same<__rebind_pointer_t<_VoidPtr, __node_type>,
_NodePtr>::value), "_VoidPtr does not rebind to _NodePtr.");
};
template <class _ValueTp, class _VoidPtr>
struct __make_tree_node_types {
- typedef typename __rebind_pointer<_VoidPtr, __tree_node<_ValueTp, _VoidPtr> >::type
+ typedef __rebind_pointer_t<_VoidPtr, __tree_node<_ValueTp, _VoidPtr> >
_NodePtr;
typedef __tree_node_types<_NodePtr> type;
};
@@ -1019,7 +1021,7 @@ public:
typedef typename _NodeTypes::__parent_pointer __parent_pointer;
typedef typename _NodeTypes::__iter_pointer __iter_pointer;
- typedef typename __rebind_alloc_helper<__alloc_traits, __node>::type __node_allocator;
+ typedef __rebind_alloc<__alloc_traits, __node> __node_allocator;
typedef allocator_traits<__node_allocator> __node_traits;
private:
@@ -1028,8 +1030,7 @@ private:
// the pointer using 'pointer_traits'.
static_assert((is_same<__node_pointer, typename __node_traits::pointer>::value),
"Allocator does not rebind pointers in a sane manner.");
- typedef typename __rebind_alloc_helper<__node_traits, __node_base>::type
- __node_base_allocator;
+ typedef __rebind_alloc<__node_traits, __node_base> __node_base_allocator;
typedef allocator_traits<__node_base_allocator> __node_base_traits;
static_assert((is_same<__node_base_pointer, typename __node_base_traits::pointer>::value),
"Allocator does not rebind pointers in a sane manner.");
@@ -1271,14 +1272,14 @@ public:
}
template <class _Vp,
- class = __enable_if_t<!is_same<typename __unconstref<_Vp>::type, __container_value_type>::value> >
+ class = __enable_if_t<!is_same<__remove_const_ref_t<_Vp>, __container_value_type>::value> >
_LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> __insert_unique(_Vp&& __v) {
return __emplace_unique(_VSTD::forward<_Vp>(__v));
}
template <class _Vp,
- class = __enable_if_t<!is_same<typename __unconstref<_Vp>::type, __container_value_type>::value> >
+ class = __enable_if_t<!is_same<__remove_const_ref_t<_Vp>, __container_value_type>::value> >
_LIBCPP_INLINE_VISIBILITY
iterator __insert_unique(const_iterator __p, _Vp&& __v) {
return __emplace_hint_unique(__p, _VSTD::forward<_Vp>(__v));
diff --git a/contrib/libs/cxxsupp/libcxx/include/__tuple b/contrib/libs/cxxsupp/libcxx/include/__tuple
deleted file mode 100644
index 9c7b9464fe..0000000000
--- a/contrib/libs/cxxsupp/libcxx/include/__tuple
+++ /dev/null
@@ -1,570 +0,0 @@
-// -*- C++ -*-
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef _LIBCPP___TUPLE
-#define _LIBCPP___TUPLE
-
-#include <__config>
-#include <cstddef>
-#include <type_traits>
-
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-# pragma GCC system_header
-#endif
-
-
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size;
-
-#if !defined(_LIBCPP_CXX03_LANG)
-template <class _Tp, class...>
-using __enable_if_tuple_size_imp = _Tp;
-
-template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
- const _Tp,
- __enable_if_t<!is_volatile<_Tp>::value>,
- integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
- : public integral_constant<size_t, tuple_size<_Tp>::value> {};
-
-template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
- volatile _Tp,
- __enable_if_t<!is_const<_Tp>::value>,
- integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
- : public integral_constant<size_t, tuple_size<_Tp>::value> {};
-
-template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
- const volatile _Tp,
- integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
- : public integral_constant<size_t, tuple_size<_Tp>::value> {};
-
-#else
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<const _Tp> : public tuple_size<_Tp> {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<volatile _Tp> : public tuple_size<_Tp> {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<const volatile _Tp> : public tuple_size<_Tp> {};
-#endif
-
-template <size_t _Ip, class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_element;
-
-template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const _Tp>
-{
- typedef _LIBCPP_NODEBUG typename add_const<typename tuple_element<_Ip, _Tp>::type>::type type;
-};
-
-template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, volatile _Tp>
-{
- typedef _LIBCPP_NODEBUG typename add_volatile<typename tuple_element<_Ip, _Tp>::type>::type type;
-};
-
-template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp>
-{
- typedef _LIBCPP_NODEBUG typename add_cv<typename tuple_element<_Ip, _Tp>::type>::type type;
-};
-
-template <class _Tp> struct __tuple_like : false_type {};
-
-template <class _Tp> struct __tuple_like<const _Tp> : public __tuple_like<_Tp> {};
-template <class _Tp> struct __tuple_like<volatile _Tp> : public __tuple_like<_Tp> {};
-template <class _Tp> struct __tuple_like<const volatile _Tp> : public __tuple_like<_Tp> {};
-
-// tuple specializations
-
-#ifndef _LIBCPP_CXX03_LANG
-
-template <size_t...> struct __tuple_indices {};
-
-template <class _IdxType, _IdxType... _Values>
-struct __integer_sequence {
- template <template <class _OIdxType, _OIdxType...> class _ToIndexSeq, class _ToIndexType>
- using __convert = _ToIndexSeq<_ToIndexType, _Values...>;
-
- template <size_t _Sp>
- using __to_tuple_indices = __tuple_indices<(_Values + _Sp)...>;
-};
-
-// Disable Clang builtins which nvcc does not understand
-#if defined(__CUDACC__) || !__has_builtin(__make_integer_seq) || defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
-namespace __detail {
-
-template<typename _Tp, size_t ..._Extra> struct __repeat;
-template<typename _Tp, _Tp ..._Np, size_t ..._Extra> struct __repeat<__integer_sequence<_Tp, _Np...>, _Extra...> {
- typedef _LIBCPP_NODEBUG __integer_sequence<_Tp,
- _Np...,
- sizeof...(_Np) + _Np...,
- 2 * sizeof...(_Np) + _Np...,
- 3 * sizeof...(_Np) + _Np...,
- 4 * sizeof...(_Np) + _Np...,
- 5 * sizeof...(_Np) + _Np...,
- 6 * sizeof...(_Np) + _Np...,
- 7 * sizeof...(_Np) + _Np...,
- _Extra...> type;
-};
-
-template<size_t _Np> struct __parity;
-template<size_t _Np> struct __make : __parity<_Np % 8>::template __pmake<_Np> {};
-
-template<> struct __make<0> { typedef __integer_sequence<size_t> type; };
-template<> struct __make<1> { typedef __integer_sequence<size_t, 0> type; };
-template<> struct __make<2> { typedef __integer_sequence<size_t, 0, 1> type; };
-template<> struct __make<3> { typedef __integer_sequence<size_t, 0, 1, 2> type; };
-template<> struct __make<4> { typedef __integer_sequence<size_t, 0, 1, 2, 3> type; };
-template<> struct __make<5> { typedef __integer_sequence<size_t, 0, 1, 2, 3, 4> type; };
-template<> struct __make<6> { typedef __integer_sequence<size_t, 0, 1, 2, 3, 4, 5> type; };
-template<> struct __make<7> { typedef __integer_sequence<size_t, 0, 1, 2, 3, 4, 5, 6> type; };
-
-template<> struct __parity<0> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type> {}; };
-template<> struct __parity<1> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 1> {}; };
-template<> struct __parity<2> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 2, _Np - 1> {}; };
-template<> struct __parity<3> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 3, _Np - 2, _Np - 1> {}; };
-template<> struct __parity<4> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
-template<> struct __parity<5> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 5, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
-template<> struct __parity<6> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 6, _Np - 5, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
-template<> struct __parity<7> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 7, _Np - 6, _Np - 5, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
-
-} // namespace detail
-
-#endif // !__has_builtin(__make_integer_seq) || defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
-
-// Disable Clang builtins which nvcc does not understand
-#if __has_builtin(__make_integer_seq) && !defined(__CUDACC__)
-template <size_t _Ep, size_t _Sp>
-using __make_indices_imp =
- typename __make_integer_seq<__integer_sequence, size_t, _Ep - _Sp>::template
- __to_tuple_indices<_Sp>;
-#else
-template <size_t _Ep, size_t _Sp>
-using __make_indices_imp =
- typename __detail::__make<_Ep - _Sp>::type::template __to_tuple_indices<_Sp>;
-
-#endif
-
-template <size_t _Ep, size_t _Sp = 0>
-struct __make_tuple_indices
-{
- static_assert(_Sp <= _Ep, "__make_tuple_indices input error");
- typedef __make_indices_imp<_Ep, _Sp> type;
-};
-
-
-template <class ..._Tp> class _LIBCPP_TEMPLATE_VIS tuple;
-
-template <class... _Tp> struct __tuple_like<tuple<_Tp...> > : true_type {};
-
-template <class ..._Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<tuple<_Tp...> >
- : public integral_constant<size_t, sizeof...(_Tp)>
-{
-};
-
-template <size_t _Ip, class ..._Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-typename tuple_element<_Ip, tuple<_Tp...> >::type&
-get(tuple<_Tp...>&) _NOEXCEPT;
-
-template <size_t _Ip, class ..._Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-const typename tuple_element<_Ip, tuple<_Tp...> >::type&
-get(const tuple<_Tp...>&) _NOEXCEPT;
-
-template <size_t _Ip, class ..._Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-typename tuple_element<_Ip, tuple<_Tp...> >::type&&
-get(tuple<_Tp...>&&) _NOEXCEPT;
-
-template <size_t _Ip, class ..._Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
-get(const tuple<_Tp...>&&) _NOEXCEPT;
-
-#endif // !defined(_LIBCPP_CXX03_LANG)
-
-// pair specializations
-
-template <class _T1, class _T2> struct __tuple_like<pair<_T1, _T2> > : true_type {};
-
-template <size_t _Ip, class _T1, class _T2>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-typename tuple_element<_Ip, pair<_T1, _T2> >::type&
-get(pair<_T1, _T2>&) _NOEXCEPT;
-
-template <size_t _Ip, class _T1, class _T2>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
-get(const pair<_T1, _T2>&) _NOEXCEPT;
-
-#ifndef _LIBCPP_CXX03_LANG
-template <size_t _Ip, class _T1, class _T2>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
-get(pair<_T1, _T2>&&) _NOEXCEPT;
-
-template <size_t _Ip, class _T1, class _T2>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-const typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
-get(const pair<_T1, _T2>&&) _NOEXCEPT;
-#endif
-
-// array specializations
-
-template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
-
-template <class _Tp, size_t _Size> struct __tuple_like<array<_Tp, _Size> > : true_type {};
-
-template <size_t _Ip, class _Tp, size_t _Size>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-_Tp&
-get(array<_Tp, _Size>&) _NOEXCEPT;
-
-template <size_t _Ip, class _Tp, size_t _Size>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-const _Tp&
-get(const array<_Tp, _Size>&) _NOEXCEPT;
-
-#ifndef _LIBCPP_CXX03_LANG
-template <size_t _Ip, class _Tp, size_t _Size>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-_Tp&&
-get(array<_Tp, _Size>&&) _NOEXCEPT;
-
-template <size_t _Ip, class _Tp, size_t _Size>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-const _Tp&&
-get(const array<_Tp, _Size>&&) _NOEXCEPT;
-#endif
-
-#ifndef _LIBCPP_CXX03_LANG
-
-// __tuple_types
-
-template <class ..._Tp> struct __tuple_types {};
-
-#if !__has_builtin(__type_pack_element)
-
-namespace __indexer_detail {
-
-template <size_t _Idx, class _Tp>
-struct __indexed { using type _LIBCPP_NODEBUG = _Tp; };
-
-template <class _Types, class _Indexes> struct __indexer;
-
-template <class ..._Types, size_t ..._Idx>
-struct __indexer<__tuple_types<_Types...>, __tuple_indices<_Idx...>>
- : __indexed<_Idx, _Types>...
-{};
-
-template <size_t _Idx, class _Tp>
-__indexed<_Idx, _Tp> __at_index(__indexed<_Idx, _Tp> const&);
-
-} // namespace __indexer_detail
-
-#if !defined(__CUDACC__) || !defined(_MSC_VER)
-template <size_t _Idx, class ..._Types>
-using __type_pack_element _LIBCPP_NODEBUG = typename decltype(
- __indexer_detail::__at_index<_Idx>(
- __indexer_detail::__indexer<
- __tuple_types<_Types...>,
- typename __make_tuple_indices<sizeof...(_Types)>::type
- >{})
- )::type;
-
-#else // !defined(__CUDACC__) || !defined(_MSC_VER)
-template <size_t _Idx, class ..._Types>
-struct __y_type_pack_element {
- using __t1 = typename __make_tuple_indices<sizeof...(_Types)>::type;
- using __t2 = __indexer_detail::__indexer<__tuple_types<_Types...>, __t1>;
- using __t3 = decltype(__indexer_detail::__at_index<_Idx>(__t2{}));
- using __t4 = typename __t3::type;
-};
-
-template <size_t _Idx, class ..._Types>
-using __type_pack_element = typename __y_type_pack_element<_Idx, _Types...>::__t4;
-
-#endif // !defined(__CUDACC__) || !defined(_MSC_VER)
-
-#endif // __has_builtin(__type_pack_element)
-
-template <size_t _Ip, class ..._Types>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...> >
-{
- static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range");
- typedef _LIBCPP_NODEBUG __type_pack_element<_Ip, _Types...> type;
-};
-
-
-template <class ..._Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<__tuple_types<_Tp...> >
- : public integral_constant<size_t, sizeof...(_Tp)>
-{
-};
-
-template <class... _Tp> struct __tuple_like<__tuple_types<_Tp...> > : true_type {};
-
-template <bool _ApplyLV, bool _ApplyConst, bool _ApplyVolatile>
-struct __apply_cv_mf;
-template <>
-struct __apply_cv_mf<false, false, false> {
- template <class _Tp> using __apply = _Tp;
-};
-template <>
-struct __apply_cv_mf<false, true, false> {
- template <class _Tp> using __apply _LIBCPP_NODEBUG = const _Tp;
-};
-template <>
-struct __apply_cv_mf<false, false, true> {
- template <class _Tp> using __apply _LIBCPP_NODEBUG = volatile _Tp;
-};
-template <>
-struct __apply_cv_mf<false, true, true> {
- template <class _Tp> using __apply _LIBCPP_NODEBUG = const volatile _Tp;
-};
-template <>
-struct __apply_cv_mf<true, false, false> {
- template <class _Tp> using __apply _LIBCPP_NODEBUG = _Tp&;
-};
-template <>
-struct __apply_cv_mf<true, true, false> {
- template <class _Tp> using __apply _LIBCPP_NODEBUG = const _Tp&;
-};
-template <>
-struct __apply_cv_mf<true, false, true> {
- template <class _Tp> using __apply _LIBCPP_NODEBUG = volatile _Tp&;
-};
-template <>
-struct __apply_cv_mf<true, true, true> {
- template <class _Tp> using __apply _LIBCPP_NODEBUG = const volatile _Tp&;
-};
-template <class _Tp, class _RawTp = typename remove_reference<_Tp>::type>
-using __apply_cv_t _LIBCPP_NODEBUG = __apply_cv_mf<
- is_lvalue_reference<_Tp>::value,
- is_const<_RawTp>::value,
- is_volatile<_RawTp>::value>;
-
-// __make_tuple_types
-
-// __make_tuple_types<_Tuple<_Types...>, _Ep, _Sp>::type is a
-// __tuple_types<_Types...> using only those _Types in the range [_Sp, _Ep).
-// _Sp defaults to 0 and _Ep defaults to tuple_size<_Tuple>. If _Tuple is a
-// lvalue_reference type, then __tuple_types<_Types&...> is the result.
-
-template <class _TupleTypes, class _TupleIndices>
-struct __make_tuple_types_flat;
-
-template <template <class...> class _Tuple, class ..._Types, size_t ..._Idx>
-struct __make_tuple_types_flat<_Tuple<_Types...>, __tuple_indices<_Idx...>> {
- // Specialization for pair, tuple, and __tuple_types
- template <class _Tp, class _ApplyFn = __apply_cv_t<_Tp>>
- using __apply_quals _LIBCPP_NODEBUG = __tuple_types<
- typename _ApplyFn::template __apply<__type_pack_element<_Idx, _Types...>>...
- >;
-};
-
-template <class _Vt, size_t _Np, size_t ..._Idx>
-struct __make_tuple_types_flat<array<_Vt, _Np>, __tuple_indices<_Idx...>> {
- template <size_t>
- using __value_type = _Vt;
- template <class _Tp, class _ApplyFn = __apply_cv_t<_Tp>>
- using __apply_quals = __tuple_types<
- typename _ApplyFn::template __apply<__value_type<_Idx>>...
- >;
-};
-
-template <class _Tp, size_t _Ep = tuple_size<typename remove_reference<_Tp>::type>::value,
- size_t _Sp = 0,
- bool _SameSize = (_Ep == tuple_size<typename remove_reference<_Tp>::type>::value)>
-struct __make_tuple_types
-{
- static_assert(_Sp <= _Ep, "__make_tuple_types input error");
- using _RawTp = typename remove_cv<typename remove_reference<_Tp>::type>::type;
- using _Maker = __make_tuple_types_flat<_RawTp, typename __make_tuple_indices<_Ep, _Sp>::type>;
- using type = typename _Maker::template __apply_quals<_Tp>;
-};
-
-template <class ..._Types, size_t _Ep>
-struct __make_tuple_types<tuple<_Types...>, _Ep, 0, true> {
- typedef _LIBCPP_NODEBUG __tuple_types<_Types...> type;
-};
-
-template <class ..._Types, size_t _Ep>
-struct __make_tuple_types<__tuple_types<_Types...>, _Ep, 0, true> {
- typedef _LIBCPP_NODEBUG __tuple_types<_Types...> type;
-};
-
-template <bool ..._Preds>
-struct __all_dummy;
-
-template <bool ..._Pred>
-struct __all : _IsSame<__all_dummy<_Pred...>, __all_dummy<((void)_Pred, true)...>> {};
-
-struct __tuple_sfinae_base {
- template <template <class, class...> class _Trait,
- class ..._LArgs, class ..._RArgs>
- static auto __do_test(__tuple_types<_LArgs...>, __tuple_types<_RArgs...>)
- -> __all<__enable_if_t<_Trait<_LArgs, _RArgs>::value, bool>{true}...>;
- template <template <class...> class>
- static auto __do_test(...) -> false_type;
-
- template <class _FromArgs, class _ToArgs>
- using __constructible = decltype(__do_test<is_constructible>(declval<_ToArgs>(), declval<_FromArgs>()));
- template <class _FromArgs, class _ToArgs>
- using __convertible = decltype(__do_test<is_convertible>(declval<_FromArgs>(), declval<_ToArgs>()));
- template <class _FromArgs, class _ToArgs>
- using __assignable = decltype(__do_test<is_assignable>(declval<_ToArgs>(), declval<_FromArgs>()));
-};
-
-// __tuple_convertible
-
-template <class _Tp, class _Up, bool = __tuple_like<typename remove_reference<_Tp>::type>::value,
- bool = __tuple_like<_Up>::value,
- class = void>
-struct __tuple_convertible
- : public false_type {};
-
-template <class _Tp, class _Up>
-struct __tuple_convertible<_Tp, _Up, true, true,
- typename enable_if<(tuple_size<typename remove_reference<_Tp>::type>::value == tuple_size<_Up>::value)>::type>
- : public __tuple_sfinae_base::__convertible<
- typename __make_tuple_types<_Tp>::type
- , typename __make_tuple_types<_Up>::type
- >
-{};
-
-// __tuple_constructible
-
-template <class _Tp, class _Up, bool = __tuple_like<typename remove_reference<_Tp>::type>::value,
- bool = __tuple_like<_Up>::value>
-struct __tuple_constructible
- : public false_type {};
-
-template <class _Tp, class _Up>
-struct __tuple_constructible<_Tp, _Up, true, true>
- : public __tuple_sfinae_base::__constructible<
- typename __make_tuple_types<_Tp>::type
- , typename __make_tuple_types<_Up>::type
- >
-{};
-
-// __tuple_assignable
-
-template <class _Tp, class _Up, bool = __tuple_like<typename remove_reference<_Tp>::type>::value,
- bool = __tuple_like<_Up>::value>
-struct __tuple_assignable
- : public false_type {};
-
-template <class _Tp, class _Up>
-struct __tuple_assignable<_Tp, _Up, true, true>
- : public __tuple_sfinae_base::__assignable<
- typename __make_tuple_types<_Tp>::type
- , typename __make_tuple_types<_Up&>::type
- >
-{};
-
-
-template <size_t _Ip, class ..._Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, tuple<_Tp...> >
-{
- typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, __tuple_types<_Tp...> >::type type;
-};
-
-#if _LIBCPP_STD_VER > 11
-template <size_t _Ip, class ..._Tp>
-using tuple_element_t _LIBCPP_NODEBUG = typename tuple_element <_Ip, _Tp...>::type;
-#endif
-
-template <bool _IsTuple, class _SizeTrait, size_t _Expected>
-struct __tuple_like_with_size_imp : false_type {};
-
-template <class _SizeTrait, size_t _Expected>
-struct __tuple_like_with_size_imp<true, _SizeTrait, _Expected>
- : integral_constant<bool, _SizeTrait::value == _Expected> {};
-
-template <class _Tuple, size_t _ExpectedSize, class _RawTuple = __uncvref_t<_Tuple> >
-using __tuple_like_with_size _LIBCPP_NODEBUG = __tuple_like_with_size_imp<
- __tuple_like<_RawTuple>::value,
- tuple_size<_RawTuple>, _ExpectedSize
- >;
-
-struct _LIBCPP_TYPE_VIS __check_tuple_constructor_fail {
-
- static constexpr bool __enable_explicit_default() { return false; }
- static constexpr bool __enable_implicit_default() { return false; }
- template <class ...>
- static constexpr bool __enable_explicit() { return false; }
- template <class ...>
- static constexpr bool __enable_implicit() { return false; }
- template <class ...>
- static constexpr bool __enable_assign() { return false; }
-};
-#endif // !defined(_LIBCPP_CXX03_LANG)
-
-#if _LIBCPP_STD_VER > 14
-
-template <bool _CanCopy, bool _CanMove>
-struct __sfinae_ctor_base {};
-template <>
-struct __sfinae_ctor_base<false, false> {
- __sfinae_ctor_base() = default;
- __sfinae_ctor_base(__sfinae_ctor_base const&) = delete;
- __sfinae_ctor_base(__sfinae_ctor_base &&) = delete;
- __sfinae_ctor_base& operator=(__sfinae_ctor_base const&) = default;
- __sfinae_ctor_base& operator=(__sfinae_ctor_base&&) = default;
-};
-template <>
-struct __sfinae_ctor_base<true, false> {
- __sfinae_ctor_base() = default;
- __sfinae_ctor_base(__sfinae_ctor_base const&) = default;
- __sfinae_ctor_base(__sfinae_ctor_base &&) = delete;
- __sfinae_ctor_base& operator=(__sfinae_ctor_base const&) = default;
- __sfinae_ctor_base& operator=(__sfinae_ctor_base&&) = default;
-};
-template <>
-struct __sfinae_ctor_base<false, true> {
- __sfinae_ctor_base() = default;
- __sfinae_ctor_base(__sfinae_ctor_base const&) = delete;
- __sfinae_ctor_base(__sfinae_ctor_base &&) = default;
- __sfinae_ctor_base& operator=(__sfinae_ctor_base const&) = default;
- __sfinae_ctor_base& operator=(__sfinae_ctor_base&&) = default;
-};
-
-template <bool _CanCopy, bool _CanMove>
-struct __sfinae_assign_base {};
-template <>
-struct __sfinae_assign_base<false, false> {
- __sfinae_assign_base() = default;
- __sfinae_assign_base(__sfinae_assign_base const&) = default;
- __sfinae_assign_base(__sfinae_assign_base &&) = default;
- __sfinae_assign_base& operator=(__sfinae_assign_base const&) = delete;
- __sfinae_assign_base& operator=(__sfinae_assign_base&&) = delete;
-};
-template <>
-struct __sfinae_assign_base<true, false> {
- __sfinae_assign_base() = default;
- __sfinae_assign_base(__sfinae_assign_base const&) = default;
- __sfinae_assign_base(__sfinae_assign_base &&) = default;
- __sfinae_assign_base& operator=(__sfinae_assign_base const&) = default;
- __sfinae_assign_base& operator=(__sfinae_assign_base&&) = delete;
-};
-template <>
-struct __sfinae_assign_base<false, true> {
- __sfinae_assign_base() = default;
- __sfinae_assign_base(__sfinae_assign_base const&) = default;
- __sfinae_assign_base(__sfinae_assign_base &&) = default;
- __sfinae_assign_base& operator=(__sfinae_assign_base const&) = delete;
- __sfinae_assign_base& operator=(__sfinae_assign_base&&) = default;
-};
-#endif // _LIBCPP_STD_VER > 14
-
-_LIBCPP_END_NAMESPACE_STD
-
-#endif // _LIBCPP___TUPLE
diff --git a/contrib/libs/cxxsupp/libcxx/include/__tuple/apply_cv.h b/contrib/libs/cxxsupp/libcxx/include/__tuple/apply_cv.h
new file mode 100644
index 0000000000..296755a1d5
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__tuple/apply_cv.h
@@ -0,0 +1,70 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TUPLE_APPLY_CV_H
+#define _LIBCPP___TUPLE_APPLY_CV_H
+
+#include <__config>
+#include <__type_traits/is_const.h>
+#include <__type_traits/is_reference.h>
+#include <__type_traits/is_volatile.h>
+#include <__type_traits/remove_reference.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#ifndef _LIBCPP_CXX03_LANG
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <bool _ApplyLV, bool _ApplyConst, bool _ApplyVolatile>
+struct __apply_cv_mf;
+template <>
+struct __apply_cv_mf<false, false, false> {
+ template <class _Tp> using __apply = _Tp;
+};
+template <>
+struct __apply_cv_mf<false, true, false> {
+ template <class _Tp> using __apply _LIBCPP_NODEBUG = const _Tp;
+};
+template <>
+struct __apply_cv_mf<false, false, true> {
+ template <class _Tp> using __apply _LIBCPP_NODEBUG = volatile _Tp;
+};
+template <>
+struct __apply_cv_mf<false, true, true> {
+ template <class _Tp> using __apply _LIBCPP_NODEBUG = const volatile _Tp;
+};
+template <>
+struct __apply_cv_mf<true, false, false> {
+ template <class _Tp> using __apply _LIBCPP_NODEBUG = _Tp&;
+};
+template <>
+struct __apply_cv_mf<true, true, false> {
+ template <class _Tp> using __apply _LIBCPP_NODEBUG = const _Tp&;
+};
+template <>
+struct __apply_cv_mf<true, false, true> {
+ template <class _Tp> using __apply _LIBCPP_NODEBUG = volatile _Tp&;
+};
+template <>
+struct __apply_cv_mf<true, true, true> {
+ template <class _Tp> using __apply _LIBCPP_NODEBUG = const volatile _Tp&;
+};
+template <class _Tp, class _RawTp = __libcpp_remove_reference_t<_Tp> >
+using __apply_cv_t _LIBCPP_NODEBUG = __apply_cv_mf<
+ is_lvalue_reference<_Tp>::value,
+ is_const<_RawTp>::value,
+ is_volatile<_RawTp>::value>;
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_CXX03_LANG
+
+#endif // _LIBCPP___TUPLE_APPLY_CV_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__tuple/make_tuple_types.h b/contrib/libs/cxxsupp/libcxx/include/__tuple/make_tuple_types.h
new file mode 100644
index 0000000000..38e2547d13
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__tuple/make_tuple_types.h
@@ -0,0 +1,84 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TUPLE_MAKE_TUPLE_TYPES_H
+#define _LIBCPP___TUPLE_MAKE_TUPLE_TYPES_H
+
+#include <__config>
+#include <__fwd/array.h>
+#include <__fwd/tuple.h>
+#include <__tuple/apply_cv.h>
+#include <__tuple/tuple_element.h>
+#include <__tuple/tuple_indices.h>
+#include <__tuple/tuple_size.h>
+#include <__tuple/tuple_types.h>
+#include <__type_traits/remove_cv.h>
+#include <__type_traits/remove_reference.h>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#ifndef _LIBCPP_CXX03_LANG
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+// __make_tuple_types<_Tuple<_Types...>, _Ep, _Sp>::type is a
+// __tuple_types<_Types...> using only those _Types in the range [_Sp, _Ep).
+// _Sp defaults to 0 and _Ep defaults to tuple_size<_Tuple>. If _Tuple is a
+// lvalue_reference type, then __tuple_types<_Types&...> is the result.
+
+template <class _TupleTypes, class _TupleIndices>
+struct __make_tuple_types_flat;
+
+template <template <class...> class _Tuple, class ..._Types, size_t ..._Idx>
+struct __make_tuple_types_flat<_Tuple<_Types...>, __tuple_indices<_Idx...>> {
+ // Specialization for pair, tuple, and __tuple_types
+ template <class _Tp, class _ApplyFn = __apply_cv_t<_Tp>>
+ using __apply_quals _LIBCPP_NODEBUG = __tuple_types<
+ typename _ApplyFn::template __apply<__type_pack_element<_Idx, _Types...>>...
+ >;
+};
+
+template <class _Vt, size_t _Np, size_t ..._Idx>
+struct __make_tuple_types_flat<array<_Vt, _Np>, __tuple_indices<_Idx...>> {
+ template <size_t>
+ using __value_type = _Vt;
+ template <class _Tp, class _ApplyFn = __apply_cv_t<_Tp>>
+ using __apply_quals = __tuple_types<
+ typename _ApplyFn::template __apply<__value_type<_Idx>>...
+ >;
+};
+
+template <class _Tp, size_t _Ep = tuple_size<__libcpp_remove_reference_t<_Tp> >::value,
+ size_t _Sp = 0,
+ bool _SameSize = (_Ep == tuple_size<__libcpp_remove_reference_t<_Tp> >::value)>
+struct __make_tuple_types
+{
+ static_assert(_Sp <= _Ep, "__make_tuple_types input error");
+ using _RawTp = __remove_cv_t<__libcpp_remove_reference_t<_Tp> >;
+ using _Maker = __make_tuple_types_flat<_RawTp, typename __make_tuple_indices<_Ep, _Sp>::type>;
+ using type = typename _Maker::template __apply_quals<_Tp>;
+};
+
+template <class ..._Types, size_t _Ep>
+struct __make_tuple_types<tuple<_Types...>, _Ep, 0, true> {
+ typedef _LIBCPP_NODEBUG __tuple_types<_Types...> type;
+};
+
+template <class ..._Types, size_t _Ep>
+struct __make_tuple_types<__tuple_types<_Types...>, _Ep, 0, true> {
+ typedef _LIBCPP_NODEBUG __tuple_types<_Types...> type;
+};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_CXX03_LANG
+
+#endif // _LIBCPP___TUPLE_MAKE_TUPLE_TYPES_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__tuple/sfinae_helpers.h b/contrib/libs/cxxsupp/libcxx/include/__tuple/sfinae_helpers.h
new file mode 100644
index 0000000000..ebe1e07a00
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__tuple/sfinae_helpers.h
@@ -0,0 +1,198 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TUPLE_SFINAE_HELPERS_H
+#define _LIBCPP___TUPLE_SFINAE_HELPERS_H
+
+#include <__config>
+#include <__fwd/tuple.h>
+#include <__tuple/make_tuple_types.h>
+#include <__tuple/tuple_element.h>
+#include <__tuple/tuple_like.h>
+#include <__tuple/tuple_size.h>
+#include <__tuple/tuple_types.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/integral_constant.h>
+#include <__type_traits/is_assignable.h>
+#include <__type_traits/is_constructible.h>
+#include <__type_traits/is_convertible.h>
+#include <__type_traits/is_same.h>
+#include <__type_traits/remove_cvref.h>
+#include <__type_traits/remove_reference.h>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#ifndef _LIBCPP_CXX03_LANG
+
+template <bool ..._Preds>
+struct __all_dummy;
+
+template <bool ..._Pred>
+struct __all : _IsSame<__all_dummy<_Pred...>, __all_dummy<((void)_Pred, true)...>> {};
+
+struct __tuple_sfinae_base {
+ template <template <class, class...> class _Trait,
+ class ..._LArgs, class ..._RArgs>
+ static auto __do_test(__tuple_types<_LArgs...>, __tuple_types<_RArgs...>)
+ -> __all<__enable_if_t<_Trait<_LArgs, _RArgs>::value, bool>{true}...>;
+ template <template <class...> class>
+ static auto __do_test(...) -> false_type;
+
+ template <class _FromArgs, class _ToArgs>
+ using __constructible = decltype(__do_test<is_constructible>(declval<_ToArgs>(), declval<_FromArgs>()));
+ template <class _FromArgs, class _ToArgs>
+ using __convertible = decltype(__do_test<is_convertible>(declval<_FromArgs>(), declval<_ToArgs>()));
+ template <class _FromArgs, class _ToArgs>
+ using __assignable = decltype(__do_test<is_assignable>(declval<_ToArgs>(), declval<_FromArgs>()));
+};
+
+// __tuple_convertible
+
+template <class _Tp, class _Up, bool = __tuple_like<__libcpp_remove_reference_t<_Tp> >::value,
+ bool = __tuple_like<_Up>::value,
+ class = void>
+struct __tuple_convertible
+ : public false_type {};
+
+template <class _Tp, class _Up>
+struct __tuple_convertible<_Tp, _Up, true, true,
+ typename enable_if<(tuple_size<typename remove_reference<_Tp>::type>::value == tuple_size<_Up>::value)>::type>
+ : public __tuple_sfinae_base::__convertible<
+ typename __make_tuple_types<_Tp>::type
+ , typename __make_tuple_types<_Up>::type
+ >
+{};
+
+// __tuple_constructible
+
+template <class _Tp, class _Up, bool = __tuple_like<__libcpp_remove_reference_t<_Tp> >::value,
+ bool = __tuple_like<_Up>::value>
+struct __tuple_constructible
+ : public false_type {};
+
+template <class _Tp, class _Up>
+struct __tuple_constructible<_Tp, _Up, true, true>
+ : public __tuple_sfinae_base::__constructible<
+ typename __make_tuple_types<_Tp>::type
+ , typename __make_tuple_types<_Up>::type
+ >
+{};
+
+// __tuple_assignable
+
+template <class _Tp, class _Up, bool = __tuple_like<__libcpp_remove_reference_t<_Tp> >::value,
+ bool = __tuple_like<_Up>::value>
+struct __tuple_assignable
+ : public false_type {};
+
+template <class _Tp, class _Up>
+struct __tuple_assignable<_Tp, _Up, true, true>
+ : public __tuple_sfinae_base::__assignable<
+ typename __make_tuple_types<_Tp>::type
+ , typename __make_tuple_types<_Up&>::type
+ >
+{};
+
+
+template <size_t _Ip, class ..._Tp>
+struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, tuple<_Tp...> >
+{
+ typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, __tuple_types<_Tp...> >::type type;
+};
+
+template <bool _IsTuple, class _SizeTrait, size_t _Expected>
+struct __tuple_like_with_size_imp : false_type {};
+
+template <class _SizeTrait, size_t _Expected>
+struct __tuple_like_with_size_imp<true, _SizeTrait, _Expected>
+ : integral_constant<bool, _SizeTrait::value == _Expected> {};
+
+template <class _Tuple, size_t _ExpectedSize, class _RawTuple = __libcpp_remove_reference_t<_Tuple> >
+using __tuple_like_with_size _LIBCPP_NODEBUG = __tuple_like_with_size_imp<
+ __tuple_like<_RawTuple>::value,
+ tuple_size<_RawTuple>, _ExpectedSize
+ >;
+
+struct _LIBCPP_TYPE_VIS __check_tuple_constructor_fail {
+
+ static constexpr bool __enable_explicit_default() { return false; }
+ static constexpr bool __enable_implicit_default() { return false; }
+ template <class ...>
+ static constexpr bool __enable_explicit() { return false; }
+ template <class ...>
+ static constexpr bool __enable_implicit() { return false; }
+ template <class ...>
+ static constexpr bool __enable_assign() { return false; }
+};
+#endif // !defined(_LIBCPP_CXX03_LANG)
+
+#if _LIBCPP_STD_VER > 14
+
+template <bool _CanCopy, bool _CanMove>
+struct __sfinae_ctor_base {};
+template <>
+struct __sfinae_ctor_base<false, false> {
+ __sfinae_ctor_base() = default;
+ __sfinae_ctor_base(__sfinae_ctor_base const&) = delete;
+ __sfinae_ctor_base(__sfinae_ctor_base &&) = delete;
+ __sfinae_ctor_base& operator=(__sfinae_ctor_base const&) = default;
+ __sfinae_ctor_base& operator=(__sfinae_ctor_base&&) = default;
+};
+template <>
+struct __sfinae_ctor_base<true, false> {
+ __sfinae_ctor_base() = default;
+ __sfinae_ctor_base(__sfinae_ctor_base const&) = default;
+ __sfinae_ctor_base(__sfinae_ctor_base &&) = delete;
+ __sfinae_ctor_base& operator=(__sfinae_ctor_base const&) = default;
+ __sfinae_ctor_base& operator=(__sfinae_ctor_base&&) = default;
+};
+template <>
+struct __sfinae_ctor_base<false, true> {
+ __sfinae_ctor_base() = default;
+ __sfinae_ctor_base(__sfinae_ctor_base const&) = delete;
+ __sfinae_ctor_base(__sfinae_ctor_base &&) = default;
+ __sfinae_ctor_base& operator=(__sfinae_ctor_base const&) = default;
+ __sfinae_ctor_base& operator=(__sfinae_ctor_base&&) = default;
+};
+
+template <bool _CanCopy, bool _CanMove>
+struct __sfinae_assign_base {};
+template <>
+struct __sfinae_assign_base<false, false> {
+ __sfinae_assign_base() = default;
+ __sfinae_assign_base(__sfinae_assign_base const&) = default;
+ __sfinae_assign_base(__sfinae_assign_base &&) = default;
+ __sfinae_assign_base& operator=(__sfinae_assign_base const&) = delete;
+ __sfinae_assign_base& operator=(__sfinae_assign_base&&) = delete;
+};
+template <>
+struct __sfinae_assign_base<true, false> {
+ __sfinae_assign_base() = default;
+ __sfinae_assign_base(__sfinae_assign_base const&) = default;
+ __sfinae_assign_base(__sfinae_assign_base &&) = default;
+ __sfinae_assign_base& operator=(__sfinae_assign_base const&) = default;
+ __sfinae_assign_base& operator=(__sfinae_assign_base&&) = delete;
+};
+template <>
+struct __sfinae_assign_base<false, true> {
+ __sfinae_assign_base() = default;
+ __sfinae_assign_base(__sfinae_assign_base const&) = default;
+ __sfinae_assign_base(__sfinae_assign_base &&) = default;
+ __sfinae_assign_base& operator=(__sfinae_assign_base const&) = delete;
+ __sfinae_assign_base& operator=(__sfinae_assign_base&&) = default;
+};
+#endif // _LIBCPP_STD_VER > 14
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TUPLE_SFINAE_HELPERS_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_element.h b/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_element.h
new file mode 100644
index 0000000000..2e9d9c738e
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_element.h
@@ -0,0 +1,109 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TUPLE_TUPLE_ELEMENT_H
+#define _LIBCPP___TUPLE_TUPLE_ELEMENT_H
+
+#include <__config>
+#include <__tuple/tuple_indices.h>
+#include <__tuple/tuple_types.h>
+#include <__type_traits/add_const.h>
+#include <__type_traits/add_cv.h>
+#include <__type_traits/add_volatile.h>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <size_t _Ip, class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_element;
+
+template <size_t _Ip, class _Tp>
+struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const _Tp>
+{
+ typedef _LIBCPP_NODEBUG typename add_const<typename tuple_element<_Ip, _Tp>::type>::type type;
+};
+
+template <size_t _Ip, class _Tp>
+struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, volatile _Tp>
+{
+ typedef _LIBCPP_NODEBUG typename add_volatile<typename tuple_element<_Ip, _Tp>::type>::type type;
+};
+
+template <size_t _Ip, class _Tp>
+struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp>
+{
+ typedef _LIBCPP_NODEBUG typename add_cv<typename tuple_element<_Ip, _Tp>::type>::type type;
+};
+
+#ifndef _LIBCPP_CXX03_LANG
+
+#if !__has_builtin(__type_pack_element)
+
+namespace __indexer_detail {
+
+template <size_t _Idx, class _Tp>
+struct __indexed { using type _LIBCPP_NODEBUG = _Tp; };
+
+template <class _Types, class _Indexes> struct __indexer;
+
+template <class ..._Types, size_t ..._Idx>
+struct __indexer<__tuple_types<_Types...>, __tuple_indices<_Idx...>>
+ : __indexed<_Idx, _Types>...
+{};
+
+template <size_t _Idx, class _Tp>
+__indexed<_Idx, _Tp> __at_index(__indexed<_Idx, _Tp> const&);
+
+} // namespace __indexer_detail
+
+#if !defined(__CUDACC__) || !defined(_MSC_VER)
+template <size_t _Idx, class ..._Types>
+using __type_pack_element _LIBCPP_NODEBUG = typename decltype(
+ __indexer_detail::__at_index<_Idx>(
+ __indexer_detail::__indexer<
+ __tuple_types<_Types...>,
+ typename __make_tuple_indices<sizeof...(_Types)>::type
+ >{})
+ )::type;
+
+#else // !defined(__CUDACC__) || !defined(_MSC_VER)
+template <size_t _Idx, class ..._Types>
+struct __y_type_pack_element {
+ using __t1 = typename __make_tuple_indices<sizeof...(_Types)>::type;
+ using __t2 = __indexer_detail::__indexer<__tuple_types<_Types...>, __t1>;
+ using __t3 = decltype(__indexer_detail::__at_index<_Idx>(__t2{}));
+ using __t4 = typename __t3::type;
+};
+
+template <size_t _Idx, class ..._Types>
+using __type_pack_element = typename __y_type_pack_element<_Idx, _Types...>::__t4;
+
+#endif // !defined(__CUDACC__) || !defined(_MSC_VER)
+
+#endif // __has_builtin(__type_pack_element)
+
+template <size_t _Ip, class ..._Types>
+struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...> >
+{
+ static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range");
+ typedef _LIBCPP_NODEBUG __type_pack_element<_Ip, _Types...> type;
+};
+
+#if _LIBCPP_STD_VER > 11
+template <size_t _Ip, class ..._Tp>
+using tuple_element_t _LIBCPP_NODEBUG = typename tuple_element <_Ip, _Tp...>::type;
+#endif
+
+#endif // _LIBCPP_CXX03_LANG
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TUPLE_TUPLE_ELEMENT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_indices.h b/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_indices.h
new file mode 100644
index 0000000000..18666d5948
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_indices.h
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TUPLE_MAKE_TUPLE_INDICES_H
+#define _LIBCPP___TUPLE_MAKE_TUPLE_INDICES_H
+
+#include <__config>
+#include <__utility/integer_sequence.h>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#ifndef _LIBCPP_CXX03_LANG
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <size_t...> struct __tuple_indices {};
+
+template <size_t _Ep, size_t _Sp = 0>
+struct __make_tuple_indices
+{
+ static_assert(_Sp <= _Ep, "__make_tuple_indices input error");
+ typedef __make_indices_imp<_Ep, _Sp> type;
+};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_CXX03_LANG
+
+#endif // _LIBCPP___TUPLE_MAKE_TUPLE_INDICES_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_like.h b/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_like.h
new file mode 100644
index 0000000000..3b596916a6
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_like.h
@@ -0,0 +1,44 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TUPLE_TUPLE_LIKE_H
+#define _LIBCPP___TUPLE_TUPLE_LIKE_H
+
+#include <__config>
+#include <__fwd/array.h>
+#include <__fwd/pair.h>
+#include <__fwd/tuple.h>
+#include <__tuple/tuple_types.h>
+#include <__type_traits/integral_constant.h>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _Tp> struct __tuple_like : false_type {};
+
+template <class _Tp> struct __tuple_like<const _Tp> : public __tuple_like<_Tp> {};
+template <class _Tp> struct __tuple_like<volatile _Tp> : public __tuple_like<_Tp> {};
+template <class _Tp> struct __tuple_like<const volatile _Tp> : public __tuple_like<_Tp> {};
+
+#ifndef _LIBCPP_CXX03_LANG
+template <class... _Tp> struct __tuple_like<tuple<_Tp...> > : true_type {};
+#endif
+
+template <class _T1, class _T2> struct __tuple_like<pair<_T1, _T2> > : true_type {};
+
+template <class _Tp, size_t _Size> struct __tuple_like<array<_Tp, _Size> > : true_type {};
+
+template <class... _Tp> struct __tuple_like<__tuple_types<_Tp...> > : true_type {};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TUPLE_TUPLE_LIKE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_size.h b/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_size.h
new file mode 100644
index 0000000000..26f9d9725d
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_size.h
@@ -0,0 +1,75 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TUPLE_TUPLE_SIZE_H
+#define _LIBCPP___TUPLE_TUPLE_SIZE_H
+
+#include <__config>
+#include <__fwd/tuple.h>
+#include <__tuple/tuple_types.h>
+#include <__type_traits/is_const.h>
+#include <__type_traits/is_volatile.h>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size;
+
+#if !defined(_LIBCPP_CXX03_LANG)
+template <class _Tp, class...>
+using __enable_if_tuple_size_imp = _Tp;
+
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
+ const _Tp,
+ __enable_if_t<!is_volatile<_Tp>::value>,
+ integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
+ : public integral_constant<size_t, tuple_size<_Tp>::value> {};
+
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
+ volatile _Tp,
+ __enable_if_t<!is_const<_Tp>::value>,
+ integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
+ : public integral_constant<size_t, tuple_size<_Tp>::value> {};
+
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
+ const volatile _Tp,
+ integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
+ : public integral_constant<size_t, tuple_size<_Tp>::value> {};
+
+#else
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<const _Tp> : public tuple_size<_Tp> {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<volatile _Tp> : public tuple_size<_Tp> {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<const volatile _Tp> : public tuple_size<_Tp> {};
+#endif
+
+#ifndef _LIBCPP_CXX03_LANG
+
+template <class ..._Tp>
+struct _LIBCPP_TEMPLATE_VIS tuple_size<tuple<_Tp...> >
+ : public integral_constant<size_t, sizeof...(_Tp)>
+{
+};
+
+template <class ..._Tp>
+struct _LIBCPP_TEMPLATE_VIS tuple_size<__tuple_types<_Tp...> >
+ : public integral_constant<size_t, sizeof...(_Tp)>
+{
+};
+
+#endif // _LIBCPP_CXX03_LANG
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TUPLE_TUPLE_SIZE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_types.h b/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_types.h
new file mode 100644
index 0000000000..c5be81cce8
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__tuple/tuple_types.h
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TUPLE_TUPLE_TYPES_H
+#define _LIBCPP___TUPLE_TUPLE_TYPES_H
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class ..._Tp> struct __tuple_types {};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TUPLE_TUPLE_TYPES_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/add_lvalue_reference.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/add_lvalue_reference.h
index 0d1ee4185c..daa5cb9e7d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/add_lvalue_reference.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/add_lvalue_reference.h
@@ -18,14 +18,34 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Tp, bool = __is_referenceable<_Tp>::value> struct __add_lvalue_reference_impl { typedef _LIBCPP_NODEBUG _Tp type; };
-template <class _Tp > struct __add_lvalue_reference_impl<_Tp, true> { typedef _LIBCPP_NODEBUG _Tp& type; };
+#if __has_builtin(__add_lvalue_reference)
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_lvalue_reference
-{typedef _LIBCPP_NODEBUG typename __add_lvalue_reference_impl<_Tp>::type type;};
+template <class _Tp>
+using __add_lvalue_reference_t = __add_lvalue_reference(_Tp);
+
+#else
+
+template <class _Tp, bool = __libcpp_is_referenceable<_Tp>::value>
+struct __add_lvalue_reference_impl {
+ typedef _LIBCPP_NODEBUG _Tp type;
+};
+template <class _Tp >
+struct __add_lvalue_reference_impl<_Tp, true> {
+ typedef _LIBCPP_NODEBUG _Tp& type;
+};
+
+template <class _Tp>
+using __add_lvalue_reference_t = typename __add_lvalue_reference_impl<_Tp>::type;
+
+#endif // __has_builtin(__add_lvalue_reference)
+
+template <class _Tp>
+struct add_lvalue_reference {
+ using type _LIBCPP_NODEBUG = __add_lvalue_reference_t<_Tp>;
+};
#if _LIBCPP_STD_VER > 11
-template <class _Tp> using add_lvalue_reference_t = typename add_lvalue_reference<_Tp>::type;
+template <class _Tp> using add_lvalue_reference_t = __add_lvalue_reference_t<_Tp>;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/add_pointer.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/add_pointer.h
index aea2490c5d..9d0c201007 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/add_pointer.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/add_pointer.h
@@ -12,6 +12,7 @@
#include <__config>
#include <__type_traits/is_referenceable.h>
#include <__type_traits/is_same.h>
+#include <__type_traits/is_void.h>
#include <__type_traits/remove_cv.h>
#include <__type_traits/remove_reference.h>
@@ -21,19 +22,32 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#if __has_builtin(__add_pointer)
+
+template <class _Tp>
+using __add_pointer_t = __add_pointer(_Tp);
+
+#else
template <class _Tp,
- bool = __is_referenceable<_Tp>::value ||
- _IsSame<typename remove_cv<_Tp>::type, void>::value>
-struct __add_pointer_impl
- {typedef _LIBCPP_NODEBUG typename remove_reference<_Tp>::type* type;};
+ bool = __libcpp_is_referenceable<_Tp>::value || is_void<_Tp>::value>
+struct __add_pointer_impl {
+ typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tp>* type;
+};
template <class _Tp> struct __add_pointer_impl<_Tp, false>
{typedef _LIBCPP_NODEBUG _Tp type;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_pointer
- {typedef _LIBCPP_NODEBUG typename __add_pointer_impl<_Tp>::type type;};
+template <class _Tp>
+using __add_pointer_t = typename __add_pointer_impl<_Tp>::type;
+
+#endif // __has_builtin(__add_pointer)
+
+template <class _Tp>
+struct add_pointer {
+ using type _LIBCPP_NODEBUG = __add_pointer_t<_Tp>;
+};
#if _LIBCPP_STD_VER > 11
-template <class _Tp> using add_pointer_t = typename add_pointer<_Tp>::type;
+template <class _Tp> using add_pointer_t = __add_pointer_t<_Tp>;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/add_rvalue_reference.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/add_rvalue_reference.h
index b2a1428095..098e84c072 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/add_rvalue_reference.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/add_rvalue_reference.h
@@ -18,14 +18,35 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Tp, bool = __is_referenceable<_Tp>::value> struct __add_rvalue_reference_impl { typedef _LIBCPP_NODEBUG _Tp type; };
-template <class _Tp > struct __add_rvalue_reference_impl<_Tp, true> { typedef _LIBCPP_NODEBUG _Tp&& type; };
+#if __has_builtin(__add_rvalue_reference)
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_rvalue_reference
-{typedef _LIBCPP_NODEBUG typename __add_rvalue_reference_impl<_Tp>::type type;};
+template <class _Tp>
+using __add_rvalue_reference_t = __add_rvalue_reference(_Tp);
+
+#else
+
+template <class _Tp, bool = __libcpp_is_referenceable<_Tp>::value>
+struct __add_rvalue_reference_impl {
+ typedef _LIBCPP_NODEBUG _Tp type;
+};
+template <class _Tp >
+struct __add_rvalue_reference_impl<_Tp, true> {
+ typedef _LIBCPP_NODEBUG _Tp&& type;
+};
+
+template <class _Tp>
+using __add_rvalue_reference_t = typename __add_rvalue_reference_impl<_Tp>::type;
+
+#endif // __has_builtin(__add_rvalue_reference)
+
+template <class _Tp>
+struct add_rvalue_reference {
+ using type = __add_rvalue_reference_t<_Tp>;
+};
#if _LIBCPP_STD_VER > 11
-template <class _Tp> using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type;
+template <class _Tp>
+using add_rvalue_reference_t = __add_rvalue_reference_t<_Tp>;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/aligned_storage.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/aligned_storage.h
index 9659a90ae5..a9f1244ed3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/aligned_storage.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/aligned_storage.h
@@ -54,21 +54,13 @@ template <class _TL, size_t _Align> struct __find_pod;
template <class _Hp, size_t _Align>
struct __find_pod<__type_list<_Hp, __nat>, _Align>
{
- typedef typename conditional<
- _Align == _Hp::value,
- typename _Hp::type,
- __fallback_overaligned<_Align>
- >::type type;
+ typedef __conditional_t<_Align == _Hp::value, typename _Hp::type, __fallback_overaligned<_Align> > type;
};
template <class _Hp, class _Tp, size_t _Align>
struct __find_pod<__type_list<_Hp, _Tp>, _Align>
{
- typedef typename conditional<
- _Align == _Hp::value,
- typename _Hp::type,
- typename __find_pod<_Tp, _Align>::type
- >::type type;
+ typedef __conditional_t<_Align == _Hp::value, typename _Hp::type, typename __find_pod<_Tp, _Align>::type> type;
};
template <class _TL, size_t _Len> struct __find_max_align;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/alignment_of.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/alignment_of.h
index 65c603058f..45b4cbcc2d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/alignment_of.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/alignment_of.h
@@ -24,7 +24,7 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS alignment_of
#if _LIBCPP_STD_VER > 14
template <class _Tp>
-inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value;
+inline constexpr size_t alignment_of_v = _LIBCPP_ALIGNOF(_Tp);
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/apply_cv.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/apply_cv.h
index 4a5aab48a7..680ff6ac7d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/apply_cv.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/apply_cv.h
@@ -10,7 +10,6 @@
#define _LIBCPP___TYPE_TRAITS_APPLY_CV_H
#include <__config>
-#include <__type_traits/integral_constant.h>
#include <__type_traits/is_const.h>
#include <__type_traits/is_volatile.h>
#include <__type_traits/remove_reference.h>
@@ -22,8 +21,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Tp, class _Up, bool = is_const<typename remove_reference<_Tp>::type>::value,
- bool = is_volatile<typename remove_reference<_Tp>::type>::value>
+template <class _Tp, class _Up, bool = is_const<__libcpp_remove_reference_t<_Tp> >::value,
+ bool = is_volatile<__libcpp_remove_reference_t<_Tp> >::value>
struct __apply_cv
{
typedef _LIBCPP_NODEBUG _Up type;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/can_extract_key.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/can_extract_key.h
new file mode 100644
index 0000000000..454c56bfae
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/can_extract_key.h
@@ -0,0 +1,56 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TYPE_TRAITS_CAN_EXTRACT_KEY_H
+#define _LIBCPP___TYPE_TRAITS_CAN_EXTRACT_KEY_H
+
+#include <__config>
+#include <__fwd/pair.h>
+#include <__type_traits/conditional.h>
+#include <__type_traits/integral_constant.h>
+#include <__type_traits/is_same.h>
+#include <__type_traits/remove_const.h>
+#include <__type_traits/remove_const_ref.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+// These traits are used in __tree and __hash_table
+struct __extract_key_fail_tag {};
+struct __extract_key_self_tag {};
+struct __extract_key_first_tag {};
+
+template <class _ValTy, class _Key, class _RawValTy = __remove_const_ref_t<_ValTy> >
+struct __can_extract_key
+ : __conditional_t<_IsSame<_RawValTy, _Key>::value, __extract_key_self_tag, __extract_key_fail_tag> {};
+
+template <class _Pair, class _Key, class _First, class _Second>
+struct __can_extract_key<_Pair, _Key, pair<_First, _Second> >
+ : __conditional_t<_IsSame<__remove_const_t<_First>, _Key>::value, __extract_key_first_tag, __extract_key_fail_tag> {
+};
+
+// __can_extract_map_key uses true_type/false_type instead of the tags.
+// It returns true if _Key != _ContainerValueTy (the container is a map not a set)
+// and _ValTy == _Key.
+template <class _ValTy, class _Key, class _ContainerValueTy,
+ class _RawValTy = __remove_const_ref_t<_ValTy> >
+struct __can_extract_map_key
+ : integral_constant<bool, _IsSame<_RawValTy, _Key>::value> {};
+
+// This specialization returns __extract_key_fail_tag for non-map containers
+// because _Key == _ContainerValueTy
+template <class _ValTy, class _Key, class _RawValTy>
+struct __can_extract_map_key<_ValTy, _Key, _Key, _RawValTy>
+ : false_type {};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TYPE_TRAITS_CAN_EXTRACT_KEY_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/common_type.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/common_type.h
index 55321e9936..8009142dfe 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/common_type.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/common_type.h
@@ -47,10 +47,7 @@ struct __common_type2_imp {};
// sub-bullet 3 - "if decay_t<decltype(false ? declval<D1>() : declval<D2>())> ..."
template <class _Tp, class _Up>
-struct __common_type2_imp<_Tp, _Up,
- typename __void_t<decltype(
- true ? declval<_Tp>() : declval<_Up>()
- )>::type>
+struct __common_type2_imp<_Tp, _Up, __void_t<decltype(true ? declval<_Tp>() : declval<_Up>())> >
{
typedef _LIBCPP_NODEBUG typename decay<decltype(
true ? declval<_Tp>() : declval<_Up>()
@@ -82,8 +79,7 @@ struct common_type {
template <class _Tp, class _Up>
struct __common_type_impl<
- __common_types<_Tp, _Up>,
- typename __void_t<typename common_type<_Tp, _Up>::type>::type>
+ __common_types<_Tp, _Up>, __void_t<typename common_type<_Tp, _Up>::type> >
{
typedef typename common_type<_Tp, _Up>::type type;
};
@@ -91,7 +87,7 @@ struct __common_type_impl<
template <class _Tp, class _Up, class _Vp _LIBCPP_OPTIONAL_PACK(class... _Rest)>
struct __common_type_impl<
__common_types<_Tp, _Up, _Vp _LIBCPP_OPTIONAL_PACK(_Rest...)>,
- typename __void_t<typename common_type<_Tp, _Up>::type>::type>
+ __void_t<typename common_type<_Tp, _Up>::type> >
: __common_type_impl<__common_types<typename common_type<_Tp, _Up>::type,
_Vp _LIBCPP_OPTIONAL_PACK(_Rest...)> > {
};
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/conditional.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/conditional.h
index 4b1a560ddc..6249812a11 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/conditional.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/conditional.h
@@ -36,17 +36,22 @@ template <bool _Cond, class _IfRes, class _ElseRes>
using _If _LIBCPP_NODEBUG = typename _IfImpl<_Cond>::template _Select<_IfRes, _ElseRes>;
template <bool _Bp, class _If, class _Then>
- struct _LIBCPP_TEMPLATE_VIS conditional {typedef _If type;};
+struct _LIBCPP_TEMPLATE_VIS conditional {
+ using type _LIBCPP_NODEBUG = _If;
+};
template <class _If, class _Then>
- struct _LIBCPP_TEMPLATE_VIS conditional<false, _If, _Then> {typedef _Then type;};
+struct _LIBCPP_TEMPLATE_VIS conditional<false, _If, _Then> {
+ using type _LIBCPP_NODEBUG = _Then;
+};
#if _LIBCPP_STD_VER > 11
template <bool _Bp, class _IfRes, class _ElseRes>
-using conditional_t = typename conditional<_Bp, _IfRes, _ElseRes>::type;
+using conditional_t _LIBCPP_NODEBUG = typename conditional<_Bp, _IfRes, _ElseRes>::type;
#endif
// Helper so we can use "conditional_t" in all language versions.
-template <bool _Bp, class _If, class _Then> using __conditional_t = typename conditional<_Bp, _If, _Then>::type;
+template <bool _Bp, class _If, class _Then>
+using __conditional_t _LIBCPP_NODEBUG = typename conditional<_Bp, _If, _Then>::type;
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/conjunction.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/conjunction.h
index 45fe5cdca3..2802d28452 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/conjunction.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/conjunction.h
@@ -20,26 +20,6 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 14
-
-template <class _Arg, class... _Args>
-struct __conjunction_impl {
- using type = conditional_t<!bool(_Arg::value), _Arg, typename __conjunction_impl<_Args...>::type>;
-};
-
-template <class _Arg>
-struct __conjunction_impl<_Arg> {
- using type = _Arg;
-};
-
-template <class... _Args>
-struct conjunction : __conjunction_impl<true_type, _Args...>::type {};
-
-template<class... _Args>
-inline constexpr bool conjunction_v = conjunction<_Args...>::value;
-
-#endif // _LIBCPP_STD_VER > 14
-
template <class...>
using __expand_to_true = true_type;
@@ -49,9 +29,30 @@ __expand_to_true<__enable_if_t<_Pred::value>...> __and_helper(int);
template <class...>
false_type __and_helper(...);
+// _And always performs lazy evaluation of its arguments.
+//
+// However, `_And<_Pred...>` itself will evaluate its result immediately (without having to
+// be instantiated) since it is an alias, unlike `conjunction<_Pred...>`, which is a struct.
+// If you want to defer the evaluation of `_And<_Pred...>` itself, use `_Lazy<_And, _Pred...>`.
template <class... _Pred>
using _And _LIBCPP_NODEBUG = decltype(__and_helper<_Pred...>(0));
+#if _LIBCPP_STD_VER > 14
+
+template <class...>
+struct conjunction : true_type {};
+
+template <class _Arg>
+struct conjunction<_Arg> : _Arg {};
+
+template <class _Arg, class... _Args>
+struct conjunction<_Arg, _Args...> : conditional_t<!bool(_Arg::value), _Arg, conjunction<_Args...>> {};
+
+template <class... _Args>
+inline constexpr bool conjunction_v = conjunction<_Args...>::value;
+
+#endif // _LIBCPP_STD_VER > 14
+
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___TYPE_TRAITS_CONJUNCTION_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/copy_cvref.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/copy_cvref.h
index 69b97ac1cb..8ec59b95a0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/copy_cvref.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/copy_cvref.h
@@ -29,13 +29,13 @@ struct __copy_cvref
template <class _From, class _To>
struct __copy_cvref<_From&, _To>
{
- using type = typename add_lvalue_reference<__copy_cv_t<_From, _To> >::type;
+ using type = __add_lvalue_reference_t<__copy_cv_t<_From, _To> >;
};
template <class _From, class _To>
struct __copy_cvref<_From&&, _To>
{
- using type = typename add_rvalue_reference<__copy_cv_t<_From, _To> >::type;
+ using type = __add_rvalue_reference_t<__copy_cv_t<_From, _To> >;
};
template <class _From, class _To>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/decay.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/decay.h
index d47ad03fe0..f45d33b8fb 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/decay.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/decay.h
@@ -12,7 +12,6 @@
#include <__config>
#include <__type_traits/add_pointer.h>
#include <__type_traits/conditional.h>
-#include <__type_traits/integral_constant.h>
#include <__type_traits/is_array.h>
#include <__type_traits/is_function.h>
#include <__type_traits/is_referenceable.h>
@@ -26,9 +25,15 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#if __has_builtin(__decay)
+template <class _Tp>
+struct decay {
+ using type _LIBCPP_NODEBUG = __decay(_Tp);
+};
+#else
template <class _Up, bool>
struct __decay {
- typedef _LIBCPP_NODEBUG typename remove_cv<_Up>::type type;
+ typedef _LIBCPP_NODEBUG __remove_cv_t<_Up> type;
};
template <class _Up>
@@ -37,12 +42,12 @@ public:
typedef _LIBCPP_NODEBUG typename conditional
<
is_array<_Up>::value,
- typename remove_extent<_Up>::type*,
+ __add_pointer_t<__remove_extent_t<_Up> >,
typename conditional
<
is_function<_Up>::value,
typename add_pointer<_Up>::type,
- typename remove_cv<_Up>::type
+ __remove_cv_t<_Up>
>::type
>::type type;
};
@@ -51,10 +56,11 @@ template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS decay
{
private:
- typedef _LIBCPP_NODEBUG typename remove_reference<_Tp>::type _Up;
+ typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tp> _Up;
public:
- typedef _LIBCPP_NODEBUG typename __decay<_Up, __is_referenceable<_Up>::value>::type type;
+ typedef _LIBCPP_NODEBUG typename __decay<_Up, __libcpp_is_referenceable<_Up>::value>::type type;
};
+#endif // __has_builtin(__decay)
#if _LIBCPP_STD_VER > 11
template <class _Tp> using decay_t = typename decay<_Tp>::type;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/dependent_type.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/dependent_type.h
new file mode 100644
index 0000000000..db8a869820
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/dependent_type.h
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TYPE_TRAITS_DEPENDENT_TYPE_H
+#define _LIBCPP___TYPE_TRAITS_DEPENDENT_TYPE_H
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _Tp, bool>
+struct _LIBCPP_TEMPLATE_VIS __dependent_type : public _Tp {};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TYPE_TRAITS_DEPENDENT_TYPE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/disjunction.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/disjunction.h
index 6c6d1a8f21..125f168acc 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/disjunction.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/disjunction.h
@@ -10,7 +10,6 @@
#define _LIBCPP___TYPE_TRAITS_DISJUNCTION_H
#include <__config>
-#include <__type_traits/conditional.h>
#include <__type_traits/integral_constant.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -35,6 +34,12 @@ struct _OrImpl<false> {
using _Result = _Res;
};
+// _Or always performs lazy evaluation of its arguments.
+//
+// However, `_Or<_Pred...>` itself will evaluate its result immediately (without having to
+// be instantiated) since it is an alias, unlike `disjunction<_Pred...>`, which is a struct.
+// If you want to defer the evaluation of `_Or<_Pred...>` itself, use `_Lazy<_Or, _Pred...>`
+// or `disjunction<_Pred...>` directly.
template <class... _Args>
using _Or _LIBCPP_NODEBUG = typename _OrImpl<sizeof...(_Args) != 0>::template _Result<false_type, _Args...>;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/has_virtual_destructor.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/has_virtual_destructor.h
index 1f0bd188b7..e73a2b280c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/has_virtual_destructor.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/has_virtual_destructor.h
@@ -18,21 +18,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if __has_builtin(__has_virtual_destructor)
-
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS has_virtual_destructor
: public integral_constant<bool, __has_virtual_destructor(_Tp)> {};
-#else
-
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS has_virtual_destructor
- : public false_type {};
-
-#endif
-
#if _LIBCPP_STD_VER > 14
template <class _Tp>
-inline constexpr bool has_virtual_destructor_v = has_virtual_destructor<_Tp>::value;
+inline constexpr bool has_virtual_destructor_v = __has_virtual_destructor(_Tp);
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_allocator.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_allocator.h
new file mode 100644
index 0000000000..53401e9f4f
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_allocator.h
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TYPE_IS_ALLOCATOR_H
+#define _LIBCPP___TYPE_IS_ALLOCATOR_H
+
+#include <__config>
+#include <__type_traits/integral_constant.h>
+#include <__type_traits/void_t.h>
+#include <__utility/declval.h>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template<typename _Alloc, typename = void, typename = void>
+struct __is_allocator : false_type {};
+
+template<typename _Alloc>
+struct __is_allocator<_Alloc,
+ __void_t<typename _Alloc::value_type>,
+ __void_t<decltype(declval<_Alloc&>().allocate(size_t(0)))>
+ >
+ : true_type {};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TYPE_IS_ALLOCATOR_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_assignable.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_assignable.h
index 5e479dfc9c..13cd682f53 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_assignable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_assignable.h
@@ -18,10 +18,6 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template<typename, typename _Tp> struct __select_2nd { typedef _LIBCPP_NODEBUG _Tp type; };
-
-#if __has_builtin(__is_assignable) && !defined(__CUDACC__)
-
template<class _Tp, class _Up>
struct _LIBCPP_TEMPLATE_VIS is_assignable : _BoolConstant<__is_assignable(_Tp, _Up)> { };
@@ -30,37 +26,6 @@ template <class _Tp, class _Arg>
inline constexpr bool is_assignable_v = __is_assignable(_Tp, _Arg);
#endif
-#else // __has_builtin(__is_assignable)
-
-template <class _Tp, class _Arg>
-typename __select_2nd<decltype((declval<_Tp>() = declval<_Arg>())), true_type>::type
-__is_assignable_test(int);
-
-template <class, class>
-false_type __is_assignable_test(...);
-
-
-template <class _Tp, class _Arg, bool = is_void<_Tp>::value || is_void<_Arg>::value>
-struct __is_assignable_imp
- : public decltype((_VSTD::__is_assignable_test<_Tp, _Arg>(0))) {};
-
-template <class _Tp, class _Arg>
-struct __is_assignable_imp<_Tp, _Arg, true>
- : public false_type
-{
-};
-
-template <class _Tp, class _Arg>
-struct is_assignable
- : public __is_assignable_imp<_Tp, _Arg> {};
-
-#if _LIBCPP_STD_VER > 14
-template <class _Tp, class _Arg>
-inline constexpr bool is_assignable_v = is_assignable<_Tp, _Arg>::value;
-#endif
-
-#endif // __has_builtin(__is_assignable)
-
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___TYPE_TRAITS_IS_ASSIGNABLE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_char_like_type.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_char_like_type.h
new file mode 100644
index 0000000000..2620584304
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_char_like_type.h
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TYPE_TRAITS_IS_CHAR_LIKE_TYPE_H
+#define _LIBCPP___TYPE_TRAITS_IS_CHAR_LIKE_TYPE_H
+
+#include <__config>
+#include <__type_traits/conjunction.h>
+#include <__type_traits/is_standard_layout.h>
+#include <__type_traits/is_trivial.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _CharT>
+using _IsCharLikeType = _And<is_standard_layout<_CharT>, is_trivial<_CharT> >;
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TYPE_TRAITS_IS_CHAR_LIKE_TYPE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_class.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_class.h
index cddaeae6e8..031430f665 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_class.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_class.h
@@ -11,8 +11,6 @@
#include <__config>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/is_union.h>
-#include <__type_traits/remove_cv.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_constant_evaluated.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_constant_evaluated.h
index ea77ae6482..ae1683b97d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_constant_evaluated.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_constant_evaluated.h
@@ -25,7 +25,7 @@ inline constexpr bool is_constant_evaluated() noexcept {
}
#endif
-inline _LIBCPP_CONSTEXPR
+_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR
bool __libcpp_is_constant_evaluated() _NOEXCEPT { return __builtin_is_constant_evaluated(); }
#else
inline _LIBCPP_CONSTEXPR
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_constructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_constructible.h
index 9a96c3df13..cbe61b4329 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_constructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_constructible.h
@@ -25,7 +25,7 @@ struct _LIBCPP_TEMPLATE_VIS is_constructible
#if _LIBCPP_STD_VER > 14
template <class _Tp, class ..._Args>
-inline constexpr bool is_constructible_v = is_constructible<_Tp, _Args...>::value;
+inline constexpr bool is_constructible_v = __is_constructible(_Tp, _Args...);
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_convertible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_convertible.h
index 7e49cd4e6a..1085d632a5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_convertible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_convertible.h
@@ -53,7 +53,7 @@ template <class _Tp> struct __is_array_function_or_void<_Tp, false, false, true>
}
template <class _Tp,
- unsigned = __is_convertible_imp::__is_array_function_or_void<typename remove_reference<_Tp>::type>::value>
+ unsigned = __is_convertible_imp::__is_array_function_or_void<__libcpp_remove_reference_t<_Tp> >::value>
struct __is_convertible_check
{
static const size_t __v = 0;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_copy_assignable.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_copy_assignable.h
index e46b124945..b3a965ff37 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_copy_assignable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_copy_assignable.h
@@ -13,7 +13,6 @@
#include <__type_traits/add_const.h>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/is_assignable.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -21,9 +20,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_copy_assignable
- : public is_assignable<typename add_lvalue_reference<_Tp>::type,
- typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS is_copy_assignable
+ : public integral_constant<
+ bool,
+ __is_assignable(__add_lvalue_reference_t<_Tp>,
+ __add_lvalue_reference_t<typename add_const<_Tp>::type>)> {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_copy_constructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_copy_constructible.h
index 18dc27f2ef..053e15911b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_copy_constructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_copy_constructible.h
@@ -13,7 +13,6 @@
#include <__type_traits/add_const.h>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/is_constructible.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -23,8 +22,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_copy_constructible
- : public is_constructible<_Tp,
- typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
+ : public integral_constant<
+ bool,
+ __is_constructible(_Tp, __add_lvalue_reference_t<typename add_const<_Tp>::type>)> {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_default_constructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_default_constructible.h
index a6368413d6..d2180c6a85 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_default_constructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_default_constructible.h
@@ -11,7 +11,6 @@
#include <__config>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/is_constructible.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -21,12 +20,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_default_constructible
- : public is_constructible<_Tp>
+ : public integral_constant<bool, __is_constructible(_Tp)>
{};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
-inline constexpr bool is_default_constructible_v = is_default_constructible<_Tp>::value;
+inline constexpr bool is_default_constructible_v = __is_constructible(_Tp);
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_destructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_destructible.h
index 3cdad55581..700b8d591a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_destructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_destructible.h
@@ -63,7 +63,7 @@ struct __destructible_imp;
template <class _Tp>
struct __destructible_imp<_Tp, false>
: public integral_constant<bool,
- __is_destructor_wellformed<typename remove_all_extents<_Tp>::type>::value> {};
+ __is_destructor_wellformed<__remove_all_extents_t<_Tp> >::value> {};
template <class _Tp>
struct __destructible_imp<_Tp, true>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_enum.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_enum.h
index bf6921c88c..4c1db415d5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_enum.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_enum.h
@@ -11,7 +11,6 @@
#include <__config>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/remove_cv.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_floating_point.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_floating_point.h
index d93e5d99d0..392844814b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_floating_point.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_floating_point.h
@@ -25,7 +25,7 @@ template <> struct __libcpp_is_floating_point<double> : public tru
template <> struct __libcpp_is_floating_point<long double> : public true_type {};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_floating_point
- : public __libcpp_is_floating_point<typename remove_cv<_Tp>::type> {};
+ : public __libcpp_is_floating_point<__remove_cv_t<_Tp> > {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_implicitly_default_constructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_implicitly_default_constructible.h
new file mode 100644
index 0000000000..3643897a2d
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_implicitly_default_constructible.h
@@ -0,0 +1,48 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TYPE_TRAITS_IS_IMPLICITLY_DEFAULT_CONSTRUCTIBLE_H
+#define _LIBCPP___TYPE_TRAITS_IS_IMPLICITLY_DEFAULT_CONSTRUCTIBLE_H
+
+#include <__config>
+#include <__type_traits/integral_constant.h>
+#include <__type_traits/is_default_constructible.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#ifndef _LIBCPP_CXX03_LANG
+// First of all, we can't implement this check in C++03 mode because the {}
+// default initialization syntax isn't valid.
+// Second, we implement the trait in a funny manner with two defaulted template
+// arguments to workaround Clang's PR43454.
+template <class _Tp>
+void __test_implicit_default_constructible(_Tp);
+
+template <class _Tp, class = void, class = typename is_default_constructible<_Tp>::type>
+struct __is_implicitly_default_constructible
+ : false_type
+{ };
+
+template <class _Tp>
+struct __is_implicitly_default_constructible<_Tp, decltype(__test_implicit_default_constructible<_Tp const&>({})), true_type>
+ : true_type
+{ };
+
+template <class _Tp>
+struct __is_implicitly_default_constructible<_Tp, decltype(__test_implicit_default_constructible<_Tp const&>({})), false_type>
+ : false_type
+{ };
+#endif // !C++03
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TYPE_TRAITS_IS_IMPLICITLY_DEFAULT_CONSTRUCTIBLE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_integral.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_integral.h
index c54b9cbaa3..a13947fbec 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_integral.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_integral.h
@@ -58,7 +58,7 @@ inline constexpr bool is_integral_v = __is_integral(_Tp);
#else
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_integral
- : public _BoolConstant<__libcpp_is_integral<typename remove_cv<_Tp>::type>::value> {};
+ : public _BoolConstant<__libcpp_is_integral<__remove_cv_t<_Tp> >::value> {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_literal_type.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_literal_type.h
index df525ecee2..be01745505 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_literal_type.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_literal_type.h
@@ -25,7 +25,7 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 is_
#if _LIBCPP_STD_VER > 14
template <class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX17 inline constexpr bool is_literal_type_v = is_literal_type<_Tp>::value;
+_LIBCPP_DEPRECATED_IN_CXX17 inline constexpr bool is_literal_type_v = __is_literal_type(_Tp);
#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_function_pointer.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_function_pointer.h
index e2bc09eb57..9e83179718 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_function_pointer.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_function_pointer.h
@@ -50,7 +50,7 @@ inline constexpr bool is_member_function_pointer_v = __is_member_function_pointe
#else // __has_builtin(__is_member_function_pointer)
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer
- : public _BoolConstant< __libcpp_is_member_pointer<typename remove_cv<_Tp>::type>::__is_func > {};
+ : public _BoolConstant< __libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_func > {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_object_pointer.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_object_pointer.h
index 8196d084ee..6658504205 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_object_pointer.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_object_pointer.h
@@ -32,7 +32,7 @@ inline constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_T
#else // __has_builtin(__is_member_object_pointer)
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer
- : public _BoolConstant< __libcpp_is_member_pointer<typename remove_cv<_Tp>::type>::__is_obj > {};
+ : public _BoolConstant< __libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_obj > {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_pointer.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_pointer.h
index 0573205620..2c453c8dc6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_pointer.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_member_pointer.h
@@ -31,7 +31,7 @@ inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp);
#else // __has_builtin(__is_member_pointer)
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_pointer
- : public _BoolConstant< __libcpp_is_member_pointer<typename remove_cv<_Tp>::type>::__is_member > {};
+ : public _BoolConstant< __libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_member > {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_move_assignable.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_move_assignable.h
index 1e8aa23bea..3c7158b2ae 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_move_assignable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_move_assignable.h
@@ -10,11 +10,9 @@
#define _LIBCPP___TYPE_TRAITS_IS_MOVE_ASSIGNABLE_H
#include <__config>
-#include <__type_traits/add_const.h>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_rvalue_reference.h>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/is_assignable.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -22,9 +20,11 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_move_assignable
- : public is_assignable<typename add_lvalue_reference<_Tp>::type,
- typename add_rvalue_reference<_Tp>::type> {};
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS is_move_assignable
+ : public integral_constant<
+ bool,
+ __is_assignable(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_move_constructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_move_constructible.h
index 228cee7eff..667d10494f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_move_constructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_move_constructible.h
@@ -12,7 +12,6 @@
#include <__config>
#include <__type_traits/add_rvalue_reference.h>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/is_constructible.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -22,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_move_constructible
- : public is_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
+ : public integral_constant<bool, __is_constructible(_Tp, __add_rvalue_reference_t<_Tp>)>
{};
#if _LIBCPP_STD_VER > 14
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_assignable.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_assignable.h
index 909815cad6..0cd9d5d734 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_assignable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_assignable.h
@@ -10,7 +10,6 @@
#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_ASSIGNABLE_H
#include <__config>
-#include <__type_traits/add_const.h>
#include <__type_traits/integral_constant.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -19,39 +18,13 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if __has_builtin(__is_nothrow_assignable) && !defined(__CUDACC__)
-
template <class _Tp, class _Arg>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable
: public integral_constant<bool, __is_nothrow_assignable(_Tp, _Arg)> {};
-#else
-
-template <bool, class _Tp, class _Arg> struct __libcpp_is_nothrow_assignable;
-
-template <class _Tp, class _Arg>
-struct __libcpp_is_nothrow_assignable<false, _Tp, _Arg>
- : public false_type
-{
-};
-
-template <class _Tp, class _Arg>
-struct __libcpp_is_nothrow_assignable<true, _Tp, _Arg>
- : public integral_constant<bool, noexcept(declval<_Tp>() = declval<_Arg>()) >
-{
-};
-
-template <class _Tp, class _Arg>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable
- : public __libcpp_is_nothrow_assignable<is_assignable<_Tp, _Arg>::value, _Tp, _Arg>
-{
-};
-
-#endif // __has_builtin(__is_nothrow_assignable)
-
#if _LIBCPP_STD_VER > 14
template <class _Tp, class _Arg>
-inline constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<_Tp, _Arg>::value;
+inline constexpr bool is_nothrow_assignable_v = __is_nothrow_assignable(_Tp, _Arg);
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_constructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_constructible.h
index 8d583bbec3..da116a95db 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_constructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_constructible.h
@@ -11,7 +11,6 @@
#include <__config>
#include <__type_traits/integral_constant.h>
-#include <__utility/declval.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -21,10 +20,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__is_nothrow_constructible) && !defined(__CUDACC__)
-template <class _Tp, class... _Args>
+template <
+ class _Tp, class... _Args>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible
: public integral_constant<bool, __is_nothrow_constructible(_Tp, _Args...)> {};
-
#else
template <bool, bool, class _Tp, class... _Args> struct __libcpp_is_nothrow_constructible;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_copy_assignable.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_copy_assignable.h
index 8c4b8fd162..58f7d97a55 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_copy_assignable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_copy_assignable.h
@@ -13,7 +13,6 @@
#include <__type_traits/add_const.h>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/is_nothrow_assignable.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -21,9 +20,13 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_assignable
- : public is_nothrow_assignable<typename add_lvalue_reference<_Tp>::type,
- typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_assignable
+ : public integral_constant<
+ bool,
+ __is_nothrow_assignable(
+ __add_lvalue_reference_t<_Tp>,
+ __add_lvalue_reference_t<typename add_const<_Tp>::type>)> {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_copy_constructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_copy_constructible.h
index 966df860e4..ce17334b3f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_copy_constructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_copy_constructible.h
@@ -21,9 +21,22 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+// TODO: remove this implementation once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 is fixed
+#ifdef _LIBCPP_COMPILER_GCC
+
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible
: public is_nothrow_constructible<_Tp,
- typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
+ __add_lvalue_reference_t<typename add_const<_Tp>::type> > {};
+
+#else // _LIBCPP_COMPILER_GCC
+
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible
+ : public integral_constant<
+ bool,
+ __is_nothrow_constructible(_Tp, typename add_lvalue_reference<typename add_const<_Tp>::type>::type)> {};
+
+#endif // _LIBCPP_COMPILER_GCC
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_default_constructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_default_constructible.h
index addf359ec3..91bffa5e46 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_default_constructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_default_constructible.h
@@ -11,7 +11,6 @@
#include <__config>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/is_nothrow_constructible.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -20,12 +19,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_default_constructible
- : public is_nothrow_constructible<_Tp>
+ : public integral_constant<bool, __is_nothrow_constructible(_Tp)>
{};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
-inline constexpr bool is_nothrow_default_constructible_v = is_nothrow_default_constructible<_Tp>::value;
+inline constexpr bool is_nothrow_default_constructible_v = __is_nothrow_constructible(_Tp);
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_destructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_destructible.h
index 4763ae8408..050362f9f4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_destructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_destructible.h
@@ -10,7 +10,6 @@
#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_H
#include <__config>
-#include <__type_traits/add_const.h>
#include <__type_traits/integral_constant.h>
#include <__type_traits/is_destructible.h>
#include <__type_traits/is_reference.h>
@@ -72,7 +71,7 @@ template <class _Tp> struct __libcpp_nothrow_destructor
is_reference<_Tp>::value> {};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
- : public __libcpp_nothrow_destructor<typename remove_all_extents<_Tp>::type> {};
+ : public __libcpp_nothrow_destructor<__remove_all_extents_t<_Tp> > {};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[]>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_move_assignable.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_move_assignable.h
index 44cea1f9cd..18dcc9b232 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_move_assignable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_move_assignable.h
@@ -13,7 +13,6 @@
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_rvalue_reference.h>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/is_nothrow_assignable.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -21,10 +20,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable
- : public is_nothrow_assignable<typename add_lvalue_reference<_Tp>::type,
- typename add_rvalue_reference<_Tp>::type>
- {};
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable
+ : public integral_constant<
+ bool,
+ __is_nothrow_assignable(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {
+};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_move_constructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_move_constructible.h
index e3b1171a48..ad8222a0e4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_move_constructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_nothrow_move_constructible.h
@@ -20,10 +20,21 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+// TODO: remove this implementation once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 is fixed
+#ifndef _LIBCPP_COMPILER_GCC
+
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
+ : public integral_constant<bool, __is_nothrow_constructible(_Tp, __add_rvalue_reference_t<_Tp>)>
+ {};
+
+#else // _LIBCPP_COMPILER_GCC
+
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
- : public is_nothrow_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
+ : public is_nothrow_constructible<_Tp, __add_rvalue_reference_t<_Tp> >
{};
+#endif // _LIBCPP_COMPILER_GCC
+
#if _LIBCPP_STD_VER > 14
template <class _Tp>
inline constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_null_pointer.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_null_pointer.h
index f81cb9aadb..4864cee11a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_null_pointer.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_null_pointer.h
@@ -24,11 +24,11 @@ template <class _Tp> struct __is_nullptr_t_impl : public false_type {};
template <> struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS __is_nullptr_t
- : public __is_nullptr_t_impl<typename remove_cv<_Tp>::type> {};
+ : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {};
#if _LIBCPP_STD_VER > 11
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_null_pointer
- : public __is_nullptr_t_impl<typename remove_cv<_Tp>::type> {};
+ : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_pod.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_pod.h
index 497060e005..c1d00b269f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_pod.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_pod.h
@@ -18,24 +18,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if __has_builtin(__is_pod)
-
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pod
: public integral_constant<bool, __is_pod(_Tp)> {};
-#else
-
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pod
- : public integral_constant<bool, is_trivially_default_constructible<_Tp>::value &&
- is_trivially_copy_constructible<_Tp>::value &&
- is_trivially_copy_assignable<_Tp>::value &&
- is_trivially_destructible<_Tp>::value> {};
-
-#endif // __has_builtin(__is_pod)
-
#if _LIBCPP_STD_VER > 14
template <class _Tp>
-inline constexpr bool is_pod_v = is_pod<_Tp>::value;
+inline constexpr bool is_pod_v = __is_pod(_Tp);
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_pointer.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_pointer.h
index 0da82123ef..b7bc14f2af 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_pointer.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_pointer.h
@@ -43,7 +43,7 @@ template <class _Tp> struct __libcpp_remove_objc_qualifiers<_Tp __unsafe_unretai
#endif
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pointer
- : public __libcpp_is_pointer<typename __libcpp_remove_objc_qualifiers<typename remove_cv<_Tp>::type>::type> {};
+ : public __libcpp_is_pointer<typename __libcpp_remove_objc_qualifiers<__remove_cv_t<_Tp> >::type> {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_reference_wrapper.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_reference_wrapper.h
index cd391bb07e..d187eec1e1 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_reference_wrapper.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_reference_wrapper.h
@@ -24,7 +24,7 @@ template <class _Tp> class _LIBCPP_TEMPLATE_VIS reference_wrapper;
template <class _Tp> struct __is_reference_wrapper_impl : public false_type {};
template <class _Tp> struct __is_reference_wrapper_impl<reference_wrapper<_Tp> > : public true_type {};
template <class _Tp> struct __is_reference_wrapper
- : public __is_reference_wrapper_impl<typename remove_cv<_Tp>::type> {};
+ : public __is_reference_wrapper_impl<__remove_cv_t<_Tp> > {};
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_referenceable.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_referenceable.h
index b97631cc39..4b34ec2572 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_referenceable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_referenceable.h
@@ -19,14 +19,22 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-struct __is_referenceable_impl {
- template <class _Tp> static _Tp& __test(int);
- template <class _Tp> static false_type __test(...);
+#if __has_builtin(__is_referenceable)
+template <class _Tp>
+struct __libcpp_is_referenceable : integral_constant<bool, __is_referenceable(_Tp)> {};
+#else
+struct __libcpp_is_referenceable_impl {
+ template <class _Tp>
+ static _Tp& __test(int);
+ template <class _Tp>
+ static false_type __test(...);
};
template <class _Tp>
-struct __is_referenceable : integral_constant<bool,
- _IsNotSame<decltype(__is_referenceable_impl::__test<_Tp>(0)), false_type>::value> {};
+struct __libcpp_is_referenceable
+ : integral_constant<bool, _IsNotSame<decltype(__libcpp_is_referenceable_impl::__test<_Tp>(0)), false_type>::value> {
+};
+#endif // __has_builtin(__is_referenceable)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_standard_layout.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_standard_layout.h
index 0d8b5f480f..12c1712748 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_standard_layout.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_standard_layout.h
@@ -19,16 +19,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_standard_layout
-#if __has_builtin(__is_standard_layout)
: public integral_constant<bool, __is_standard_layout(_Tp)>
-#else
- : integral_constant<bool, is_scalar<typename remove_all_extents<_Tp>::type>::value>
-#endif
{};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
-inline constexpr bool is_standard_layout_v = is_standard_layout<_Tp>::value;
+inline constexpr bool is_standard_layout_v = __is_standard_layout(_Tp);
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_swappable.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_swappable.h
new file mode 100644
index 0000000000..a131182282
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_swappable.h
@@ -0,0 +1,165 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TYPE_TRAITS_IS_SWAPPABLE_H
+#define _LIBCPP___TYPE_TRAITS_IS_SWAPPABLE_H
+
+#include <__config>
+#include <__type_traits/add_lvalue_reference.h>
+#include <__type_traits/conditional.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/is_move_assignable.h>
+#include <__type_traits/is_move_constructible.h>
+#include <__type_traits/is_nothrow_move_assignable.h>
+#include <__type_traits/is_nothrow_move_constructible.h>
+#include <__type_traits/is_referenceable.h>
+#include <__type_traits/is_same.h>
+#include <__type_traits/is_void.h>
+#include <__type_traits/nat.h>
+#include <__utility/declval.h>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _Tp> struct __is_swappable;
+template <class _Tp> struct __is_nothrow_swappable;
+
+
+#ifndef _LIBCPP_CXX03_LANG
+template <class _Tp>
+using __swap_result_t = typename enable_if<is_move_constructible<_Tp>::value && is_move_assignable<_Tp>::value>::type;
+#else
+template <class>
+using __swap_result_t = void;
+#endif
+
+template <class _Tp>
+inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20 __swap_result_t<_Tp>
+swap(_Tp& __x, _Tp& __y) _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value &&
+ is_nothrow_move_assignable<_Tp>::value);
+
+template<class _Tp, size_t _Np>
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
+typename enable_if<
+ __is_swappable<_Tp>::value
+>::type
+swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value);
+
+namespace __detail
+{
+// ALL generic swap overloads MUST already have a declaration available at this point.
+
+template <class _Tp, class _Up = _Tp,
+ bool _NotVoid = !is_void<_Tp>::value && !is_void<_Up>::value>
+struct __swappable_with
+{
+ template <class _LHS, class _RHS>
+ static decltype(swap(declval<_LHS>(), declval<_RHS>()))
+ __test_swap(int);
+ template <class, class>
+ static __nat __test_swap(long);
+
+ // Extra parens are needed for the C++03 definition of decltype.
+ typedef decltype((__test_swap<_Tp, _Up>(0))) __swap1;
+ typedef decltype((__test_swap<_Up, _Tp>(0))) __swap2;
+
+ static const bool value = _IsNotSame<__swap1, __nat>::value
+ && _IsNotSame<__swap2, __nat>::value;
+};
+
+template <class _Tp, class _Up>
+struct __swappable_with<_Tp, _Up, false> : false_type {};
+
+template <class _Tp, class _Up = _Tp, bool _Swappable = __swappable_with<_Tp, _Up>::value>
+struct __nothrow_swappable_with {
+ static const bool value =
+#ifndef _LIBCPP_HAS_NO_NOEXCEPT
+ noexcept(swap(declval<_Tp>(), declval<_Up>()))
+ && noexcept(swap(declval<_Up>(), declval<_Tp>()));
+#else
+ false;
+#endif
+};
+
+template <class _Tp, class _Up>
+struct __nothrow_swappable_with<_Tp, _Up, false> : false_type {};
+
+} // namespace __detail
+
+template <class _Tp>
+struct __is_swappable
+ : public integral_constant<bool, __detail::__swappable_with<_Tp&>::value>
+{
+};
+
+template <class _Tp>
+struct __is_nothrow_swappable
+ : public integral_constant<bool, __detail::__nothrow_swappable_with<_Tp&>::value>
+{
+};
+
+#if _LIBCPP_STD_VER > 14
+
+template <class _Tp, class _Up>
+struct _LIBCPP_TEMPLATE_VIS is_swappable_with
+ : public integral_constant<bool, __detail::__swappable_with<_Tp, _Up>::value>
+{
+};
+
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS is_swappable
+ : public __conditional_t<
+ __libcpp_is_referenceable<_Tp>::value,
+ is_swappable_with<
+ __add_lvalue_reference_t<_Tp>,
+ __add_lvalue_reference_t<_Tp> >,
+ false_type
+ >
+{
+};
+
+template <class _Tp, class _Up>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable_with
+ : public integral_constant<bool, __detail::__nothrow_swappable_with<_Tp, _Up>::value>
+{
+};
+
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable
+ : public __conditional_t<
+ __libcpp_is_referenceable<_Tp>::value,
+ is_nothrow_swappable_with<
+ __add_lvalue_reference_t<_Tp>,
+ __add_lvalue_reference_t<_Tp> >,
+ false_type
+ >
+{
+};
+
+template <class _Tp, class _Up>
+inline constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value;
+
+template <class _Tp>
+inline constexpr bool is_swappable_v = is_swappable<_Tp>::value;
+
+template <class _Tp, class _Up>
+inline constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_Tp, _Up>::value;
+
+template <class _Tp>
+inline constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value;
+
+#endif // _LIBCPP_STD_VER > 14
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TYPE_TRAITS_IS_SWAPPABLE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivial.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivial.h
index 73c2093d40..840770d7b7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivial.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivial.h
@@ -19,17 +19,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivial
-#if __has_builtin(__is_trivial)
: public integral_constant<bool, __is_trivial(_Tp)>
-#else
- : integral_constant<bool, is_trivially_copyable<_Tp>::value &&
- is_trivially_default_constructible<_Tp>::value>
-#endif
{};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
-inline constexpr bool is_trivial_v = is_trivial<_Tp>::value;
+inline constexpr bool is_trivial_v = __is_trivial(_Tp);
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_assignable.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_assignable.h
index 01540f959e..9ef101f04e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_assignable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_assignable.h
@@ -25,7 +25,7 @@ struct is_trivially_assignable
#if _LIBCPP_STD_VER > 14
template <class _Tp, class _Arg>
-inline constexpr bool is_trivially_assignable_v = is_trivially_assignable<_Tp, _Arg>::value;
+inline constexpr bool is_trivially_assignable_v = __is_trivially_assignable(_Tp, _Arg);
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_constructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_constructible.h
index 92ea58005f..4173e3b4cf 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_constructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_constructible.h
@@ -26,7 +26,7 @@ struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible
#if _LIBCPP_STD_VER > 14
template <class _Tp, class... _Args>
-inline constexpr bool is_trivially_constructible_v = is_trivially_constructible<_Tp, _Args...>::value;
+inline constexpr bool is_trivially_constructible_v = __is_trivially_constructible(_Tp, _Args...);
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copy_assignable.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copy_assignable.h
index 066d763884..e6a4a35dbf 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copy_assignable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copy_assignable.h
@@ -13,7 +13,6 @@
#include <__type_traits/add_const.h>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/is_trivially_assignable.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -21,9 +20,13 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_assignable
- : public is_trivially_assignable<typename add_lvalue_reference<_Tp>::type,
- typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_assignable
+ : public integral_constant<
+ bool,
+ __is_trivially_assignable(
+ __add_lvalue_reference_t<_Tp>,
+ __add_lvalue_reference_t<typename add_const<_Tp>::type>)> {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copy_constructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copy_constructible.h
index e0c054d775..4bbb803a55 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copy_constructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copy_constructible.h
@@ -12,7 +12,6 @@
#include <__config>
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/is_trivially_constructible.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -21,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_constructible
- : public is_trivially_constructible<_Tp, typename add_lvalue_reference<const _Tp>::type>
+ : public integral_constant<bool, __is_trivially_constructible(_Tp, __add_lvalue_reference_t<const _Tp>)>
{};
#if _LIBCPP_STD_VER > 14
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copyable.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copyable.h
index 3b76652172..ef118bf9c4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copyable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_copyable.h
@@ -24,7 +24,7 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copyable
#if _LIBCPP_STD_VER > 14
template <class _Tp>
-inline constexpr bool is_trivially_copyable_v = is_trivially_copyable<_Tp>::value;
+inline constexpr bool is_trivially_copyable_v = __is_trivially_copyable(_Tp);
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_default_constructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_default_constructible.h
index 822fa9c910..5c53bd55d9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_default_constructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_default_constructible.h
@@ -11,7 +11,6 @@
#include <__config>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/is_trivially_constructible.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -20,12 +19,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_default_constructible
- : public is_trivially_constructible<_Tp>
+ : public integral_constant<bool, __is_trivially_constructible(_Tp)>
{};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
-inline constexpr bool is_trivially_default_constructible_v = is_trivially_default_constructible<_Tp>::value;
+inline constexpr bool is_trivially_default_constructible_v = __is_trivially_constructible(_Tp);
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_destructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_destructible.h
index e1db6ed8eb..2d1c28bd31 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_destructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_destructible.h
@@ -30,15 +30,7 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible
#else
-template <class _Tp> struct __libcpp_trivial_destructor
- : public integral_constant<bool, is_scalar<_Tp>::value ||
- is_reference<_Tp>::value> {};
-
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible
- : public __libcpp_trivial_destructor<typename remove_all_extents<_Tp>::type> {};
-
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible<_Tp[]>
- : public false_type {};
+#error is_trivially_destructible is not implemented
#endif // __has_builtin(__is_trivially_destructible)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_move_assignable.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_move_assignable.h
index fc033a40de..8f8876f45a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_move_assignable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_move_assignable.h
@@ -13,7 +13,6 @@
#include <__type_traits/add_lvalue_reference.h>
#include <__type_traits/add_rvalue_reference.h>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/is_trivially_assignable.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -21,10 +20,11 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_move_assignable
- : public is_trivially_assignable<typename add_lvalue_reference<_Tp>::type,
- typename add_rvalue_reference<_Tp>::type>
- {};
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS is_trivially_move_assignable
+ : public integral_constant<
+ bool,
+ __is_trivially_assignable(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_move_constructible.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_move_constructible.h
index be005cc264..151bb256b9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_move_constructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_trivially_move_constructible.h
@@ -12,7 +12,6 @@
#include <__config>
#include <__type_traits/add_rvalue_reference.h>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/is_trivially_constructible.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -20,9 +19,9 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_move_constructible
- : public is_trivially_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
- {};
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS is_trivially_move_constructible
+ : public integral_constant<bool, __is_trivially_constructible(_Tp, __add_rvalue_reference_t<_Tp>)> {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_union.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_union.h
index 3e8cffe034..998aedd142 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_union.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_union.h
@@ -11,7 +11,6 @@
#include <__config>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/remove_cv.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_unsigned.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_unsigned.h
index a12b9e3ad6..ee834d76e3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_unsigned.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_unsigned.h
@@ -20,8 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-// Before AppleClang 14, __is_unsigned returned true for enums with signed underlying type.
-#if __has_builtin(__is_unsigned) && !(defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 1400) && !defined(__CUDACC__)
+#if __has_builtin(__is_unsigned) && !defined(__CUDACC__)
template<class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_unsigned : _BoolConstant<__is_unsigned(_Tp)> { };
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_void.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_void.h
index 9f45e4929f..a82c2cb442 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_void.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/is_void.h
@@ -31,7 +31,7 @@ inline constexpr bool is_void_v = __is_void(_Tp);
#else
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_void
- : public is_same<typename remove_cv<_Tp>::type, void> {};
+ : public is_same<__remove_cv_t<_Tp>, void> {};
#if _LIBCPP_STD_VER > 14
template <class _Tp>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/make_const_lvalue_ref.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/make_const_lvalue_ref.h
new file mode 100644
index 0000000000..deea40d5e6
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/make_const_lvalue_ref.h
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TYPE_TRAITS_MAKE_CONST_LVALUE_REF_H
+#define _LIBCPP___TYPE_TRAITS_MAKE_CONST_LVALUE_REF_H
+
+#include <__config>
+#include <__type_traits/remove_reference.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template<class _Tp>
+using __make_const_lvalue_ref = const __libcpp_remove_reference_t<_Tp>&;
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TYPE_TRAITS_MAKE_CONST_LVALUE_REF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/make_signed.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/make_signed.h
index fbc31172a9..bff8744845 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/make_signed.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/make_signed.h
@@ -23,19 +23,25 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#if __has_builtin(__make_signed)
+
+template <class _Tp>
+using __make_signed_t = __make_signed(_Tp);
+
+#else
typedef
__type_list<signed char,
__type_list<signed short,
__type_list<signed int,
__type_list<signed long,
__type_list<signed long long,
-#ifndef _LIBCPP_HAS_NO_INT128
+# ifndef _LIBCPP_HAS_NO_INT128
__type_list<__int128_t,
-#endif
+# endif
__nat
-#ifndef _LIBCPP_HAS_NO_INT128
+# ifndef _LIBCPP_HAS_NO_INT128
>
-#endif
+# endif
> > > > > __signed_types;
template <class _Tp, bool = is_integral<_Tp>::value || is_enum<_Tp>::value>
@@ -56,19 +62,23 @@ template <> struct __make_signed< signed long, true> {typedef long ty
template <> struct __make_signed<unsigned long, true> {typedef long type;};
template <> struct __make_signed< signed long long, true> {typedef long long type;};
template <> struct __make_signed<unsigned long long, true> {typedef long long type;};
-#ifndef _LIBCPP_HAS_NO_INT128
+# ifndef _LIBCPP_HAS_NO_INT128
template <> struct __make_signed<__int128_t, true> {typedef __int128_t type;};
template <> struct __make_signed<__uint128_t, true> {typedef __int128_t type;};
-#endif
+# endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS make_signed
-{
- typedef typename __apply_cv<_Tp, typename __make_signed<typename remove_cv<_Tp>::type>::type>::type type;
+using __make_signed_t = typename __apply_cv<_Tp, typename __make_signed<__remove_cv_t<_Tp> >::type>::type;
+
+#endif // __has_builtin(__make_signed)
+
+template <class _Tp>
+struct make_signed {
+ using type _LIBCPP_NODEBUG = __make_signed_t<_Tp>;
};
#if _LIBCPP_STD_VER > 11
-template <class _Tp> using make_signed_t = typename make_signed<_Tp>::type;
+template <class _Tp> using make_signed_t = __make_signed_t<_Tp>;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/make_unsigned.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/make_unsigned.h
index 8110a5ca96..33c30147a6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/make_unsigned.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/make_unsigned.h
@@ -25,19 +25,25 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#if __has_builtin(__make_unsigned)
+
+template <class _Tp>
+using __make_unsigned_t = __make_unsigned(_Tp);
+
+#else
typedef
__type_list<unsigned char,
__type_list<unsigned short,
__type_list<unsigned int,
__type_list<unsigned long,
__type_list<unsigned long long,
-#ifndef _LIBCPP_HAS_NO_INT128
+# ifndef _LIBCPP_HAS_NO_INT128
__type_list<__uint128_t,
-#endif
+# endif
__nat
-#ifndef _LIBCPP_HAS_NO_INT128
+# ifndef _LIBCPP_HAS_NO_INT128
>
-#endif
+# endif
> > > > > __unsigned_types;
template <class _Tp, bool = is_integral<_Tp>::value || is_enum<_Tp>::value>
@@ -58,31 +64,35 @@ template <> struct __make_unsigned< signed long, true> {typedef unsigned l
template <> struct __make_unsigned<unsigned long, true> {typedef unsigned long type;};
template <> struct __make_unsigned< signed long long, true> {typedef unsigned long long type;};
template <> struct __make_unsigned<unsigned long long, true> {typedef unsigned long long type;};
-#ifndef _LIBCPP_HAS_NO_INT128
+# ifndef _LIBCPP_HAS_NO_INT128
template <> struct __make_unsigned<__int128_t, true> {typedef __uint128_t type;};
template <> struct __make_unsigned<__uint128_t, true> {typedef __uint128_t type;};
-#endif
+# endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS make_unsigned
-{
- typedef typename __apply_cv<_Tp, typename __make_unsigned<typename remove_cv<_Tp>::type>::type>::type type;
+using __make_unsigned_t = typename __apply_cv<_Tp, typename __make_unsigned<__remove_cv_t<_Tp> >::type>::type;
+
+#endif // __has_builtin(__make_unsigned)
+
+template <class _Tp>
+struct make_unsigned {
+ using type _LIBCPP_NODEBUG = __make_unsigned_t<_Tp>;
};
#if _LIBCPP_STD_VER > 11
-template <class _Tp> using make_unsigned_t = typename make_unsigned<_Tp>::type;
+template <class _Tp> using make_unsigned_t = __make_unsigned_t<_Tp>;
#endif
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp>
_LIBCPP_HIDE_FROM_ABI constexpr
-typename make_unsigned<_Tp>::type __to_unsigned_like(_Tp __x) noexcept {
- return static_cast<typename make_unsigned<_Tp>::type>(__x);
+__make_unsigned_t<_Tp> __to_unsigned_like(_Tp __x) noexcept {
+ return static_cast<__make_unsigned_t<_Tp> >(__x);
}
#endif
template <class _Tp, class _Up>
-using __copy_unsigned_t = __conditional_t<is_unsigned<_Tp>::value, typename make_unsigned<_Up>::type, _Up>;
+using __copy_unsigned_t = __conditional_t<is_unsigned<_Tp>::value, __make_unsigned_t<_Up>, _Up>;
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/maybe_const.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/maybe_const.h
new file mode 100644
index 0000000000..8403f6aba7
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/maybe_const.h
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TYPE_TRAITS_MAYBE_CONST_H
+#define _LIBCPP___TYPE_TRAITS_MAYBE_CONST_H
+
+#include <__config>
+#include <__type_traits/conditional.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template<bool _Const, class _Tp>
+using __maybe_const = __conditional_t<_Const, const _Tp, _Tp>;
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TYPE_TRAITS_MAYBE_CONST_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/negation.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/negation.h
index 92f205fb83..b72f285a4d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/negation.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/negation.h
@@ -25,7 +25,7 @@ struct _Not : _BoolConstant<!_Pred::value> {};
template <class _Tp>
struct negation : _Not<_Tp> {};
template<class _Tp>
-inline constexpr bool negation_v = negation<_Tp>::value;
+inline constexpr bool negation_v = !_Tp::value;
#endif // _LIBCPP_STD_VER > 14
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/noexcept_move_assign_container.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/noexcept_move_assign_container.h
new file mode 100644
index 0000000000..35b0e51ba4
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/noexcept_move_assign_container.h
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TYPE_TRAITS_NOEXCEPT_MOVE_ASSIGN_CONTAINER_H
+#define _LIBCPP___TYPE_TRAITS_NOEXCEPT_MOVE_ASSIGN_CONTAINER_H
+
+#include <__config>
+#include <__memory/allocator_traits.h>
+#include <__type_traits/integral_constant.h>
+#include <__type_traits/is_nothrow_move_assignable.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <typename _Alloc, typename _Traits=allocator_traits<_Alloc> >
+struct __noexcept_move_assign_container : public integral_constant<bool,
+ _Traits::propagate_on_container_move_assignment::value
+#if _LIBCPP_STD_VER > 14
+ || _Traits::is_always_equal::value
+#else
+ && is_nothrow_move_assignable<_Alloc>::value
+#endif
+ > {};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TYPE_TRAITS_NOEXCEPT_MOVE_ASSIGN_CONTAINER_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/promote.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/promote.h
index a9226a74b3..e647dff469 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/promote.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/promote.h
@@ -33,6 +33,10 @@ struct __numeric_type
static double __test(unsigned long);
static double __test(long long);
static double __test(unsigned long long);
+#ifndef _LIBCPP_HAS_NO_INT128
+ static double __test(__int128_t);
+ static double __test(__uint128_t);
+#endif
static double __test(double);
static long double __test(long double);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/rank.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/rank.h
index 193d3fd129..9950907b22 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/rank.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/rank.h
@@ -19,6 +19,14 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+// TODO: Enable using the builtin __array_rank when https://llvm.org/PR57133 is resolved
+#if __has_builtin(__array_rank) && 0
+
+template <class _Tp>
+struct rank : integral_constant<size_t, __array_rank(_Tp)> {};
+
+#else
+
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS rank
: public integral_constant<size_t, 0> {};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS rank<_Tp[]>
@@ -26,6 +34,8 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS rank<_Tp[]>
template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS rank<_Tp[_Np]>
: public integral_constant<size_t, rank<_Tp>::value + 1> {};
+#endif // __has_builtin(__array_rank)
+
#if _LIBCPP_STD_VER > 14
template <class _Tp>
inline constexpr size_t rank_v = rank<_Tp>::value;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_all_extents.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_all_extents.h
index 075e3acabb..868cf1039f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_all_extents.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_all_extents.h
@@ -18,6 +18,15 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#if __has_builtin(__remove_all_extents)
+template <class _Tp>
+struct remove_all_extents {
+ using type _LIBCPP_NODEBUG = __remove_all_extents(_Tp);
+};
+
+template <class _Tp>
+using __remove_all_extents_t = __remove_all_extents(_Tp);
+#else
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_all_extents
{typedef _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[]>
@@ -25,8 +34,12 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[]>
template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[_Np]>
{typedef typename remove_all_extents<_Tp>::type type;};
+template <class _Tp>
+using __remove_all_extents_t = typename remove_all_extents<_Tp>::type;
+#endif // __has_builtin(__remove_all_extents)
+
#if _LIBCPP_STD_VER > 11
-template <class _Tp> using remove_all_extents_t = typename remove_all_extents<_Tp>::type;
+template <class _Tp> using remove_all_extents_t = __remove_all_extents_t<_Tp>;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_const.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_const.h
index 8efc893e96..dc56533854 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_const.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_const.h
@@ -17,10 +17,24 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#if __has_builtin(__remove_const)
+template <class _Tp>
+struct remove_const {
+ using type _LIBCPP_NODEBUG = __remove_const(_Tp);
+};
+
+template <class _Tp>
+using __remove_const_t = __remove_const(_Tp);
+#else
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_const {typedef _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_const<const _Tp> {typedef _Tp type;};
+
+template <class _Tp>
+using __remove_const_t = typename remove_const<_Tp>::type;
+#endif // __has_builtin(__remove_const)
+
#if _LIBCPP_STD_VER > 11
-template <class _Tp> using remove_const_t = typename remove_const<_Tp>::type;
+template <class _Tp> using remove_const_t = __remove_const_t<_Tp>;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_const_ref.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_const_ref.h
new file mode 100644
index 0000000000..d3b334935a
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_const_ref.h
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_CONST_REF_H
+#define _LIBCPP___TYPE_TRAITS_REMOVE_CONST_REF_H
+
+#include <__config>
+#include <__type_traits/remove_const.h>
+#include <__type_traits/remove_reference.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _Tp>
+using __remove_const_ref_t = __remove_const_t<__libcpp_remove_reference_t<_Tp> >;
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TYPE_TRAITS_REMOVE_CONST_REF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_cv.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_cv.h
index ce1e4e45c6..ea85e23b80 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_cv.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_cv.h
@@ -19,10 +19,24 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#if __has_builtin(__remove_cv)
+template <class _Tp>
+struct remove_cv {
+ using type _LIBCPP_NODEBUG = __remove_cv(_Tp);
+};
+
+template <class _Tp>
+using __remove_cv_t = __remove_cv(_Tp);
+#else
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
-{typedef typename remove_volatile<typename remove_const<_Tp>::type>::type type;};
+{typedef __remove_volatile_t<__remove_const_t<_Tp> > type;};
+
+template <class _Tp>
+using __remove_cv_t = __remove_volatile_t<__remove_const_t<_Tp> >;
+#endif // __has_builtin(__remove_cv)
+
#if _LIBCPP_STD_VER > 11
-template <class _Tp> using remove_cv_t = typename remove_cv<_Tp>::type;
+template <class _Tp> using remove_cv_t = __remove_cv_t<_Tp>;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_cvref.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_cvref.h
index 4ebbe1c47d..a654398592 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_cvref.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_cvref.h
@@ -20,21 +20,25 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#if __has_builtin(__remove_cvref) && !defined(__CUDACC__)
template <class _Tp>
-using __uncvref_t _LIBCPP_NODEBUG = typename remove_cv<typename remove_reference<_Tp>::type>::type;
+using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp);
+#else
+template <class _Tp>
+using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cv_t<__libcpp_remove_reference_t<_Tp> >;
+#endif // __has_builtin(__remove_cvref)
template <class _Tp, class _Up>
-struct __is_same_uncvref : _IsSame<__uncvref_t<_Tp>, __uncvref_t<_Up> > {};
+struct __is_same_uncvref : _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> > {};
// C++20, enabled for C++17 in Arcadia
#if _LIBCPP_STD_VER > 14
-// remove_cvref - same as __uncvref
template <class _Tp>
struct remove_cvref {
- using type _LIBCPP_NODEBUG = __uncvref_t<_Tp>;
+ using type _LIBCPP_NODEBUG = __remove_cvref_t<_Tp>;
};
-template <class _Tp> using remove_cvref_t = typename remove_cvref<_Tp>::type;
+template <class _Tp> using remove_cvref_t = __remove_cvref_t<_Tp>;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_extent.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_extent.h
index e353de3616..79d6e573dd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_extent.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_extent.h
@@ -18,6 +18,15 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#if __has_builtin(__remove_extent)
+template <class _Tp>
+struct remove_extent {
+ using type _LIBCPP_NODEBUG = __remove_extent(_Tp);
+};
+
+template <class _Tp>
+using __remove_extent_t = __remove_extent(_Tp);
+#else
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_extent
{typedef _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[]>
@@ -25,8 +34,12 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[]>
template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[_Np]>
{typedef _Tp type;};
+template <class _Tp>
+using __remove_extent_t = typename remove_extent<_Tp>::type;
+#endif // __has_builtin(__remove_extent)
+
#if _LIBCPP_STD_VER > 11
-template <class _Tp> using remove_extent_t = typename remove_extent<_Tp>::type;
+template <class _Tp> using remove_extent_t = __remove_extent_t<_Tp>;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_pointer.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_pointer.h
index 50cde38294..33ddb7103f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_pointer.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_pointer.h
@@ -17,14 +17,27 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#if __has_builtin(__remove_pointer)
+template <class _Tp>
+struct remove_pointer {
+ using type _LIBCPP_NODEBUG = __remove_pointer(_Tp);
+};
+
+template <class _Tp>
+using __remove_pointer_t = __remove_pointer(_Tp);
+#else
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer {typedef _LIBCPP_NODEBUG _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp*> {typedef _LIBCPP_NODEBUG _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const> {typedef _LIBCPP_NODEBUG _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* volatile> {typedef _LIBCPP_NODEBUG _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const volatile> {typedef _LIBCPP_NODEBUG _Tp type;};
+template <class _Tp>
+using __remove_pointer_t = typename remove_pointer<_Tp>::type;
+#endif // __has_builtin(__remove_pointer)
+
#if _LIBCPP_STD_VER > 11
-template <class _Tp> using remove_pointer_t = typename remove_pointer<_Tp>::type;
+template <class _Tp> using remove_pointer_t = __remove_pointer_t<_Tp>;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_reference.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_reference.h
index a69e48dc58..b9a69749b3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_reference.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_reference.h
@@ -18,12 +18,25 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#if __has_builtin(__remove_reference_t)
+template <class _Tp>
+struct remove_reference {
+ using type _LIBCPP_NODEBUG = __remove_reference_t(_Tp);
+};
+
+template <class _Tp>
+using __libcpp_remove_reference_t = __remove_reference_t(_Tp);
+#else
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference {typedef _LIBCPP_NODEBUG _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&> {typedef _LIBCPP_NODEBUG _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG _Tp type;};
+template <class _Tp>
+using __libcpp_remove_reference_t = typename remove_reference<_Tp>::type;
+#endif // __has_builtin(__remove_reference_t)
+
#if _LIBCPP_STD_VER > 11
-template <class _Tp> using remove_reference_t = typename remove_reference<_Tp>::type;
+template <class _Tp> using remove_reference_t = __libcpp_remove_reference_t<_Tp>;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_volatile.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_volatile.h
index 79f64c46a2..ed6d63b417 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_volatile.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/remove_volatile.h
@@ -17,10 +17,24 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#if __has_builtin(__remove_volatile)
+template <class _Tp>
+struct remove_volatile {
+ using type _LIBCPP_NODEBUG = __remove_volatile(_Tp);
+};
+
+template <class _Tp>
+using __remove_volatile_t = __remove_volatile(_Tp);
+#else
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_volatile {typedef _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_volatile<volatile _Tp> {typedef _Tp type;};
+
+template <class _Tp>
+using __remove_volatile_t = typename remove_volatile<_Tp>::type;
+#endif // __has_builtin(__remove_volatile)
+
#if _LIBCPP_STD_VER > 11
-template <class _Tp> using remove_volatile_t = typename remove_volatile<_Tp>::type;
+template <class _Tp> using remove_volatile_t = __remove_volatile_t<_Tp>;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/result_of.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/result_of.h
new file mode 100644
index 0000000000..804173e15e
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/result_of.h
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TYPE_TRAITS_RESULT_OF_H
+#define _LIBCPP___TYPE_TRAITS_RESULT_OF_H
+
+#include <__config>
+#include <__functional/invoke.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+// result_of
+
+#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
+template <class _Callable> class _LIBCPP_DEPRECATED_IN_CXX17 result_of;
+
+template <class _Fp, class ..._Args>
+class _LIBCPP_TEMPLATE_VIS result_of<_Fp(_Args...)>
+ : public __invoke_of<_Fp, _Args...>
+{
+};
+
+#if _LIBCPP_STD_VER > 11
+template <class _Tp> using result_of_t _LIBCPP_DEPRECATED_IN_CXX17 = typename result_of<_Tp>::type;
+#endif // _LIBCPP_STD_VER > 11
+#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___TYPE_TRAITS_RESULT_OF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__type_traits/void_t.h b/contrib/libs/cxxsupp/libcxx/include/__type_traits/void_t.h
index a71ab5e4b0..1ed4e43548 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__type_traits/void_t.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__type_traits/void_t.h
@@ -21,8 +21,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class...> using void_t = void;
#endif
-template <class>
-struct __void_t { typedef void type; };
+template <class...>
+using __void_t = void;
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/as_const.h b/contrib/libs/cxxsupp/libcxx/include/__utility/as_const.h
index be7dd8c7cf..e28d7bc1a2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__utility/as_const.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/as_const.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 14
template <class _Tp>
-_LIBCPP_NODISCARD_EXT constexpr add_const_t<_Tp>& as_const(_Tp& __t) noexcept { return __t; }
+_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr add_const_t<_Tp>& as_const(_Tp& __t) noexcept { return __t; }
template <class _Tp>
void as_const(const _Tp&&) = delete;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/convert_to_integral.h b/contrib/libs/cxxsupp/libcxx/include/__utility/convert_to_integral.h
new file mode 100644
index 0000000000..0cc858ad15
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/convert_to_integral.h
@@ -0,0 +1,72 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___UTILITY_CONVERT_TO_INTEGRAL_H
+#define _LIBCPP___UTILITY_CONVERT_TO_INTEGRAL_H
+
+#include <__config>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/is_enum.h>
+#include <__type_traits/is_floating_point.h>
+#include <__type_traits/underlying_type.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+int __convert_to_integral(int __val) { return __val; }
+
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+unsigned __convert_to_integral(unsigned __val) { return __val; }
+
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+long __convert_to_integral(long __val) { return __val; }
+
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+unsigned long __convert_to_integral(unsigned long __val) { return __val; }
+
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+long long __convert_to_integral(long long __val) { return __val; }
+
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+unsigned long long __convert_to_integral(unsigned long long __val) {return __val; }
+
+template<typename _Fp>
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+typename enable_if<is_floating_point<_Fp>::value, long long>::type
+ __convert_to_integral(_Fp __val) { return __val; }
+
+#ifndef _LIBCPP_HAS_NO_INT128
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+__int128_t __convert_to_integral(__int128_t __val) { return __val; }
+
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+__uint128_t __convert_to_integral(__uint128_t __val) { return __val; }
+#endif
+
+template <class _Tp, bool = is_enum<_Tp>::value>
+struct __sfinae_underlying_type
+{
+ typedef typename underlying_type<_Tp>::type type;
+ typedef decltype(((type)1) + 0) __promoted_type;
+};
+
+template <class _Tp>
+struct __sfinae_underlying_type<_Tp, false> {};
+
+template <class _Tp>
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+typename __sfinae_underlying_type<_Tp>::__promoted_type
+__convert_to_integral(_Tp __val) { return __val; }
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___UTILITY_CONVERT_TO_INTEGRAL_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/exchange.h b/contrib/libs/cxxsupp/libcxx/include/__utility/exchange.h
index d9b3c15175..6838fc8c62 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__utility/exchange.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/exchange.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 11
template<class _T1, class _T2 = _T1>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_T1 exchange(_T1& __obj, _T2&& __new_value)
noexcept(is_nothrow_move_constructible<_T1>::value && is_nothrow_assignable<_T1&, _T2>::value)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/forward.h b/contrib/libs/cxxsupp/libcxx/include/__utility/forward.h
index 03ca16d9f9..4e254e0fa0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__utility/forward.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/forward.h
@@ -22,13 +22,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR _Tp&&
-forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT {
+forward(__libcpp_remove_reference_t<_Tp>& __t) _NOEXCEPT {
return static_cast<_Tp&&>(__t);
}
template <class _Tp>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR _Tp&&
-forward(typename remove_reference<_Tp>::type&& __t) _NOEXCEPT {
+forward(__libcpp_remove_reference_t<_Tp>&& __t) _NOEXCEPT {
static_assert(!is_lvalue_reference<_Tp>::value, "cannot forward an rvalue as an lvalue");
return static_cast<_Tp&&>(__t);
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/forward_like.h b/contrib/libs/cxxsupp/libcxx/include/__utility/forward_like.h
new file mode 100644
index 0000000000..1446964da5
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/forward_like.h
@@ -0,0 +1,45 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___UTILITY_FORWARD_LIKE_H
+#define _LIBCPP___UTILITY_FORWARD_LIKE_H
+
+#include <__config>
+#include <__type_traits/conditional.h>
+#include <__type_traits/is_const.h>
+#include <__type_traits/is_reference.h>
+#include <__type_traits/remove_reference.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 20
+
+template <class _Ap, class _Bp>
+using _CopyConst = _If<is_const_v<_Ap>, const _Bp, _Bp>;
+
+template <class _Ap, class _Bp>
+using _OverrideRef = _If<is_rvalue_reference_v<_Ap>, remove_reference_t<_Bp>&&, _Bp&>;
+
+template <class _Ap, class _Bp>
+using _ForwardLike = _OverrideRef<_Ap&&, _CopyConst<remove_reference_t<_Ap>, remove_reference_t<_Bp>>>;
+
+template <class _Tp, class _Up>
+[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto forward_like(_Up&& __ux) noexcept -> _ForwardLike<_Tp, _Up> {
+ return static_cast<_ForwardLike<_Tp, _Up>>(__ux);
+}
+
+#endif // _LIBCPP_STD_VER > 20
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___UTILITY_FORWARD_LIKE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/in_place.h b/contrib/libs/cxxsupp/libcxx/include/__utility/in_place.h
index 7a4973fa04..bedd9e1e00 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__utility/in_place.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/in_place.h
@@ -43,13 +43,13 @@ template <class _Tp> struct __is_inplace_type_imp : false_type {};
template <class _Tp> struct __is_inplace_type_imp<in_place_type_t<_Tp>> : true_type {};
template <class _Tp>
-using __is_inplace_type = __is_inplace_type_imp<__uncvref_t<_Tp>>;
+using __is_inplace_type = __is_inplace_type_imp<__remove_cvref_t<_Tp>>;
template <class _Tp> struct __is_inplace_index_imp : false_type {};
template <size_t _Idx> struct __is_inplace_index_imp<in_place_index_t<_Idx>> : true_type {};
template <class _Tp>
-using __is_inplace_index = __is_inplace_index_imp<__uncvref_t<_Tp>>;
+using __is_inplace_index = __is_inplace_index_imp<__remove_cvref_t<_Tp>>;
#endif // _LIBCPP_STD_VER > 14
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/integer_sequence.h b/contrib/libs/cxxsupp/libcxx/include/__utility/integer_sequence.h
index 633f1333e2..87c76e9d92 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__utility/integer_sequence.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/integer_sequence.h
@@ -18,6 +18,72 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+template <size_t...> struct __tuple_indices;
+
+template <class _IdxType, _IdxType... _Values>
+struct __integer_sequence {
+ template <template <class _OIdxType, _OIdxType...> class _ToIndexSeq, class _ToIndexType>
+ using __convert = _ToIndexSeq<_ToIndexType, _Values...>;
+
+ template <size_t _Sp>
+ using __to_tuple_indices = __tuple_indices<(_Values + _Sp)...>;
+};
+
+#if !__has_builtin(__make_integer_seq) || defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
+
+namespace __detail {
+
+template<typename _Tp, size_t ..._Extra> struct __repeat;
+template<typename _Tp, _Tp ..._Np, size_t ..._Extra> struct __repeat<__integer_sequence<_Tp, _Np...>, _Extra...> {
+ typedef _LIBCPP_NODEBUG __integer_sequence<_Tp,
+ _Np...,
+ sizeof...(_Np) + _Np...,
+ 2 * sizeof...(_Np) + _Np...,
+ 3 * sizeof...(_Np) + _Np...,
+ 4 * sizeof...(_Np) + _Np...,
+ 5 * sizeof...(_Np) + _Np...,
+ 6 * sizeof...(_Np) + _Np...,
+ 7 * sizeof...(_Np) + _Np...,
+ _Extra...> type;
+};
+
+template<size_t _Np> struct __parity;
+template<size_t _Np> struct __make : __parity<_Np % 8>::template __pmake<_Np> {};
+
+template<> struct __make<0> { typedef __integer_sequence<size_t> type; };
+template<> struct __make<1> { typedef __integer_sequence<size_t, 0> type; };
+template<> struct __make<2> { typedef __integer_sequence<size_t, 0, 1> type; };
+template<> struct __make<3> { typedef __integer_sequence<size_t, 0, 1, 2> type; };
+template<> struct __make<4> { typedef __integer_sequence<size_t, 0, 1, 2, 3> type; };
+template<> struct __make<5> { typedef __integer_sequence<size_t, 0, 1, 2, 3, 4> type; };
+template<> struct __make<6> { typedef __integer_sequence<size_t, 0, 1, 2, 3, 4, 5> type; };
+template<> struct __make<7> { typedef __integer_sequence<size_t, 0, 1, 2, 3, 4, 5, 6> type; };
+
+template<> struct __parity<0> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type> {}; };
+template<> struct __parity<1> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 1> {}; };
+template<> struct __parity<2> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 2, _Np - 1> {}; };
+template<> struct __parity<3> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 3, _Np - 2, _Np - 1> {}; };
+template<> struct __parity<4> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
+template<> struct __parity<5> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 5, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
+template<> struct __parity<6> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 6, _Np - 5, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
+template<> struct __parity<7> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 7, _Np - 6, _Np - 5, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
+
+} // namespace detail
+
+#endif
+
+#if __has_builtin(__make_integer_seq)
+template <size_t _Ep, size_t _Sp>
+using __make_indices_imp =
+ typename __make_integer_seq<__integer_sequence, size_t, _Ep - _Sp>::template
+ __to_tuple_indices<_Sp>;
+#else
+template <size_t _Ep, size_t _Sp>
+using __make_indices_imp =
+ typename __detail::__make<_Ep - _Sp>::type::template __to_tuple_indices<_Sp>;
+
+#endif
+
#if _LIBCPP_STD_VER > 11
template<class _Tp, _Tp... _Ip>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/move.h b/contrib/libs/cxxsupp/libcxx/include/__utility/move.h
index da0d986093..522673005b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__utility/move.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/move.h
@@ -20,19 +20,18 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename remove_reference<_Tp>::type&&
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __libcpp_remove_reference_t<_Tp>&&
move(_Tp&& __t) _NOEXCEPT {
- typedef _LIBCPP_NODEBUG typename remove_reference<_Tp>::type _Up;
+ typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tp> _Up;
return static_cast<_Up&&>(__t);
}
template <class _Tp>
using __move_if_noexcept_result_t =
- typename conditional<!is_nothrow_move_constructible<_Tp>::value && is_copy_constructible<_Tp>::value, const _Tp&,
- _Tp&&>::type;
+ __conditional_t<!is_nothrow_move_constructible<_Tp>::value && is_copy_constructible<_Tp>::value, const _Tp&, _Tp&&>;
template <class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 __move_if_noexcept_result_t<_Tp>
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 __move_if_noexcept_result_t<_Tp>
move_if_noexcept(_Tp& __x) _NOEXCEPT {
return _VSTD::move(__x);
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h b/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h
index 97635c2e61..d928689118 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h
@@ -13,7 +13,13 @@
#include <__compare/synth_three_way.h>
#include <__config>
#include <__functional/unwrap_ref.h>
-#include <__tuple>
+#include <__fwd/get.h>
+#include <__fwd/tuple.h>
+#include <__tuple/sfinae_helpers.h>
+#include <__tuple/tuple_element.h>
+#include <__tuple/tuple_indices.h>
+#include <__tuple/tuple_size.h>
+#include <__type_traits/is_implicitly_default_constructible.h>
#include <__utility/forward.h>
#include <__utility/move.h>
#include <__utility/piecewise_construct.h>
@@ -31,7 +37,7 @@ template <class, class>
struct __non_trivially_copyable_base {
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
__non_trivially_copyable_base() _NOEXCEPT {}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__non_trivially_copyable_base(__non_trivially_copyable_base const&) _NOEXCEPT {}
};
#endif
@@ -48,12 +54,8 @@ struct _LIBCPP_TEMPLATE_VIS pair
_T1 first;
_T2 second;
-#if !defined(_LIBCPP_CXX03_LANG)
pair(pair const&) = default;
pair(pair&&) = default;
-#else
- // Use the implicitly declared copy constructor in C++03
-#endif
#ifdef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
@@ -88,20 +90,26 @@ struct _LIBCPP_TEMPLATE_VIS pair
}
template <class _U1, class _U2>
- static constexpr bool __enable_explicit() {
+ static constexpr bool __is_pair_constructible() {
return is_constructible<first_type, _U1>::value
- && is_constructible<second_type, _U2>::value
- && (!is_convertible<_U1, first_type>::value
- || !is_convertible<_U2, second_type>::value);
+ && is_constructible<second_type, _U2>::value;
}
template <class _U1, class _U2>
- static constexpr bool __enable_implicit() {
- return is_constructible<first_type, _U1>::value
- && is_constructible<second_type, _U2>::value
- && is_convertible<_U1, first_type>::value
+ static constexpr bool __is_implicit() {
+ return is_convertible<_U1, first_type>::value
&& is_convertible<_U2, second_type>::value;
}
+
+ template <class _U1, class _U2>
+ static constexpr bool __enable_explicit() {
+ return __is_pair_constructible<_U1, _U2>() && !__is_implicit<_U1, _U2>();
+ }
+
+ template <class _U1, class _U2>
+ static constexpr bool __enable_implicit() {
+ return __is_pair_constructible<_U1, _U2>() && __is_implicit<_U1, _U2>();
+ }
};
template <bool _MaybeEnable>
@@ -127,12 +135,12 @@ struct _LIBCPP_TEMPLATE_VIS pair
};
template <class _Tuple>
- using _CheckTLC _LIBCPP_NODEBUG = typename conditional<
+ using _CheckTLC _LIBCPP_NODEBUG = __conditional_t<
__tuple_like_with_size<_Tuple, 2>::value
&& !is_same<typename decay<_Tuple>::type, pair>::value,
_CheckTupleLikeConstructor,
__check_tuple_constructor_fail
- >::type;
+ >;
template<bool _Dummy = true, typename enable_if<
_CheckArgsDep<_Dummy>::__enable_explicit_default()
@@ -153,7 +161,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
template <bool _Dummy = true, typename enable_if<
_CheckArgsDep<_Dummy>::template __enable_explicit<_T1 const&, _T2 const&>()
>::type* = nullptr>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit pair(_T1 const& __t1, _T2 const& __t2)
_NOEXCEPT_(is_nothrow_copy_constructible<first_type>::value &&
is_nothrow_copy_constructible<second_type>::value)
@@ -162,7 +170,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
template<bool _Dummy = true, typename enable_if<
_CheckArgsDep<_Dummy>::template __enable_implicit<_T1 const&, _T2 const&>()
>::type* = nullptr>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair(_T1 const& __t1, _T2 const& __t2)
_NOEXCEPT_(is_nothrow_copy_constructible<first_type>::value &&
is_nothrow_copy_constructible<second_type>::value)
@@ -176,7 +184,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
#endif
typename enable_if<_CheckArgs::template __enable_explicit<_U1, _U2>()>::type* = nullptr
>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit pair(_U1&& __u1, _U2&& __u2)
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1>::value &&
is_nothrow_constructible<second_type, _U2>::value))
@@ -190,16 +198,27 @@ struct _LIBCPP_TEMPLATE_VIS pair
#endif
typename enable_if<_CheckArgs::template __enable_implicit<_U1, _U2>()>::type* = nullptr
>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair(_U1&& __u1, _U2&& __u2)
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1>::value &&
is_nothrow_constructible<second_type, _U2>::value))
: first(_VSTD::forward<_U1>(__u1)), second(_VSTD::forward<_U2>(__u2)) {}
+#if _LIBCPP_STD_VER > 20
+ template<class _U1, class _U2, __enable_if_t<
+ _CheckArgs::template __is_pair_constructible<_U1&, _U2&>()
+ >* = nullptr>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ explicit(!_CheckArgs::template __is_implicit<_U1&, _U2&>()) pair(pair<_U1, _U2>& __p)
+ noexcept((is_nothrow_constructible<first_type, _U1&>::value &&
+ is_nothrow_constructible<second_type, _U2&>::value))
+ : first(__p.first), second(__p.second) {}
+#endif
+
template<class _U1, class _U2, typename enable_if<
_CheckArgs::template __enable_explicit<_U1 const&, _U2 const&>()
>::type* = nullptr>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit pair(pair<_U1, _U2> const& __p)
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1 const&>::value &&
is_nothrow_constructible<second_type, _U2 const&>::value))
@@ -208,7 +227,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
template<class _U1, class _U2, typename enable_if<
_CheckArgs::template __enable_implicit<_U1 const&, _U2 const&>()
>::type* = nullptr>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair(pair<_U1, _U2> const& __p)
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1 const&>::value &&
is_nothrow_constructible<second_type, _U2 const&>::value))
@@ -217,7 +236,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
template<class _U1, class _U2, typename enable_if<
_CheckArgs::template __enable_explicit<_U1, _U2>()
>::type* = nullptr>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit pair(pair<_U1, _U2>&&__p)
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1&&>::value &&
is_nothrow_constructible<second_type, _U2&&>::value))
@@ -226,16 +245,28 @@ struct _LIBCPP_TEMPLATE_VIS pair
template<class _U1, class _U2, typename enable_if<
_CheckArgs::template __enable_implicit<_U1, _U2>()
>::type* = nullptr>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair(pair<_U1, _U2>&& __p)
_NOEXCEPT_((is_nothrow_constructible<first_type, _U1&&>::value &&
is_nothrow_constructible<second_type, _U2&&>::value))
: first(_VSTD::forward<_U1>(__p.first)), second(_VSTD::forward<_U2>(__p.second)) {}
+#if _LIBCPP_STD_VER > 20
+ template<class _U1, class _U2, __enable_if_t<
+ _CheckArgs::template __is_pair_constructible<const _U1&&, const _U2&&>()
+ >* = nullptr>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ explicit(!_CheckArgs::template __is_implicit<const _U1&&, const _U2&&>())
+ pair(const pair<_U1, _U2>&& __p)
+ noexcept(is_nothrow_constructible<first_type, const _U1&&>::value &&
+ is_nothrow_constructible<second_type, const _U2&&>::value)
+ : first(std::move(__p.first)), second(std::move(__p.second)) {}
+#endif
+
template<class _Tuple, typename enable_if<
_CheckTLC<_Tuple>::template __enable_explicit<_Tuple>()
>::type* = nullptr>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit pair(_Tuple&& __p)
: first(_VSTD::get<0>(_VSTD::forward<_Tuple>(__p))),
second(_VSTD::get<1>(_VSTD::forward<_Tuple>(__p))) {}
@@ -243,13 +274,13 @@ struct _LIBCPP_TEMPLATE_VIS pair
template<class _Tuple, typename enable_if<
_CheckTLC<_Tuple>::template __enable_implicit<_Tuple>()
>::type* = nullptr>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair(_Tuple&& __p)
: first(_VSTD::get<0>(_VSTD::forward<_Tuple>(__p))),
second(_VSTD::get<1>(_VSTD::forward<_Tuple>(__p))) {}
template <class... _Args1, class... _Args2>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
pair(piecewise_construct_t __pc,
tuple<_Args1...> __first_args, tuple<_Args2...> __second_args)
_NOEXCEPT_((is_nothrow_constructible<first_type, _Args1...>::value &&
@@ -258,11 +289,11 @@ struct _LIBCPP_TEMPLATE_VIS pair
typename __make_tuple_indices<sizeof...(_Args1)>::type(),
typename __make_tuple_indices<sizeof...(_Args2) >::type()) {}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
- pair& operator=(typename conditional<
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
+ pair& operator=(__conditional_t<
is_copy_assignable<first_type>::value &&
is_copy_assignable<second_type>::value,
- pair, __nat>::type const& __p)
+ pair, __nat> const& __p)
_NOEXCEPT_(is_nothrow_copy_assignable<first_type>::value &&
is_nothrow_copy_assignable<second_type>::value)
{
@@ -271,11 +302,11 @@ struct _LIBCPP_TEMPLATE_VIS pair
return *this;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
- pair& operator=(typename conditional<
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
+ pair& operator=(__conditional_t<
is_move_assignable<first_type>::value &&
is_move_assignable<second_type>::value,
- pair, __nat>::type&& __p)
+ pair, __nat>&& __p)
_NOEXCEPT_(is_nothrow_move_assignable<first_type>::value &&
is_nothrow_move_assignable<second_type>::value)
{
@@ -284,10 +315,54 @@ struct _LIBCPP_TEMPLATE_VIS pair
return *this;
}
+#if _LIBCPP_STD_VER > 20
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ const pair& operator=(pair const& __p) const
+ noexcept(is_nothrow_copy_assignable_v<const first_type> &&
+ is_nothrow_copy_assignable_v<const second_type>)
+ requires(is_copy_assignable_v<const first_type> &&
+ is_copy_assignable_v<const second_type>) {
+ first = __p.first;
+ second = __p.second;
+ return *this;
+ }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ const pair& operator=(pair&& __p) const
+ noexcept(is_nothrow_assignable_v<const first_type&, first_type> &&
+ is_nothrow_assignable_v<const second_type&, second_type>)
+ requires(is_assignable_v<const first_type&, first_type> &&
+ is_assignable_v<const second_type&, second_type>) {
+ first = std::forward<first_type>(__p.first);
+ second = std::forward<second_type>(__p.second);
+ return *this;
+ }
+
+ template<class _U1, class _U2>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ const pair& operator=(const pair<_U1, _U2>& __p) const
+ requires(is_assignable_v<const first_type&, const _U1&> &&
+ is_assignable_v<const second_type&, const _U2&>) {
+ first = __p.first;
+ second = __p.second;
+ return *this;
+ }
+
+ template<class _U1, class _U2>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ const pair& operator=(pair<_U1, _U2>&& __p) const
+ requires(is_assignable_v<const first_type&, _U1> &&
+ is_assignable_v<const second_type&, _U2>) {
+ first = std::forward<_U1>(__p.first);
+ second = std::forward<_U2>(__p.second);
+ return *this;
+ }
+#endif // _LIBCPP_STD_VER > 20
+
template <class _Tuple, typename enable_if<
_CheckTLC<_Tuple>::template __enable_assign<_Tuple>()
>::type* = nullptr>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
pair& operator=(_Tuple&& __p) {
first = _VSTD::get<0>(_VSTD::forward<_Tuple>(__p));
second = _VSTD::get<1>(_VSTD::forward<_Tuple>(__p));
@@ -295,7 +370,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
}
#endif
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
swap(pair& __p) _NOEXCEPT_(__is_nothrow_swappable<first_type>::value &&
__is_nothrow_swappable<second_type>::value)
@@ -304,11 +379,23 @@ struct _LIBCPP_TEMPLATE_VIS pair
swap(first, __p.first);
swap(second, __p.second);
}
+
+#if _LIBCPP_STD_VER > 20
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ void swap(const pair& __p) const
+ noexcept(__is_nothrow_swappable<const first_type>::value &&
+ __is_nothrow_swappable<const second_type>::value)
+ {
+ using std::swap;
+ swap(first, __p.first);
+ swap(second, __p.second);
+ }
+#endif
private:
#ifndef _LIBCPP_CXX03_LANG
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
pair(piecewise_construct_t,
tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args,
__tuple_indices<_I1...>, __tuple_indices<_I2...>);
@@ -323,7 +410,7 @@ pair(_T1, _T2) -> pair<_T1, _T2>;
// [pairs.spec], specialized algorithms
template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator==(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
{
@@ -348,7 +435,7 @@ operator<=>(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
#else // _LIBCPP_STD_VER > 17
template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator!=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
{
@@ -356,7 +443,7 @@ operator!=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
}
template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator< (const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
{
@@ -364,7 +451,7 @@ operator< (const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
}
template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator> (const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
{
@@ -372,7 +459,7 @@ operator> (const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
}
template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator>=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
{
@@ -380,7 +467,7 @@ operator>=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
}
template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator<=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
{
@@ -406,7 +493,7 @@ struct common_type<pair<_T1, _T2>, pair<_U1, _U2>> {
#endif // _LIBCPP_STD_VER > 20
template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename enable_if
<
__is_swappable<_T1>::value &&
@@ -420,10 +507,20 @@ swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
__x.swap(__y);
}
-#ifndef _LIBCPP_CXX03_LANG
+#if _LIBCPP_STD_VER > 20
+template <class _T1, class _T2>
+ requires (__is_swappable<const _T1>::value &&
+ __is_swappable<const _T2>::value)
+_LIBCPP_HIDE_FROM_ABI constexpr
+void swap(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ noexcept(noexcept(__x.swap(__y)))
+{
+ __x.swap(__y);
+}
+#endif
template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>
make_pair(_T1&& __t1, _T2&& __t2)
{
@@ -431,18 +528,6 @@ make_pair(_T1&& __t1, _T2&& __t2)
(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2));
}
-#else // _LIBCPP_CXX03_LANG
-
-template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY
-pair<_T1,_T2>
-make_pair(_T1 __x, _T2 __y)
-{
- return pair<_T1, _T2>(__x, __y);
-}
-
-#endif // _LIBCPP_CXX03_LANG
-
template <class _T1, class _T2>
struct _LIBCPP_TEMPLATE_VIS tuple_size<pair<_T1, _T2> >
: public integral_constant<size_t, 2> {};
@@ -472,29 +557,27 @@ struct __get_pair<0>
{
template <class _T1, class _T2>
static
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_T1&
get(pair<_T1, _T2>& __p) _NOEXCEPT {return __p.first;}
template <class _T1, class _T2>
static
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _T1&
get(const pair<_T1, _T2>& __p) _NOEXCEPT {return __p.first;}
-#ifndef _LIBCPP_CXX03_LANG
template <class _T1, class _T2>
static
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_T1&&
get(pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward<_T1>(__p.first);}
template <class _T1, class _T2>
static
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _T1&&
get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward<const _T1>(__p.first);}
-#endif // _LIBCPP_CXX03_LANG
};
template <>
@@ -502,33 +585,31 @@ struct __get_pair<1>
{
template <class _T1, class _T2>
static
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_T2&
get(pair<_T1, _T2>& __p) _NOEXCEPT {return __p.second;}
template <class _T1, class _T2>
static
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _T2&
get(const pair<_T1, _T2>& __p) _NOEXCEPT {return __p.second;}
-#ifndef _LIBCPP_CXX03_LANG
template <class _T1, class _T2>
static
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_T2&&
get(pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward<_T2>(__p.second);}
template <class _T1, class _T2>
static
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _T2&&
get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward<const _T2>(__p.second);}
-#endif // _LIBCPP_CXX03_LANG
};
template <size_t _Ip, class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Ip, pair<_T1, _T2> >::type&
get(pair<_T1, _T2>& __p) _NOEXCEPT
{
@@ -536,16 +617,15 @@ get(pair<_T1, _T2>& __p) _NOEXCEPT
}
template <size_t _Ip, class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
get(const pair<_T1, _T2>& __p) _NOEXCEPT
{
return __get_pair<_Ip>::get(__p);
}
-#ifndef _LIBCPP_CXX03_LANG
template <size_t _Ip, class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
get(pair<_T1, _T2>&& __p) _NOEXCEPT
{
@@ -553,13 +633,12 @@ get(pair<_T1, _T2>&& __p) _NOEXCEPT
}
template <size_t _Ip, class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
get(const pair<_T1, _T2>&& __p) _NOEXCEPT
{
return __get_pair<_Ip>::get(_VSTD::move(__p));
}
-#endif // _LIBCPP_CXX03_LANG
#if _LIBCPP_STD_VER > 11
template <class _T1, class _T2>
@@ -618,7 +697,7 @@ constexpr _T1 const && get(pair<_T2, _T1> const&& __p) _NOEXCEPT
return __get_pair<1>::get(_VSTD::move(__p));
}
-#endif
+#endif // _LIBCPP_STD_VER > 11
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/swap.h b/contrib/libs/cxxsupp/libcxx/include/__utility/swap.h
index f9e7f36678..545614aeca 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__utility/swap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/swap.h
@@ -30,7 +30,7 @@ using __swap_result_t = void;
#endif
template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY __swap_result_t<_Tp> _LIBCPP_CONSTEXPR_AFTER_CXX17 swap(_Tp& __x, _Tp& __y)
+inline _LIBCPP_INLINE_VISIBILITY __swap_result_t<_Tp> _LIBCPP_CONSTEXPR_SINCE_CXX20 swap(_Tp& __x, _Tp& __y)
_NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value&& is_nothrow_move_assignable<_Tp>::value) {
_Tp __t(_VSTD::move(__x));
__x = _VSTD::move(__y);
@@ -38,7 +38,7 @@ inline _LIBCPP_INLINE_VISIBILITY __swap_result_t<_Tp> _LIBCPP_CONSTEXPR_AFTER_CX
}
template <class _Tp, size_t _Np>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if<__is_swappable<_Tp>::value>::type
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 typename enable_if<__is_swappable<_Tp>::value>::type
swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) {
for (size_t __i = 0; __i != _Np; ++__i) {
swap(__a[__i], __b[__i]);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/transaction.h b/contrib/libs/cxxsupp/libcxx/include/__utility/transaction.h
index e2cc438208..dc65c349d1 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__utility/transaction.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/transaction.h
@@ -52,13 +52,13 @@ struct __transaction {
__transaction() = delete;
_LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit __transaction(_Rollback __rollback)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __transaction(_Rollback __rollback)
: __rollback_(_VSTD::move(__rollback))
, __completed_(false)
{ }
_LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_AFTER_CXX17 __transaction(__transaction&& __other)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 __transaction(__transaction&& __other)
_NOEXCEPT_(is_nothrow_move_constructible<_Rollback>::value)
: __rollback_(_VSTD::move(__other.__rollback_))
, __completed_(__other.__completed_)
@@ -71,12 +71,12 @@ struct __transaction {
__transaction& operator=(__transaction&&) = delete;
_LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __complete() _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __complete() _NOEXCEPT {
__completed_ = true;
}
_LIBCPP_HIDE_FROM_ABI
- _LIBCPP_CONSTEXPR_AFTER_CXX17 ~__transaction() {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 ~__transaction() {
if (!__completed_)
__rollback_();
}
@@ -85,6 +85,7 @@ private:
_Rollback __rollback_;
bool __completed_;
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(__transaction);
template <class _Rollback>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __transaction<_Rollback> __make_transaction(_Rollback __rollback) {
diff --git a/contrib/libs/cxxsupp/libcxx/include/__variant/monostate.h b/contrib/libs/cxxsupp/libcxx/include/__variant/monostate.h
index b389c3b56b..b3b4597dd9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__variant/monostate.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__variant/monostate.h
@@ -10,6 +10,7 @@
#ifndef _LIBCPP___VARIANT_MONOSTATE_H
#define _LIBCPP___VARIANT_MONOSTATE_H
+#include <__compare/ordering.h>
#include <__config>
#include <__functional/hash.h>
#include <cstddef>
@@ -24,31 +25,34 @@ _LIBCPP_BEGIN_NAMESPACE_STD
struct _LIBCPP_TEMPLATE_VIS monostate {};
-inline _LIBCPP_INLINE_VISIBILITY
-constexpr bool operator<(monostate, monostate) noexcept { return false; }
+_LIBCPP_HIDE_FROM_ABI constexpr bool operator==(monostate, monostate) noexcept { return true; }
-inline _LIBCPP_INLINE_VISIBILITY
-constexpr bool operator>(monostate, monostate) noexcept { return false; }
+# if _LIBCPP_STD_VER > 17
-inline _LIBCPP_INLINE_VISIBILITY
-constexpr bool operator<=(monostate, monostate) noexcept { return true; }
+_LIBCPP_HIDE_FROM_ABI constexpr strong_ordering operator<=>(monostate, monostate) noexcept {
+ return strong_ordering::equal;
+}
-inline _LIBCPP_INLINE_VISIBILITY
-constexpr bool operator>=(monostate, monostate) noexcept { return true; }
+# else // _LIBCPP_STD_VER > 17
-inline _LIBCPP_INLINE_VISIBILITY
-constexpr bool operator==(monostate, monostate) noexcept { return true; }
+_LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(monostate, monostate) noexcept { return false; }
-inline _LIBCPP_INLINE_VISIBILITY
-constexpr bool operator!=(monostate, monostate) noexcept { return false; }
+_LIBCPP_HIDE_FROM_ABI constexpr bool operator<(monostate, monostate) noexcept { return false; }
+
+_LIBCPP_HIDE_FROM_ABI constexpr bool operator>(monostate, monostate) noexcept { return false; }
+
+_LIBCPP_HIDE_FROM_ABI constexpr bool operator<=(monostate, monostate) noexcept { return true; }
+
+_LIBCPP_HIDE_FROM_ABI constexpr bool operator>=(monostate, monostate) noexcept { return true; }
+
+# endif // _LIBCPP_STD_VER > 17
template <>
struct _LIBCPP_TEMPLATE_VIS hash<monostate> {
using argument_type = monostate;
using result_type = size_t;
- inline _LIBCPP_INLINE_VISIBILITY
- result_type operator()(const argument_type&) const _NOEXCEPT {
+ inline _LIBCPP_HIDE_FROM_ABI result_type operator()(const argument_type&) const _NOEXCEPT {
return 66740831; // return a fundamentally attractive random value.
}
};
diff --git a/contrib/libs/cxxsupp/libcxx/include/__verbose_abort b/contrib/libs/cxxsupp/libcxx/include/__verbose_abort
index 3c9cba824c..fddef4900e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__verbose_abort
+++ b/contrib/libs/cxxsupp/libcxx/include/__verbose_abort
@@ -18,7 +18,7 @@
#endif
// Provide a default implementation of __libcpp_verbose_abort if we know that neither the built
-// library not the user is providing one. Otherwise, just declare it and use the one from the
+// library nor the user is providing one. Otherwise, just declare it and use the one from the
// built library or the one provided by the user.
//
// We can't provide a great implementation because it needs to be pretty much
diff --git a/contrib/libs/cxxsupp/libcxx/include/algorithm b/contrib/libs/cxxsupp/libcxx/include/algorithm
index a2a8a27ddd..85639ec448 100644
--- a/contrib/libs/cxxsupp/libcxx/include/algorithm
+++ b/contrib/libs/cxxsupp/libcxx/include/algorithm
@@ -1709,7 +1709,6 @@ template <class BidirectionalIterator, class Compare>
#include <__debug>
#include <cstddef>
#include <cstring>
-#include <memory>
#include <type_traits>
#include <version>
@@ -1899,13 +1898,9 @@ template <class BidirectionalIterator, class Compare>
#include <__algorithm/unwrap_iter.h>
#include <__algorithm/upper_bound.h>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <chrono>
-# include <iterator>
-# include <utility>
-#endif
-
// standard-mandated includes
+
+// [algorithm.syn]
#include <initializer_list>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -1913,7 +1908,20 @@ template <class BidirectionalIterator, class Compare>
#endif
#if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
-#error # include <__pstl_algorithm>
+#error # include <__pstl_algorithm>
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
+# include <chrono>
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <atomic>
+# include <concepts>
+# include <iterator>
+# include <memory>
+# include <stdexcept>
+# include <utility>
#endif
#endif // _LIBCPP_ALGORITHM
diff --git a/contrib/libs/cxxsupp/libcxx/include/any b/contrib/libs/cxxsupp/libcxx/include/any
index 66f7488e54..ec5171ff71 100644
--- a/contrib/libs/cxxsupp/libcxx/include/any
+++ b/contrib/libs/cxxsupp/libcxx/include/any
@@ -83,21 +83,20 @@ namespace std {
#include <__assert> // all public C++ headers provide the assertion handler
#include <__availability>
#include <__config>
+#include <__memory/allocator.h>
+#include <__memory/allocator_destructor.h>
+#include <__memory/allocator_traits.h>
+#include <__memory/unique_ptr.h>
#include <__utility/forward.h>
#include <__utility/in_place.h>
#include <__utility/move.h>
#include <__utility/unreachable.h>
#include <cstdlib>
#include <initializer_list>
-#include <memory>
#include <type_traits>
#include <typeinfo>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <chrono>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
@@ -106,7 +105,7 @@ namespace std {
class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast
{
public:
- virtual const char* what() const _NOEXCEPT;
+ const char* what() const _NOEXCEPT override;
};
} // namespace std
@@ -194,18 +193,18 @@ class _LIBCPP_TEMPLATE_VIS any
public:
// construct/destruct
_LIBCPP_INLINE_VISIBILITY
- constexpr any() _NOEXCEPT : __h(nullptr) {}
+ constexpr any() _NOEXCEPT : __h_(nullptr) {}
_LIBCPP_INLINE_VISIBILITY
- any(any const & __other) : __h(nullptr)
+ any(any const & __other) : __h_(nullptr)
{
- if (__other.__h) __other.__call(_Action::_Copy, this);
+ if (__other.__h_) __other.__call(_Action::_Copy, this);
}
_LIBCPP_INLINE_VISIBILITY
- any(any && __other) _NOEXCEPT : __h(nullptr)
+ any(any && __other) _NOEXCEPT : __h_(nullptr)
{
- if (__other.__h) __other.__call(_Action::_Move, this);
+ if (__other.__h_) __other.__call(_Action::_Move, this);
}
template <
@@ -284,19 +283,19 @@ public:
// 6.3.3 any modifiers
_LIBCPP_INLINE_VISIBILITY
- void reset() _NOEXCEPT { if (__h) this->__call(_Action::_Destroy); }
+ void reset() _NOEXCEPT { if (__h_) this->__call(_Action::_Destroy); }
_LIBCPP_INLINE_VISIBILITY
void swap(any & __rhs) _NOEXCEPT;
// 6.3.4 any observers
_LIBCPP_INLINE_VISIBILITY
- bool has_value() const _NOEXCEPT { return __h != nullptr; }
+ bool has_value() const _NOEXCEPT { return __h_ != nullptr; }
#if !defined(_LIBCPP_NO_RTTI)
_LIBCPP_INLINE_VISIBILITY
const type_info & type() const _NOEXCEPT {
- if (__h) {
+ if (__h_) {
return *static_cast<type_info const *>(this->__call(_Action::_TypeInfo));
} else {
return typeid(void);
@@ -320,7 +319,7 @@ private:
type_info const * __info = nullptr,
const void* __fallback_info = nullptr) const
{
- return __h(__a, this, __other, __info, __fallback_info);
+ return __h_(__a, this, __other, __info, __fallback_info);
}
_LIBCPP_INLINE_VISIBILITY
@@ -328,7 +327,7 @@ private:
type_info const * __info = nullptr,
const void* __fallback_info = nullptr)
{
- return __h(__a, this, __other, __info, __fallback_info);
+ return __h_(__a, this, __other, __info, __fallback_info);
}
template <class>
@@ -344,8 +343,8 @@ private:
friend add_pointer_t<_ValueType>
any_cast(any *) _NOEXCEPT;
- _HandleFuncPtr __h = nullptr;
- _Storage __s;
+ _HandleFuncPtr __h_ = nullptr;
+ _Storage __s_;
};
namespace __any_imp
@@ -382,9 +381,9 @@ namespace __any_imp
typedef allocator<_Tp> _Alloc;
typedef allocator_traits<_Alloc> _ATraits;
_Alloc __a;
- _Tp * __ret = static_cast<_Tp*>(static_cast<void*>(&__dest.__s.__buf));
+ _Tp * __ret = static_cast<_Tp*>(static_cast<void*>(&__dest.__s_.__buf));
_ATraits::construct(__a, __ret, _VSTD::forward<_Args>(__args)...);
- __dest.__h = &_SmallHandler::__handle;
+ __dest.__h_ = &_SmallHandler::__handle;
return *__ret;
}
@@ -394,21 +393,21 @@ namespace __any_imp
typedef allocator<_Tp> _Alloc;
typedef allocator_traits<_Alloc> _ATraits;
_Alloc __a;
- _Tp * __p = static_cast<_Tp *>(static_cast<void*>(&__this.__s.__buf));
+ _Tp * __p = static_cast<_Tp *>(static_cast<void*>(&__this.__s_.__buf));
_ATraits::destroy(__a, __p);
- __this.__h = nullptr;
+ __this.__h_ = nullptr;
}
_LIBCPP_INLINE_VISIBILITY
static void __copy(any const & __this, any & __dest) {
_SmallHandler::__create(__dest, *static_cast<_Tp const *>(
- static_cast<void const *>(&__this.__s.__buf)));
+ static_cast<void const *>(&__this.__s_.__buf)));
}
_LIBCPP_INLINE_VISIBILITY
static void __move(any & __this, any & __dest) {
_SmallHandler::__create(__dest, _VSTD::move(
- *static_cast<_Tp*>(static_cast<void*>(&__this.__s.__buf))));
+ *static_cast<_Tp*>(static_cast<void*>(&__this.__s_.__buf))));
__destroy(__this);
}
@@ -418,7 +417,7 @@ namespace __any_imp
const void* __fallback_id)
{
if (__any_imp::__compare_typeid<_Tp>(__info, __fallback_id))
- return static_cast<void*>(&__this.__s.__buf);
+ return static_cast<void*>(&__this.__s_.__buf);
return nullptr;
}
@@ -470,8 +469,8 @@ namespace __any_imp
unique_ptr<_Tp, _Dp> __hold(_ATraits::allocate(__a, 1), _Dp(__a, 1));
_Tp * __ret = __hold.get();
_ATraits::construct(__a, __ret, _VSTD::forward<_Args>(__args)...);
- __dest.__s.__ptr = __hold.release();
- __dest.__h = &_LargeHandler::__handle;
+ __dest.__s_.__ptr = __hold.release();
+ __dest.__h_ = &_LargeHandler::__handle;
return *__ret;
}
@@ -482,22 +481,22 @@ namespace __any_imp
typedef allocator<_Tp> _Alloc;
typedef allocator_traits<_Alloc> _ATraits;
_Alloc __a;
- _Tp * __p = static_cast<_Tp *>(__this.__s.__ptr);
+ _Tp * __p = static_cast<_Tp *>(__this.__s_.__ptr);
_ATraits::destroy(__a, __p);
_ATraits::deallocate(__a, __p, 1);
- __this.__h = nullptr;
+ __this.__h_ = nullptr;
}
_LIBCPP_INLINE_VISIBILITY
static void __copy(any const & __this, any & __dest) {
- _LargeHandler::__create(__dest, *static_cast<_Tp const *>(__this.__s.__ptr));
+ _LargeHandler::__create(__dest, *static_cast<_Tp const *>(__this.__s_.__ptr));
}
_LIBCPP_INLINE_VISIBILITY
static void __move(any & __this, any & __dest) {
- __dest.__s.__ptr = __this.__s.__ptr;
- __dest.__h = &_LargeHandler::__handle;
- __this.__h = nullptr;
+ __dest.__s_.__ptr = __this.__s_.__ptr;
+ __dest.__h_ = &_LargeHandler::__handle;
+ __this.__h_ = nullptr;
}
_LIBCPP_INLINE_VISIBILITY
@@ -505,7 +504,7 @@ namespace __any_imp
void const* __fallback_info)
{
if (__any_imp::__compare_typeid<_Tp>(__info, __fallback_info))
- return static_cast<void*>(__this.__s.__ptr);
+ return static_cast<void*>(__this.__s_.__ptr);
return nullptr;
}
@@ -525,7 +524,7 @@ namespace __any_imp
template <class _ValueType, class _Tp, class>
-any::any(_ValueType && __v) : __h(nullptr)
+any::any(_ValueType && __v) : __h_(nullptr)
{
__any_imp::_Handler<_Tp>::__create(*this, _VSTD::forward<_ValueType>(__v));
}
@@ -567,16 +566,16 @@ void any::swap(any & __rhs) _NOEXCEPT
{
if (this == &__rhs)
return;
- if (__h && __rhs.__h) {
+ if (__h_ && __rhs.__h_) {
any __tmp;
__rhs.__call(_Action::_Move, &__tmp);
this->__call(_Action::_Move, &__rhs);
__tmp.__call(_Action::_Move, this);
}
- else if (__h) {
+ else if (__h_) {
this->__call(_Action::_Move, &__rhs);
}
- else if (__rhs.__h) {
+ else if (__rhs.__h_) {
__rhs.__call(_Action::_Move, this);
}
}
@@ -606,7 +605,7 @@ inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
_ValueType any_cast(any const & __v)
{
- using _RawValueType = __uncvref_t<_ValueType>;
+ using _RawValueType = __remove_cvref_t<_ValueType>;
static_assert(is_constructible<_ValueType, _RawValueType const &>::value,
"ValueType is required to be a const lvalue reference "
"or a CopyConstructible type");
@@ -621,7 +620,7 @@ inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
_ValueType any_cast(any & __v)
{
- using _RawValueType = __uncvref_t<_ValueType>;
+ using _RawValueType = __remove_cvref_t<_ValueType>;
static_assert(is_constructible<_ValueType, _RawValueType &>::value,
"ValueType is required to be an lvalue reference "
"or a CopyConstructible type");
@@ -636,7 +635,7 @@ inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
_ValueType any_cast(any && __v)
{
- using _RawValueType = __uncvref_t<_ValueType>;
+ using _RawValueType = __remove_cvref_t<_ValueType>;
static_assert(is_constructible<_ValueType, _RawValueType>::value,
"ValueType is required to be an rvalue reference "
"or a CopyConstructible type");
@@ -676,8 +675,8 @@ any_cast(any * __any) _NOEXCEPT
using __any_imp::_Action;
static_assert(!is_reference<_ValueType>::value,
"_ValueType may not be a reference.");
- typedef typename add_pointer<_ValueType>::type _ReturnType;
- if (__any && __any->__h) {
+ typedef add_pointer_t<_ValueType> _ReturnType;
+ if (__any && __any->__h_) {
void *__p = __any->__call(_Action::_Get, nullptr,
#if !defined(_LIBCPP_NO_RTTI)
&typeid(_ValueType),
@@ -695,4 +694,17 @@ any_cast(any * __any) _NOEXCEPT
_LIBCPP_END_NAMESPACE_STD
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
+# include <chrono>
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <atomic>
+# include <concepts>
+# include <iosfwd>
+# include <iterator>
+# include <memory>
+# include <variant>
+#endif
+
#endif // _LIBCPP_ANY
diff --git a/contrib/libs/cxxsupp/libcxx/include/array b/contrib/libs/cxxsupp/libcxx/include/array
index 867dd6b1bc..cb1a6d1202 100644
--- a/contrib/libs/cxxsupp/libcxx/include/array
+++ b/contrib/libs/cxxsupp/libcxx/include/array
@@ -115,7 +115,7 @@ template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexce
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
#include <__iterator/reverse_iterator.h>
-#include <__tuple>
+#include <__tuple/sfinae_helpers.h>
#include <__utility/integer_sequence.h>
#include <__utility/move.h>
#include <__utility/unreachable.h>
@@ -123,12 +123,6 @@ template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexce
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <algorithm>
-# include <iterator>
-# include <utility>
-#endif
-
// standard-mandated includes
// [iterator.range]
@@ -142,6 +136,10 @@ template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexce
#include <compare>
#include <initializer_list>
+// [tuple.helper]
+#include <__tuple/tuple_element.h>
+#include <__tuple/tuple_size.h>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
@@ -168,42 +166,42 @@ struct _LIBCPP_TEMPLATE_VIS array
_Tp __elems_[_Size];
// No explicit construct/copy/destroy for aggregate type
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void fill(const value_type& __u) {
_VSTD::fill_n(data(), _Size, __u);
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void swap(array& __a) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) {
_VSTD::swap_ranges(data(), data() + _Size, __a.data());
}
// iterators:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
iterator begin() _NOEXCEPT {return iterator(data());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_iterator begin() const _NOEXCEPT {return const_iterator(data());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
iterator end() _NOEXCEPT {return iterator(data() + _Size);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_iterator end() const _NOEXCEPT {return const_iterator(data() + _Size);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator rbegin() _NOEXCEPT {return reverse_iterator(end());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_reverse_iterator rbegin() const _NOEXCEPT {return const_reverse_iterator(end());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator rend() _NOEXCEPT {return reverse_iterator(begin());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_reverse_iterator rend() const _NOEXCEPT {return const_reverse_iterator(begin());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_iterator cbegin() const _NOEXCEPT {return begin();}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_iterator cend() const _NOEXCEPT {return end();}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_reverse_iterator crend() const _NOEXCEPT {return rend();}
// capacity:
@@ -215,39 +213,39 @@ struct _LIBCPP_TEMPLATE_VIS array
_LIBCPP_CONSTEXPR bool empty() const _NOEXCEPT {return _Size == 0;}
// element access:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reference operator[](size_type __n) _NOEXCEPT {
_LIBCPP_ASSERT(__n < _Size, "out-of-bounds access in std::array<T, N>");
return __elems_[__n];
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const_reference operator[](size_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT(__n < _Size, "out-of-bounds access in std::array<T, N>");
return __elems_[__n];
}
- _LIBCPP_CONSTEXPR_AFTER_CXX14 reference at(size_type __n)
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 reference at(size_type __n)
{
if (__n >= _Size)
__throw_out_of_range("array::at");
return __elems_[__n];
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference at(size_type __n) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference at(size_type __n) const
{
if (__n >= _Size)
__throw_out_of_range("array::at");
return __elems_[__n];
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reference front() _NOEXCEPT {return (*this)[0];}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference front() const _NOEXCEPT {return (*this)[0];}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reference back() _NOEXCEPT {return (*this)[_Size - 1];}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference back() const _NOEXCEPT {return (*this)[_Size - 1];}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 reference front() _NOEXCEPT {return (*this)[0];}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference front() const _NOEXCEPT {return (*this)[0];}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 reference back() _NOEXCEPT {return (*this)[_Size - 1];}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference back() const _NOEXCEPT {return (*this)[_Size - 1];}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
value_type* data() _NOEXCEPT {return __elems_;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const value_type* data() const _NOEXCEPT {return __elems_;}
};
@@ -268,56 +266,55 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0>
typedef _VSTD::reverse_iterator<iterator> reverse_iterator;
typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef typename conditional<is_const<_Tp>::value, const char,
- char>::type _CharType;
+ typedef __conditional_t<is_const<_Tp>::value, const char, char> _CharType;
struct _ArrayInStructT { _Tp __data_[1]; };
_ALIGNAS_TYPE(_ArrayInStructT) _CharType __elems_[sizeof(_ArrayInStructT)];
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
value_type* data() _NOEXCEPT {return nullptr;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const value_type* data() const _NOEXCEPT {return nullptr;}
// No explicit construct/copy/destroy for aggregate type
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void fill(const value_type&) {
static_assert(!is_const<_Tp>::value,
"cannot fill zero-sized array of type 'const T'");
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void swap(array&) _NOEXCEPT {
static_assert(!is_const<_Tp>::value,
"cannot swap zero-sized array of type 'const T'");
}
// iterators:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
iterator begin() _NOEXCEPT {return iterator(data());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_iterator begin() const _NOEXCEPT {return const_iterator(data());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
iterator end() _NOEXCEPT {return iterator(data());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_iterator end() const _NOEXCEPT {return const_iterator(data());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator rbegin() _NOEXCEPT {return reverse_iterator(end());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_reverse_iterator rbegin() const _NOEXCEPT {return const_reverse_iterator(end());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator rend() _NOEXCEPT {return reverse_iterator(begin());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_reverse_iterator rend() const _NOEXCEPT {return const_reverse_iterator(begin());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_iterator cbegin() const _NOEXCEPT {return begin();}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_iterator cend() const _NOEXCEPT {return end();}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
const_reverse_iterator crend() const _NOEXCEPT {return rend();}
// capacity:
@@ -329,49 +326,49 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0>
_LIBCPP_CONSTEXPR bool empty() const _NOEXCEPT {return true;}
// element access:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reference operator[](size_type) _NOEXCEPT {
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
__libcpp_unreachable();
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const_reference operator[](size_type) const _NOEXCEPT {
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
__libcpp_unreachable();
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reference at(size_type) {
__throw_out_of_range("array<T, 0>::at");
__libcpp_unreachable();
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const_reference at(size_type) const {
__throw_out_of_range("array<T, 0>::at");
__libcpp_unreachable();
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reference front() _NOEXCEPT {
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::front() on a zero-sized array");
__libcpp_unreachable();
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const_reference front() const _NOEXCEPT {
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::front() on a zero-sized array");
__libcpp_unreachable();
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reference back() _NOEXCEPT {
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::back() on a zero-sized array");
__libcpp_unreachable();
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const_reference back() const _NOEXCEPT {
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::back() on a zero-sized array");
__libcpp_unreachable();
@@ -389,7 +386,7 @@ array(_Tp, _Args...)
template <class _Tp, size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_CONSTEXPR_SINCE_CXX20 bool
operator==(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
{
return _VSTD::equal(__x.begin(), __x.end(), __y.begin());
@@ -397,7 +394,7 @@ operator==(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
template <class _Tp, size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_CONSTEXPR_SINCE_CXX20 bool
operator!=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
{
return !(__x == __y);
@@ -405,7 +402,7 @@ operator!=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
template <class _Tp, size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_CONSTEXPR_SINCE_CXX20 bool
operator<(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
{
return _VSTD::lexicographical_compare(__x.begin(), __x.end(),
@@ -414,7 +411,7 @@ operator<(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
template <class _Tp, size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_CONSTEXPR_SINCE_CXX20 bool
operator>(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
{
return __y < __x;
@@ -422,7 +419,7 @@ operator>(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
template <class _Tp, size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_CONSTEXPR_SINCE_CXX20 bool
operator<=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
{
return !(__y < __x);
@@ -430,14 +427,14 @@ operator<=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
template <class _Tp, size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_CONSTEXPR_SINCE_CXX20 bool
operator>=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
{
return !(__x < __y);
}
template <class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t<_Size == 0 || __is_swappable<_Tp>::value, void>
swap(array<_Tp, _Size>& __x, array<_Tp, _Size>& __y)
_NOEXCEPT_(noexcept(__x.swap(__y)))
@@ -457,7 +454,7 @@ struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, array<_Tp, _Size> >
};
template <size_t _Ip, class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp&
get(array<_Tp, _Size>& __a) _NOEXCEPT
{
@@ -466,7 +463,7 @@ get(array<_Tp, _Size>& __a) _NOEXCEPT
}
template <size_t _Ip, class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&
get(const array<_Tp, _Size>& __a) _NOEXCEPT
{
@@ -475,7 +472,7 @@ get(const array<_Tp, _Size>& __a) _NOEXCEPT
}
template <size_t _Ip, class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp&&
get(array<_Tp, _Size>&& __a) _NOEXCEPT
{
@@ -484,7 +481,7 @@ get(array<_Tp, _Size>&& __a) _NOEXCEPT
}
template <size_t _Ip, class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&&
get(const array<_Tp, _Size>&& __a) _NOEXCEPT
{
@@ -535,4 +532,11 @@ to_array(_Tp(&&__arr)[_Size]) noexcept(is_nothrow_move_constructible_v<_Tp>) {
_LIBCPP_END_NAMESPACE_STD
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <algorithm>
+# include <concepts>
+# include <iterator>
+# include <utility>
+#endif
+
#endif // _LIBCPP_ARRAY
diff --git a/contrib/libs/cxxsupp/libcxx/include/atomic b/contrib/libs/cxxsupp/libcxx/include/atomic
index 92da4820e9..fac146537d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/atomic
+++ b/contrib/libs/cxxsupp/libcxx/include/atomic
@@ -534,10 +534,6 @@ template <class T>
# include <__threading_support>
#endif
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <chrono>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
@@ -948,13 +944,13 @@ void __cxx_atomic_store(__cxx_atomic_base_impl<_Tp> * __a, _Tp __val, memory_ord
template<class _Tp>
_LIBCPP_INLINE_VISIBILITY
_Tp __cxx_atomic_load(__cxx_atomic_base_impl<_Tp> const volatile* __a, memory_order __order) _NOEXCEPT {
- using __ptr_type = typename remove_const<decltype(__a->__a_value)>::type*;
+ using __ptr_type = __remove_const_t<decltype(__a->__a_value)>*;
return __c11_atomic_load(const_cast<__ptr_type>(&__a->__a_value), static_cast<__memory_order_underlying_t>(__order));
}
template<class _Tp>
_LIBCPP_INLINE_VISIBILITY
_Tp __cxx_atomic_load(__cxx_atomic_base_impl<_Tp> const* __a, memory_order __order) _NOEXCEPT {
- using __ptr_type = typename remove_const<decltype(__a->__a_value)>::type*;
+ using __ptr_type = __remove_const_t<decltype(__a->__a_value)>*;
return __c11_atomic_load(const_cast<__ptr_type>(&__a->__a_value), static_cast<__memory_order_underlying_t>(__order));
}
@@ -1113,6 +1109,12 @@ _Tp kill_dependency(_Tp __y) _NOEXCEPT
# define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE
#endif
+template <class _Tp>
+struct __libcpp_is_always_lock_free {
+ // __atomic_always_lock_free is available in all Standard modes
+ static const bool __value = __atomic_always_lock_free(sizeof(_Tp), 0);
+};
+
#ifdef _LIBCPP_ATOMIC_ONLY_USE_BUILTINS
template<typename _Tp>
@@ -1404,42 +1406,8 @@ _Tp __cxx_atomic_fetch_xor(__cxx_atomic_lock_impl<_Tp>* __a,
return __old;
}
-#ifdef __cpp_lib_atomic_is_always_lock_free
-
-template<typename _Tp> struct __cxx_is_always_lock_free {
- enum { __value = __atomic_always_lock_free(sizeof(_Tp), 0) }; };
-
-#else
-
-template<typename _Tp> struct __cxx_is_always_lock_free { enum { __value = false }; };
-// Implementations must match the C ATOMIC_*_LOCK_FREE macro values.
-template<> struct __cxx_is_always_lock_free<bool> { enum { __value = 2 == ATOMIC_BOOL_LOCK_FREE }; };
-template<> struct __cxx_is_always_lock_free<char> { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; };
-template<> struct __cxx_is_always_lock_free<signed char> { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; };
-template<> struct __cxx_is_always_lock_free<unsigned char> { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; };
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
-template<> struct __cxx_is_always_lock_free<char8_t> { enum { __value = 2 == ATOMIC_CHAR8_T_LOCK_FREE }; };
-#endif
-template<> struct __cxx_is_always_lock_free<char16_t> { enum { __value = 2 == ATOMIC_CHAR16_T_LOCK_FREE }; };
-template<> struct __cxx_is_always_lock_free<char32_t> { enum { __value = 2 == ATOMIC_CHAR32_T_LOCK_FREE }; };
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template<> struct __cxx_is_always_lock_free<wchar_t> { enum { __value = 2 == ATOMIC_WCHAR_T_LOCK_FREE }; };
-#endif
-template<> struct __cxx_is_always_lock_free<short> { enum { __value = 2 == ATOMIC_SHORT_LOCK_FREE }; };
-template<> struct __cxx_is_always_lock_free<unsigned short> { enum { __value = 2 == ATOMIC_SHORT_LOCK_FREE }; };
-template<> struct __cxx_is_always_lock_free<int> { enum { __value = 2 == ATOMIC_INT_LOCK_FREE }; };
-template<> struct __cxx_is_always_lock_free<unsigned int> { enum { __value = 2 == ATOMIC_INT_LOCK_FREE }; };
-template<> struct __cxx_is_always_lock_free<long> { enum { __value = 2 == ATOMIC_LONG_LOCK_FREE }; };
-template<> struct __cxx_is_always_lock_free<unsigned long> { enum { __value = 2 == ATOMIC_LONG_LOCK_FREE }; };
-template<> struct __cxx_is_always_lock_free<long long> { enum { __value = 2 == ATOMIC_LLONG_LOCK_FREE }; };
-template<> struct __cxx_is_always_lock_free<unsigned long long> { enum { __value = 2 == ATOMIC_LLONG_LOCK_FREE }; };
-template<typename _Tp> struct __cxx_is_always_lock_free<_Tp*> { enum { __value = 2 == ATOMIC_POINTER_LOCK_FREE }; };
-template<> struct __cxx_is_always_lock_free<std::nullptr_t> { enum { __value = 2 == ATOMIC_POINTER_LOCK_FREE }; };
-
-#endif //__cpp_lib_atomic_is_always_lock_free
-
template <typename _Tp,
- typename _Base = typename conditional<__cxx_is_always_lock_free<_Tp>::__value,
+ typename _Base = typename conditional<__libcpp_is_always_lock_free<_Tp>::__value,
__cxx_atomic_base_impl<_Tp>,
__cxx_atomic_lock_impl<_Tp> >::type>
#else
@@ -1463,17 +1431,7 @@ struct __cxx_atomic_impl : public _Base {
using __cxx_atomic_contention_t = __cxx_atomic_impl<__cxx_contention_t>;
-#if defined(_LIBCPP_HAS_NO_THREADS)
-# define _LIBCPP_HAS_NO_PLATFORM_WAIT
-#endif
-
-// TODO:
-// _LIBCPP_HAS_NO_PLATFORM_WAIT is currently a "dead" macro, in the sense that
-// it is not tied anywhere into the build system or even documented. We should
-// clean it up because it is technically never defined except when threads are
-// disabled. We should clean it up in its own changeset in case we break "bad"
-// users.
-#ifndef _LIBCPP_HAS_NO_PLATFORM_WAIT
+#ifndef _LIBCPP_HAS_NO_THREADS
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*);
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*);
@@ -1515,7 +1473,7 @@ _LIBCPP_INLINE_VISIBILITY bool __cxx_atomic_wait(_Atp* __a, _Fn && __test_fn)
return __libcpp_thread_poll_with_backoff(__test_fn, __backoff_fn);
}
-#else // _LIBCPP_HAS_NO_PLATFORM_WAIT
+#else // _LIBCPP_HAS_NO_THREADS
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY void __cxx_atomic_notify_all(__cxx_atomic_impl<_Tp> const volatile*) { }
@@ -1524,15 +1482,10 @@ _LIBCPP_INLINE_VISIBILITY void __cxx_atomic_notify_one(__cxx_atomic_impl<_Tp> co
template <class _Atp, class _Fn>
_LIBCPP_INLINE_VISIBILITY bool __cxx_atomic_wait(_Atp*, _Fn && __test_fn)
{
-#if defined(_LIBCPP_HAS_NO_THREADS)
- using _Policy = __spinning_backoff_policy;
-#else
- using _Policy = __libcpp_timed_backoff_policy;
-#endif
- return __libcpp_thread_poll_with_backoff(__test_fn, _Policy());
+ return __libcpp_thread_poll_with_backoff(__test_fn, __spinning_backoff_policy());
}
-#endif // _LIBCPP_HAS_NO_PLATFORM_WAIT
+#endif // _LIBCPP_HAS_NO_THREADS
template <class _Atp, class _Tp>
struct __cxx_atomic_wait_test_fn_impl {
@@ -1561,7 +1514,7 @@ struct __atomic_base // false
mutable __cxx_atomic_impl<_Tp> __a_;
#if defined(__cpp_lib_atomic_is_always_lock_free)
- static _LIBCPP_CONSTEXPR bool is_always_lock_free = __atomic_always_lock_free(sizeof(__a_), 0);
+ static _LIBCPP_CONSTEXPR bool is_always_lock_free = __libcpp_is_always_lock_free<__cxx_atomic_impl<_Tp> >::__value;
#endif
_LIBCPP_INLINE_VISIBILITY
@@ -1673,7 +1626,7 @@ struct __atomic_base<_Tp, true>
{
typedef __atomic_base<_Tp, false> __base;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__atomic_base() _NOEXCEPT = default;
_LIBCPP_INLINE_VISIBILITY
@@ -1806,28 +1759,28 @@ struct atomic<_Tp*>
_LIBCPP_INLINE_VISIBILITY
_Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
// __atomic_fetch_add accepts function pointers, guard against them.
- static_assert(!is_function<typename remove_pointer<_Tp>::type>::value, "Pointer to function isn't allowed");
+ static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
return __cxx_atomic_fetch_add(&this->__a_, __op, __m);
}
_LIBCPP_INLINE_VISIBILITY
_Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
// __atomic_fetch_add accepts function pointers, guard against them.
- static_assert(!is_function<typename remove_pointer<_Tp>::type>::value, "Pointer to function isn't allowed");
+ static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
return __cxx_atomic_fetch_add(&this->__a_, __op, __m);
}
_LIBCPP_INLINE_VISIBILITY
_Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
// __atomic_fetch_add accepts function pointers, guard against them.
- static_assert(!is_function<typename remove_pointer<_Tp>::type>::value, "Pointer to function isn't allowed");
+ static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
return __cxx_atomic_fetch_sub(&this->__a_, __op, __m);
}
_LIBCPP_INLINE_VISIBILITY
_Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
// __atomic_fetch_add accepts function pointers, guard against them.
- static_assert(!is_function<typename remove_pointer<_Tp>::type>::value, "Pointer to function isn't allowed");
+ static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
return __cxx_atomic_fetch_sub(&this->__a_, __op, __m);
}
@@ -2664,23 +2617,23 @@ typedef atomic<uintmax_t> atomic_uintmax_t;
// atomic_*_lock_free : prefer the contention type most highly, then the largest lock-free type
#ifdef __cpp_lib_atomic_is_always_lock_free
-# define _LIBCPP_CONTENTION_LOCK_FREE __atomic_always_lock_free(sizeof(__cxx_contention_t), 0)
+# define _LIBCPP_CONTENTION_LOCK_FREE ::std::__libcpp_is_always_lock_free<__cxx_contention_t>::__value
#else
# define _LIBCPP_CONTENTION_LOCK_FREE false
#endif
#if ATOMIC_LLONG_LOCK_FREE == 2
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, long long>::type __libcpp_signed_lock_free;
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned long long>::type __libcpp_unsigned_lock_free;
+typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, long long> __libcpp_signed_lock_free;
+typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned long long> __libcpp_unsigned_lock_free;
#elif ATOMIC_INT_LOCK_FREE == 2
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, int>::type __libcpp_signed_lock_free;
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned int>::type __libcpp_unsigned_lock_free;
+typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, int> __libcpp_signed_lock_free;
+typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned int> __libcpp_unsigned_lock_free;
#elif ATOMIC_SHORT_LOCK_FREE == 2
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, short>::type __libcpp_signed_lock_free;
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned short>::type __libcpp_unsigned_lock_free;
+typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, short> __libcpp_signed_lock_free;
+typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned short> __libcpp_unsigned_lock_free;
#elif ATOMIC_CHAR_LOCK_FREE == 2
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, char>::type __libcpp_signed_lock_free;
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned char>::type __libcpp_unsigned_lock_free;
+typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, char> __libcpp_signed_lock_free;
+typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned char> __libcpp_unsigned_lock_free;
#else
// No signed/unsigned lock-free types
#define _LIBCPP_NO_LOCK_FREE_TYPES
@@ -2702,4 +2655,13 @@ typedef atomic<__libcpp_unsigned_lock_free> atomic_unsigned_lock_free;
_LIBCPP_END_NAMESPACE_STD
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
+# include <chrono>
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <cmath>
+# include <compare>
+#endif
+
#endif // _LIBCPP_ATOMIC
diff --git a/contrib/libs/cxxsupp/libcxx/include/barrier b/contrib/libs/cxxsupp/libcxx/include/barrier
index 0051803528..a2f753677b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/barrier
+++ b/contrib/libs/cxxsupp/libcxx/include/barrier
@@ -48,10 +48,11 @@ namespace std
#include <__assert> // all public C++ headers provide the assertion handler
#include <__availability>
#include <__config>
+#include <__memory/unique_ptr.h>
#include <__thread/timed_backoff_policy.h>
+#include <__utility/move.h>
#include <atomic>
#include <limits>
-#include <memory>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -283,7 +284,7 @@ public:
template<class _CompletionF = __empty_completion>
class barrier {
- __barrier_base<_CompletionF> __b;
+ __barrier_base<_CompletionF> __b_;
public:
using arrival_token = typename __barrier_base<_CompletionF>::arrival_token;
@@ -293,7 +294,7 @@ public:
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
barrier(ptrdiff_t __count, _CompletionF __completion = _CompletionF())
- : __b(__count, _VSTD::move(__completion)) {
+ : __b_(__count, _VSTD::move(__completion)) {
}
barrier(barrier const&) = delete;
@@ -302,12 +303,12 @@ public:
[[nodiscard]] _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
arrival_token arrive(ptrdiff_t __update = 1)
{
- return __b.arrive(__update);
+ return __b_.arrive(__update);
}
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void wait(arrival_token&& __phase) const
{
- __b.wait(_VSTD::move(__phase));
+ __b_.wait(_VSTD::move(__phase));
}
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void arrive_and_wait()
@@ -317,7 +318,7 @@ public:
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void arrive_and_drop()
{
- __b.arrive_and_drop();
+ __b_.arrive_and_drop();
}
};
@@ -327,4 +328,12 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <iterator>
+# include <memory>
+# include <stdexcept>
+# include <variant>
+#endif
+
#endif //_LIBCPP_BARRIER
diff --git a/contrib/libs/cxxsupp/libcxx/include/bit b/contrib/libs/cxxsupp/libcxx/include/bit
index 15bc13a504..d2061d3e6f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/bit
+++ b/contrib/libs/cxxsupp/libcxx/include/bit
@@ -71,14 +71,6 @@ namespace std {
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <iosfwd>
-#endif
-
-#if defined(_LIBCPP_COMPILER_MSVC)
-# include <intrin.h>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
@@ -89,7 +81,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template<class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp __rotr(_Tp __t, unsigned int __cnt) _NOEXCEPT
{
static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__rotr requires an unsigned integer type");
@@ -100,7 +92,7 @@ _Tp __rotr(_Tp __t, unsigned int __cnt) _NOEXCEPT
}
template<class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
int __countl_zero(_Tp __t) _NOEXCEPT
{
static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__countl_zero requires an unsigned integer type");
@@ -256,4 +248,8 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <iosfwd>
+#endif
+
#endif // _LIBCPP_BIT
diff --git a/contrib/libs/cxxsupp/libcxx/include/bitset b/contrib/libs/cxxsupp/libcxx/include/bitset
index da85ecc720..3a8a5b4710 100644
--- a/contrib/libs/cxxsupp/libcxx/include/bitset
+++ b/contrib/libs/cxxsupp/libcxx/include/bitset
@@ -42,61 +42,61 @@ public:
template <class charT>
explicit bitset(const charT* str,
typename basic_string<charT>::size_type n = basic_string<charT>::npos,
- charT zero = charT('0'), charT one = charT('1'));
+ charT zero = charT('0'), charT one = charT('1')); // constexpr since C++23
template<class charT, class traits, class Allocator>
explicit bitset(const basic_string<charT,traits,Allocator>& str,
typename basic_string<charT,traits,Allocator>::size_type pos = 0,
typename basic_string<charT,traits,Allocator>::size_type n =
basic_string<charT,traits,Allocator>::npos,
- charT zero = charT('0'), charT one = charT('1'));
+ charT zero = charT('0'), charT one = charT('1')); // constexpr since C++23
// 23.3.5.2 bitset operations:
- bitset& operator&=(const bitset& rhs) noexcept;
- bitset& operator|=(const bitset& rhs) noexcept;
- bitset& operator^=(const bitset& rhs) noexcept;
- bitset& operator<<=(size_t pos) noexcept;
- bitset& operator>>=(size_t pos) noexcept;
- bitset& set() noexcept;
- bitset& set(size_t pos, bool val = true);
- bitset& reset() noexcept;
- bitset& reset(size_t pos);
- bitset operator~() const noexcept;
- bitset& flip() noexcept;
- bitset& flip(size_t pos);
+ bitset& operator&=(const bitset& rhs) noexcept; // constexpr since C++23
+ bitset& operator|=(const bitset& rhs) noexcept; // constexpr since C++23
+ bitset& operator^=(const bitset& rhs) noexcept; // constexpr since C++23
+ bitset& operator<<=(size_t pos) noexcept; // constexpr since C++23
+ bitset& operator>>=(size_t pos) noexcept; // constexpr since C++23
+ bitset& set() noexcept; // constexpr since C++23
+ bitset& set(size_t pos, bool val = true); // constexpr since C++23
+ bitset& reset() noexcept; // constexpr since C++23
+ bitset& reset(size_t pos); // constexpr since C++23
+ bitset operator~() const noexcept; // constexpr since C++23
+ bitset& flip() noexcept; // constexpr since C++23
+ bitset& flip(size_t pos); // constexpr since C++23
// element access:
- constexpr bool operator[](size_t pos) const; // for b[i];
- reference operator[](size_t pos); // for b[i];
- unsigned long to_ulong() const;
- unsigned long long to_ullong() const;
- template <class charT, class traits, class Allocator>
+ constexpr bool operator[](size_t pos) const;
+ reference operator[](size_t pos); // constexpr since C++23
+ unsigned long to_ulong() const; // constexpr since C++23
+ unsigned long long to_ullong() const; // constexpr since C++23
+ template <class charT, class traits, class Allocator> // constexpr since C++23
basic_string<charT, traits, Allocator> to_string(charT zero = charT('0'), charT one = charT('1')) const;
- template <class charT, class traits>
+ template <class charT, class traits> // constexpr since C++23
basic_string<charT, traits, allocator<charT> > to_string(charT zero = charT('0'), charT one = charT('1')) const;
- template <class charT>
+ template <class charT> // constexpr since C++23
basic_string<charT, char_traits<charT>, allocator<charT> > to_string(charT zero = charT('0'), charT one = charT('1')) const;
- basic_string<char, char_traits<char>, allocator<char> > to_string(char zero = '0', char one = '1') const;
- size_t count() const noexcept;
- constexpr size_t size() const noexcept;
- bool operator==(const bitset& rhs) const noexcept;
- bool operator!=(const bitset& rhs) const noexcept;
- bool test(size_t pos) const;
- bool all() const noexcept;
- bool any() const noexcept;
- bool none() const noexcept;
- bitset operator<<(size_t pos) const noexcept;
- bitset operator>>(size_t pos) const noexcept;
+ basic_string<char, char_traits<char>, allocator<char> > to_string(char zero = '0', char one = '1') const; // constexpr since C++23
+ size_t count() const noexcept; // constexpr since C++23
+ constexpr size_t size() const noexcept; // constexpr since C++23
+ bool operator==(const bitset& rhs) const noexcept; // constexpr since C++23
+ bool operator!=(const bitset& rhs) const noexcept; // constexpr since C++23
+ bool test(size_t pos) const; // constexpr since C++23
+ bool all() const noexcept; // constexpr since C++23
+ bool any() const noexcept; // constexpr since C++23
+ bool none() const noexcept; // constexpr since C++23
+ bitset<N> operator<<(size_t pos) const noexcept; // constexpr since C++23
+ bitset<N> operator>>(size_t pos) const noexcept; // constexpr since C++23
};
// 23.3.5.3 bitset operators:
template <size_t N>
-bitset<N> operator&(const bitset<N>&, const bitset<N>&) noexcept;
+bitset<N> operator&(const bitset<N>&, const bitset<N>&) noexcept; // constexpr since C++23
template <size_t N>
-bitset<N> operator|(const bitset<N>&, const bitset<N>&) noexcept;
+bitset<N> operator|(const bitset<N>&, const bitset<N>&) noexcept; // constexpr since C++23
template <size_t N>
-bitset<N> operator^(const bitset<N>&, const bitset<N>&) noexcept;
+bitset<N> operator^(const bitset<N>&, const bitset<N>&) noexcept; // constexpr since C++23
template <class charT, class traits, size_t N>
basic_istream<charT, traits>&
@@ -118,12 +118,15 @@ template <size_t N> struct hash<std::bitset<N>>;
#include <__config>
#include <__functional/hash.h>
#include <__functional/unary_function.h>
+#include <__type_traits/is_char_like_type.h>
#include <climits>
#include <cstddef>
#include <stdexcept>
#include <version>
// standard-mandated includes
+
+// [bitset.syn]
#include <iosfwd>
#include <string>
@@ -181,30 +184,30 @@ protected:
_LIBCPP_INLINE_VISIBILITY
explicit _LIBCPP_CONSTEXPR __bitset(unsigned long long __v) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY reference __make_ref(size_t __pos) _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 reference __make_ref(size_t __pos) _NOEXCEPT
{return reference(__first_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);}
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const_reference __make_ref(size_t __pos) const _NOEXCEPT
{return const_reference(__first_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);}
- _LIBCPP_INLINE_VISIBILITY iterator __make_iter(size_t __pos) _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 iterator __make_iter(size_t __pos) _NOEXCEPT
{return iterator(__first_ + __pos / __bits_per_word, __pos % __bits_per_word);}
- _LIBCPP_INLINE_VISIBILITY const_iterator __make_iter(size_t __pos) const _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 const_iterator __make_iter(size_t __pos) const _NOEXCEPT
{return const_iterator(__first_ + __pos / __bits_per_word, __pos % __bits_per_word);}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
void operator&=(const __bitset& __v) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
void operator|=(const __bitset& __v) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
void operator^=(const __bitset& __v) _NOEXCEPT;
- void flip() _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY unsigned long to_ulong() const
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void flip() _NOEXCEPT;
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong() const
{return to_ulong(integral_constant<bool, _Size < sizeof(unsigned long) * CHAR_BIT>());}
- _LIBCPP_INLINE_VISIBILITY unsigned long long to_ullong() const
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong() const
{return to_ullong(integral_constant<bool, _Size < sizeof(unsigned long long) * CHAR_BIT>());}
- bool all() const _NOEXCEPT;
- bool any() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool all() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool any() const _NOEXCEPT;
_LIBCPP_INLINE_VISIBILITY
size_t __hash_code() const _NOEXCEPT;
private:
@@ -213,14 +216,17 @@ private:
_LIBCPP_INLINE_VISIBILITY
void __init(unsigned long long __v, true_type) _NOEXCEPT;
#endif // _LIBCPP_CXX03_LANG
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
unsigned long to_ulong(false_type) const;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
unsigned long to_ulong(true_type) const;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
unsigned long long to_ullong(false_type) const;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
unsigned long long to_ullong(true_type) const;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
unsigned long long to_ullong(true_type, false_type) const;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
unsigned long long to_ullong(true_type, true_type) const;
};
@@ -293,7 +299,7 @@ __bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
template <size_t _N_words, size_t _Size>
inline
-void
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<_N_words, _Size>::operator&=(const __bitset& __v) _NOEXCEPT
{
for (size_type __i = 0; __i < _N_words; ++__i)
@@ -302,7 +308,7 @@ __bitset<_N_words, _Size>::operator&=(const __bitset& __v) _NOEXCEPT
template <size_t _N_words, size_t _Size>
inline
-void
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<_N_words, _Size>::operator|=(const __bitset& __v) _NOEXCEPT
{
for (size_type __i = 0; __i < _N_words; ++__i)
@@ -311,7 +317,7 @@ __bitset<_N_words, _Size>::operator|=(const __bitset& __v) _NOEXCEPT
template <size_t _N_words, size_t _Size>
inline
-void
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<_N_words, _Size>::operator^=(const __bitset& __v) _NOEXCEPT
{
for (size_type __i = 0; __i < _N_words; ++__i)
@@ -319,7 +325,7 @@ __bitset<_N_words, _Size>::operator^=(const __bitset& __v) _NOEXCEPT
}
template <size_t _N_words, size_t _Size>
-void
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<_N_words, _Size>::flip() _NOEXCEPT
{
// do middle whole words
@@ -338,7 +344,7 @@ __bitset<_N_words, _Size>::flip() _NOEXCEPT
}
template <size_t _N_words, size_t _Size>
-unsigned long
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long
__bitset<_N_words, _Size>::to_ulong(false_type) const
{
const_iterator __e = __make_iter(_Size);
@@ -351,14 +357,14 @@ __bitset<_N_words, _Size>::to_ulong(false_type) const
template <size_t _N_words, size_t _Size>
inline
-unsigned long
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long
__bitset<_N_words, _Size>::to_ulong(true_type) const
{
return __first_[0];
}
template <size_t _N_words, size_t _Size>
-unsigned long long
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long
__bitset<_N_words, _Size>::to_ullong(false_type) const
{
const_iterator __e = __make_iter(_Size);
@@ -371,7 +377,7 @@ __bitset<_N_words, _Size>::to_ullong(false_type) const
template <size_t _N_words, size_t _Size>
inline
-unsigned long long
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long
__bitset<_N_words, _Size>::to_ullong(true_type) const
{
return to_ullong(true_type(), integral_constant<bool, sizeof(__storage_type) < sizeof(unsigned long long)>());
@@ -379,14 +385,14 @@ __bitset<_N_words, _Size>::to_ullong(true_type) const
template <size_t _N_words, size_t _Size>
inline
-unsigned long long
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long
__bitset<_N_words, _Size>::to_ullong(true_type, false_type) const
{
return __first_[0];
}
template <size_t _N_words, size_t _Size>
-unsigned long long
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long
__bitset<_N_words, _Size>::to_ullong(true_type, true_type) const
{
unsigned long long __r = __first_[0];
@@ -396,7 +402,7 @@ __bitset<_N_words, _Size>::to_ullong(true_type, true_type) const
}
template <size_t _N_words, size_t _Size>
-bool
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
__bitset<_N_words, _Size>::all() const _NOEXCEPT
{
// do middle whole words
@@ -416,7 +422,7 @@ __bitset<_N_words, _Size>::all() const _NOEXCEPT
}
template <size_t _N_words, size_t _Size>
-bool
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
__bitset<_N_words, _Size>::any() const _NOEXCEPT
{
// do middle whole words
@@ -477,33 +483,33 @@ protected:
_LIBCPP_INLINE_VISIBILITY
explicit _LIBCPP_CONSTEXPR __bitset(unsigned long long __v) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY reference __make_ref(size_t __pos) _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 reference __make_ref(size_t __pos) _NOEXCEPT
{return reference(&__first_, __storage_type(1) << __pos);}
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const_reference __make_ref(size_t __pos) const _NOEXCEPT
{return const_reference(&__first_, __storage_type(1) << __pos);}
- _LIBCPP_INLINE_VISIBILITY iterator __make_iter(size_t __pos) _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 iterator __make_iter(size_t __pos) _NOEXCEPT
{return iterator(&__first_ + __pos / __bits_per_word, __pos % __bits_per_word);}
- _LIBCPP_INLINE_VISIBILITY const_iterator __make_iter(size_t __pos) const _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 const_iterator __make_iter(size_t __pos) const _NOEXCEPT
{return const_iterator(&__first_ + __pos / __bits_per_word, __pos % __bits_per_word);}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
void operator&=(const __bitset& __v) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
void operator|=(const __bitset& __v) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
void operator^=(const __bitset& __v) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
void flip() _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
unsigned long to_ulong() const;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
unsigned long long to_ullong() const;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bool all() const _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bool any() const _NOEXCEPT;
_LIBCPP_INLINE_VISIBILITY
@@ -531,7 +537,7 @@ __bitset<1, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
template <size_t _Size>
inline
-void
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<1, _Size>::operator&=(const __bitset& __v) _NOEXCEPT
{
__first_ &= __v.__first_;
@@ -539,7 +545,7 @@ __bitset<1, _Size>::operator&=(const __bitset& __v) _NOEXCEPT
template <size_t _Size>
inline
-void
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<1, _Size>::operator|=(const __bitset& __v) _NOEXCEPT
{
__first_ |= __v.__first_;
@@ -547,7 +553,7 @@ __bitset<1, _Size>::operator|=(const __bitset& __v) _NOEXCEPT
template <size_t _Size>
inline
-void
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<1, _Size>::operator^=(const __bitset& __v) _NOEXCEPT
{
__first_ ^= __v.__first_;
@@ -555,7 +561,7 @@ __bitset<1, _Size>::operator^=(const __bitset& __v) _NOEXCEPT
template <size_t _Size>
inline
-void
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<1, _Size>::flip() _NOEXCEPT
{
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - _Size);
@@ -565,7 +571,7 @@ __bitset<1, _Size>::flip() _NOEXCEPT
template <size_t _Size>
inline
-unsigned long
+_LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long
__bitset<1, _Size>::to_ulong() const
{
return __first_;
@@ -573,7 +579,7 @@ __bitset<1, _Size>::to_ulong() const
template <size_t _Size>
inline
-unsigned long long
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long
__bitset<1, _Size>::to_ullong() const
{
return __first_;
@@ -581,7 +587,7 @@ __bitset<1, _Size>::to_ullong() const
template <size_t _Size>
inline
-bool
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
__bitset<1, _Size>::all() const _NOEXCEPT
{
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - _Size);
@@ -590,7 +596,7 @@ __bitset<1, _Size>::all() const _NOEXCEPT
template <size_t _Size>
inline
-bool
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
__bitset<1, _Size>::any() const _NOEXCEPT
{
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - _Size);
@@ -634,26 +640,26 @@ protected:
_LIBCPP_INLINE_VISIBILITY
explicit _LIBCPP_CONSTEXPR __bitset(unsigned long long) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY reference __make_ref(size_t) _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 reference __make_ref(size_t) _NOEXCEPT
{return reference(nullptr, 1);}
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const_reference __make_ref(size_t) const _NOEXCEPT
{return const_reference(nullptr, 1);}
- _LIBCPP_INLINE_VISIBILITY iterator __make_iter(size_t) _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 iterator __make_iter(size_t) _NOEXCEPT
{return iterator(nullptr, 0);}
- _LIBCPP_INLINE_VISIBILITY const_iterator __make_iter(size_t) const _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 const_iterator __make_iter(size_t) const _NOEXCEPT
{return const_iterator(nullptr, 0);}
- _LIBCPP_INLINE_VISIBILITY void operator&=(const __bitset&) _NOEXCEPT {}
- _LIBCPP_INLINE_VISIBILITY void operator|=(const __bitset&) _NOEXCEPT {}
- _LIBCPP_INLINE_VISIBILITY void operator^=(const __bitset&) _NOEXCEPT {}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator&=(const __bitset&) _NOEXCEPT {}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator|=(const __bitset&) _NOEXCEPT {}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator^=(const __bitset&) _NOEXCEPT {}
- _LIBCPP_INLINE_VISIBILITY void flip() _NOEXCEPT {}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void flip() _NOEXCEPT {}
- _LIBCPP_INLINE_VISIBILITY unsigned long to_ulong() const {return 0;}
- _LIBCPP_INLINE_VISIBILITY unsigned long long to_ullong() const {return 0;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong() const {return 0;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong() const {return 0;}
- _LIBCPP_INLINE_VISIBILITY bool all() const _NOEXCEPT {return true;}
- _LIBCPP_INLINE_VISIBILITY bool any() const _NOEXCEPT {return false;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool all() const _NOEXCEPT {return true;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool any() const _NOEXCEPT {return false;}
_LIBCPP_INLINE_VISIBILITY size_t __hash_code() const _NOEXCEPT {return 0;}
};
@@ -690,10 +696,12 @@ public:
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
bitset(unsigned long long __v) _NOEXCEPT : base(__v) {}
template<class _CharT, class = __enable_if_t<_IsCharLikeType<_CharT>::value> >
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
explicit bitset(const _CharT* __str,
typename basic_string<_CharT>::size_type __n = basic_string<_CharT>::npos,
_CharT __zero = _CharT('0'), _CharT __one = _CharT('1'));
template<class _CharT, class _Traits, class _Allocator>
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
explicit bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
typename basic_string<_CharT,_Traits,_Allocator>::size_type __pos = 0,
typename basic_string<_CharT,_Traits,_Allocator>::size_type __n =
@@ -701,24 +709,29 @@ public:
_CharT __zero = _CharT('0'), _CharT __one = _CharT('1'));
// 23.3.5.2 bitset operations:
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset& operator&=(const bitset& __rhs) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset& operator|=(const bitset& __rhs) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset& operator^=(const bitset& __rhs) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset& operator<<=(size_t __pos) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset& operator>>=(size_t __pos) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset& set() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset& set(size_t __pos, bool __val = true);
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset& reset() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset& reset(size_t __pos);
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset operator~() const _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset& flip() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset& flip(size_t __pos);
// element access:
@@ -727,41 +740,43 @@ public:
#else
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference operator[](size_t __p) const {return base::__make_ref(__p);}
#endif
- _LIBCPP_HIDE_FROM_ABI reference operator[](size_t __p) {return base::__make_ref(__p);}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 reference operator[](size_t __p) {return base::__make_ref(__p);}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
unsigned long to_ulong() const;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
unsigned long long to_ullong() const;
template <class _CharT, class _Traits, class _Allocator>
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
basic_string<_CharT, _Traits, _Allocator> to_string(_CharT __zero = _CharT('0'),
_CharT __one = _CharT('1')) const;
template <class _CharT, class _Traits>
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
basic_string<_CharT, _Traits, allocator<_CharT> > to_string(_CharT __zero = _CharT('0'),
_CharT __one = _CharT('1')) const;
template <class _CharT>
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > to_string(_CharT __zero = _CharT('0'),
_CharT __one = _CharT('1')) const;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
basic_string<char, char_traits<char>, allocator<char> > to_string(char __zero = '0',
char __one = '1') const;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
size_t count() const _NOEXCEPT;
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR size_t size() const _NOEXCEPT {return _Size;}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bool operator==(const bitset& __rhs) const _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bool operator!=(const bitset& __rhs) const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bool test(size_t __pos) const;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bool all() const _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bool any() const _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY bool none() const _NOEXCEPT {return !any();}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool none() const _NOEXCEPT {return !any();}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset operator<<(size_t __pos) const _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset operator>>(size_t __pos) const _NOEXCEPT;
private:
@@ -774,6 +789,7 @@ private:
template <size_t _Size>
template<class _CharT, class>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>::bitset(const _CharT* __str,
typename basic_string<_CharT>::size_type __n,
_CharT __zero, _CharT __one)
@@ -795,6 +811,7 @@ bitset<_Size>::bitset(const _CharT* __str,
template <size_t _Size>
template<class _CharT, class _Traits, class _Allocator>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>::bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
typename basic_string<_CharT,_Traits,_Allocator>::size_type __pos,
typename basic_string<_CharT,_Traits,_Allocator>::size_type __n,
@@ -820,6 +837,7 @@ bitset<_Size>::bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::operator&=(const bitset& __rhs) _NOEXCEPT
{
@@ -829,6 +847,7 @@ bitset<_Size>::operator&=(const bitset& __rhs) _NOEXCEPT
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::operator|=(const bitset& __rhs) _NOEXCEPT
{
@@ -838,6 +857,7 @@ bitset<_Size>::operator|=(const bitset& __rhs) _NOEXCEPT
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::operator^=(const bitset& __rhs) _NOEXCEPT
{
@@ -846,6 +866,7 @@ bitset<_Size>::operator^=(const bitset& __rhs) _NOEXCEPT
}
template <size_t _Size>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::operator<<=(size_t __pos) _NOEXCEPT
{
@@ -856,6 +877,7 @@ bitset<_Size>::operator<<=(size_t __pos) _NOEXCEPT
}
template <size_t _Size>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::operator>>=(size_t __pos) _NOEXCEPT
{
@@ -867,6 +889,7 @@ bitset<_Size>::operator>>=(size_t __pos) _NOEXCEPT
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::set() _NOEXCEPT
{
@@ -875,6 +898,7 @@ bitset<_Size>::set() _NOEXCEPT
}
template <size_t _Size>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::set(size_t __pos, bool __val)
{
@@ -887,6 +911,7 @@ bitset<_Size>::set(size_t __pos, bool __val)
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::reset() _NOEXCEPT
{
@@ -895,6 +920,7 @@ bitset<_Size>::reset() _NOEXCEPT
}
template <size_t _Size>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::reset(size_t __pos)
{
@@ -907,6 +933,7 @@ bitset<_Size>::reset(size_t __pos)
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>
bitset<_Size>::operator~() const _NOEXCEPT
{
@@ -917,6 +944,7 @@ bitset<_Size>::operator~() const _NOEXCEPT
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::flip() _NOEXCEPT
{
@@ -925,6 +953,7 @@ bitset<_Size>::flip() _NOEXCEPT
}
template <size_t _Size>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::flip(size_t __pos)
{
@@ -938,6 +967,7 @@ bitset<_Size>::flip(size_t __pos)
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
unsigned long
bitset<_Size>::to_ulong() const
{
@@ -946,6 +976,7 @@ bitset<_Size>::to_ulong() const
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
unsigned long long
bitset<_Size>::to_ullong() const
{
@@ -954,6 +985,7 @@ bitset<_Size>::to_ullong() const
template <size_t _Size>
template <class _CharT, class _Traits, class _Allocator>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
basic_string<_CharT, _Traits, _Allocator>
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
{
@@ -969,6 +1001,7 @@ bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
template <size_t _Size>
template <class _CharT, class _Traits>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
basic_string<_CharT, _Traits, allocator<_CharT> >
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
{
@@ -978,6 +1011,7 @@ bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
template <size_t _Size>
template <class _CharT>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
{
@@ -986,6 +1020,7 @@ bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
basic_string<char, char_traits<char>, allocator<char> >
bitset<_Size>::to_string(char __zero, char __one) const
{
@@ -994,6 +1029,7 @@ bitset<_Size>::to_string(char __zero, char __one) const
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
size_t
bitset<_Size>::count() const _NOEXCEPT
{
@@ -1002,6 +1038,7 @@ bitset<_Size>::count() const _NOEXCEPT
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bool
bitset<_Size>::operator==(const bitset& __rhs) const _NOEXCEPT
{
@@ -1010,6 +1047,7 @@ bitset<_Size>::operator==(const bitset& __rhs) const _NOEXCEPT
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bool
bitset<_Size>::operator!=(const bitset& __rhs) const _NOEXCEPT
{
@@ -1017,6 +1055,7 @@ bitset<_Size>::operator!=(const bitset& __rhs) const _NOEXCEPT
}
template <size_t _Size>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bool
bitset<_Size>::test(size_t __pos) const
{
@@ -1028,6 +1067,7 @@ bitset<_Size>::test(size_t __pos) const
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bool
bitset<_Size>::all() const _NOEXCEPT
{
@@ -1036,6 +1076,7 @@ bitset<_Size>::all() const _NOEXCEPT
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bool
bitset<_Size>::any() const _NOEXCEPT
{
@@ -1044,6 +1085,7 @@ bitset<_Size>::any() const _NOEXCEPT
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>
bitset<_Size>::operator<<(size_t __pos) const _NOEXCEPT
{
@@ -1054,6 +1096,7 @@ bitset<_Size>::operator<<(size_t __pos) const _NOEXCEPT
template <size_t _Size>
inline
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>
bitset<_Size>::operator>>(size_t __pos) const _NOEXCEPT
{
@@ -1063,7 +1106,7 @@ bitset<_Size>::operator>>(size_t __pos) const _NOEXCEPT
}
template <size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>
operator&(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
{
@@ -1073,7 +1116,7 @@ operator&(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
}
template <size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>
operator|(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
{
@@ -1083,7 +1126,7 @@ operator|(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
}
template <size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>
operator^(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
{
@@ -1102,15 +1145,19 @@ struct _LIBCPP_TEMPLATE_VIS hash<bitset<_Size> >
};
template <class _CharT, class _Traits, size_t _Size>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x);
template <class _CharT, class _Traits, size_t _Size>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x);
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+#endif
+
#endif // _LIBCPP_BITSET
diff --git a/contrib/libs/cxxsupp/libcxx/include/cassert b/contrib/libs/cxxsupp/libcxx/include/cassert
index 28fc0b10e9..761f57dee1 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cassert
+++ b/contrib/libs/cxxsupp/libcxx/include/cassert
@@ -18,7 +18,14 @@ Macros:
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
-#include <assert.h>
+
+// <assert.h> is not provided by libc++
+#if __has_include(<assert.h>)
+# include <assert.h>
+# ifdef _LIBCPP_ASSERT_H
+# error "If libc++ starts defining <assert.h>, the __has_include check should move to libc++'s <assert.h>"
+# endif
+#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/cctype b/contrib/libs/cxxsupp/libcxx/include/cctype
index 248f8d9800..867e7d5b0b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cctype
+++ b/contrib/libs/cxxsupp/libcxx/include/cctype
@@ -36,8 +36,16 @@ int toupper(int c);
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+
#include <ctype.h>
+#ifndef _LIBCPP_CTYPE_H
+# error <cctype> tried including <ctype.h> but didn't find libc++'s <ctype.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/cerrno b/contrib/libs/cxxsupp/libcxx/include/cerrno
index e9eacd35ef..937ec23c69 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cerrno
+++ b/contrib/libs/cxxsupp/libcxx/include/cerrno
@@ -24,8 +24,17 @@ Macros:
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+
#include <errno.h>
+#ifndef _LIBCPP_ERRNO_H
+# error <cerrno> tried including <errno.h> but didn't find libc++'s <errno.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/cfenv b/contrib/libs/cxxsupp/libcxx/include/cfenv
index e42b46680d..16b3761ee2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cfenv
+++ b/contrib/libs/cxxsupp/libcxx/include/cfenv
@@ -54,8 +54,17 @@ int feupdateenv(const fenv_t* envp);
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+
#include <fenv.h>
+#ifndef _LIBCPP_FENV_H
+# error <cfenv> tried including <fenv.h> but didn't find libc++'s <fenv.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/cfloat b/contrib/libs/cxxsupp/libcxx/include/cfloat
index 36a7c51cdd..4f991dd49f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cfloat
+++ b/contrib/libs/cxxsupp/libcxx/include/cfloat
@@ -71,8 +71,17 @@ Macros:
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+
#include <float.h>
+#ifndef _LIBCPP_FLOAT_H
+# error <cfloat> tried including <float.h> but didn't find libc++'s <float.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/charconv b/contrib/libs/cxxsupp/libcxx/include/charconv
index 4f00755a83..4063117b30 100644
--- a/contrib/libs/cxxsupp/libcxx/include/charconv
+++ b/contrib/libs/cxxsupp/libcxx/include/charconv
@@ -30,8 +30,8 @@ namespace std {
friend bool operator==(const to_chars_result&, const to_chars_result&) = default; // since C++20
};
- to_chars_result to_chars(char* first, char* last, see below value,
- int base = 10);
+ constexpr to_chars_result to_chars(char* first, char* last, see below value,
+ int base = 10); // constexpr since C++23
to_chars_result to_chars(char* first, char* last, bool value,
int base = 10) = delete;
@@ -60,8 +60,8 @@ namespace std {
friend bool operator==(const from_chars_result&, const from_chars_result&) = default; // since C++20
};
- from_chars_result from_chars(const char* first, const char* last,
- see below& value, int base = 10);
+ constexpr from_chars_result from_chars(const char* first, const char* last,
+ see below& value, int base = 10); // constexpr since C++23
from_chars_result from_chars(const char* first, const char* last,
float& value,
@@ -77,6 +77,7 @@ namespace std {
*/
+#include <__algorithm/copy_n.h>
#include <__assert> // all public C++ headers provide the assertion handler
#include <__availability>
#include <__bits>
@@ -88,6 +89,7 @@ namespace std {
#include <__config>
#include <__debug>
#include <__errc>
+#include <__memory/addressof.h>
#include <__type_traits/make_32_64_or_128_bit.h>
#include <__utility/unreachable.h>
#include <cmath> // for log2f
@@ -97,10 +99,6 @@ namespace std {
#include <limits>
#include <type_traits>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <iosfwd>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
@@ -110,7 +108,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifndef _LIBCPP_CXX03_LANG
+#if _LIBCPP_STD_VER > 14
to_chars_result to_chars(char*, char*, bool, int = 10) = delete;
from_chars_result from_chars(const char*, const char*, bool, int = 10) = delete;
@@ -134,18 +132,18 @@ struct _LIBCPP_HIDDEN __traits_base<_Tp, __enable_if_t<sizeof(_Tp) <= sizeof(uin
/// function requires its input to have at least one bit set the value of
/// zero is set to one. This means the first element of the lookup table is
/// zero.
- static _LIBCPP_HIDE_FROM_ABI int __width(_Tp __v)
+ static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI int __width(_Tp __v)
{
auto __t = (32 - std::__libcpp_clz(static_cast<type>(__v | 1))) * 1233 >> 12;
- return __t - (__v < __table<>::__pow10_32[__t]) + 1;
+ return __t - (__v < __itoa::__pow10_32[__t]) + 1;
}
- static _LIBCPP_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v)
+ static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v)
{
return __itoa::__base_10_u32(__p, __v);
}
- static _LIBCPP_HIDE_FROM_ABI decltype(__table<>::__pow10_32)& __pow() { return __table<>::__pow10_32; }
+ static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI decltype(__pow10_32)& __pow() { return __itoa::__pow10_32; }
};
template <typename _Tp>
@@ -161,14 +159,14 @@ struct _LIBCPP_HIDDEN
/// function requires its input to have at least one bit set the value of
/// zero is set to one. This means the first element of the lookup table is
/// zero.
- static _LIBCPP_HIDE_FROM_ABI int __width(_Tp __v) {
+ static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI int __width(_Tp __v) {
auto __t = (64 - std::__libcpp_clz(static_cast<type>(__v | 1))) * 1233 >> 12;
- return __t - (__v < __table<>::__pow10_64[__t]) + 1;
+ return __t - (__v < __itoa::__pow10_64[__t]) + 1;
}
- static _LIBCPP_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v) { return __itoa::__base_10_u64(__p, __v); }
+ static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v) { return __itoa::__base_10_u64(__p, __v); }
- static _LIBCPP_HIDE_FROM_ABI decltype(__table<>::__pow10_64)& __pow() { return __table<>::__pow10_64; }
+ static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI decltype(__pow10_64)& __pow() { return __itoa::__pow10_64; }
};
@@ -186,25 +184,25 @@ struct _LIBCPP_HIDDEN
/// function requires its input to have at least one bit set the value of
/// zero is set to one. This means the first element of the lookup table is
/// zero.
- static _LIBCPP_HIDE_FROM_ABI int __width(_Tp __v) {
+ static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI int __width(_Tp __v) {
_LIBCPP_ASSERT(__v > numeric_limits<uint64_t>::max(), "The optimizations for this algorithm fail when this isn't true.");
// There's always a bit set in the upper 64-bits.
auto __t = (128 - std::__libcpp_clz(static_cast<uint64_t>(__v >> 64))) * 1233 >> 12;
- _LIBCPP_ASSERT(__t >= __table<>::__pow10_128_offset, "Index out of bounds");
+ _LIBCPP_ASSERT(__t >= __itoa::__pow10_128_offset, "Index out of bounds");
// __t is adjusted since the lookup table misses the lower entries.
- return __t - (__v < __table<>::__pow10_128[__t - __table<>::__pow10_128_offset]) + 1;
+ return __t - (__v < __itoa::__pow10_128[__t - __itoa::__pow10_128_offset]) + 1;
}
- static _LIBCPP_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v) { return __itoa::__base_10_u128(__p, __v); }
+ static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v) { return __itoa::__base_10_u128(__p, __v); }
// TODO FMT This pow function should get an index.
// By moving this to its own header it can be reused by the pow function in to_chars_base_10.
- static _LIBCPP_HIDE_FROM_ABI decltype(__table<>::__pow10_128)& __pow() { return __table<>::__pow10_128; }
+ static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI decltype(__pow10_128)& __pow() { return __itoa::__pow10_128; }
};
#endif
template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI bool
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool
__mul_overflowed(unsigned char __a, _Tp __b, unsigned char& __r)
{
auto __c = __a * __b;
@@ -213,7 +211,7 @@ __mul_overflowed(unsigned char __a, _Tp __b, unsigned char& __r)
}
template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI bool
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool
__mul_overflowed(unsigned short __a, _Tp __b, unsigned short& __r)
{
auto __c = __a * __b;
@@ -222,22 +220,16 @@ __mul_overflowed(unsigned short __a, _Tp __b, unsigned short& __r)
}
template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI bool
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool
__mul_overflowed(_Tp __a, _Tp __b, _Tp& __r)
{
static_assert(is_unsigned<_Tp>::value, "");
-#if !defined(_LIBCPP_COMPILER_MSVC)
return __builtin_mul_overflow(__a, __b, &__r);
-#else
- bool __did = __b && (numeric_limits<_Tp>::max() / __b) < __a;
- __r = __a * __b;
- return __did;
-#endif
}
template <typename _Tp, typename _Up>
inline _LIBCPP_HIDE_FROM_ABI bool
-__mul_overflowed(_Tp __a, _Up __b, _Tp& __r)
+_LIBCPP_CONSTEXPR_SINCE_CXX23 __mul_overflowed(_Tp __a, _Up __b, _Tp& __r)
{
return __mul_overflowed(__a, static_cast<_Tp>(__b), __r);
}
@@ -250,7 +242,7 @@ struct _LIBCPP_HIDDEN __traits : __traits_base<_Tp>
using typename __traits_base<_Tp>::type;
// precondition: at least one non-zero character available
- static _LIBCPP_HIDE_FROM_ABI char const*
+ static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI char const*
__read(char const* __p, char const* __ep, type& __a, type& __b)
{
type __cprod[digits];
@@ -258,7 +250,7 @@ struct _LIBCPP_HIDDEN __traits : __traits_base<_Tp>
int __i = digits;
do
{
- if (!('0' <= *__p && *__p <= '9'))
+ if (*__p < '0' || *__p > '9')
break;
__cprod[--__i] = *__p++ - '0';
} while (__p != __ep && __i != 0);
@@ -271,7 +263,7 @@ struct _LIBCPP_HIDDEN __traits : __traits_base<_Tp>
}
template <typename _It1, typename _It2, class _Up>
- static _LIBCPP_HIDE_FROM_ABI _Up
+ static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI _Up
__inner_product(_It1 __first1, _It1 __last1, _It2 __first2, _Up __init)
{
for (; __first1 < __last1; ++__first1, ++__first2)
@@ -283,7 +275,7 @@ struct _LIBCPP_HIDDEN __traits : __traits_base<_Tp>
} // namespace __itoa
template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _Tp
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI _Tp
__complement(_Tp __x)
{
static_assert(is_unsigned<_Tp>::value, "cast to unsigned first");
@@ -291,7 +283,7 @@ __complement(_Tp __x)
}
template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI to_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_itoa(char* __first, char* __last, _Tp __value, true_type)
{
auto __x = __to_unsigned_like(__value);
@@ -305,7 +297,7 @@ __to_chars_itoa(char* __first, char* __last, _Tp __value, true_type)
}
template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI to_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_itoa(char* __first, char* __last, _Tp __value, false_type)
{
using __tx = __itoa::__traits<_Tp>;
@@ -319,7 +311,7 @@ __to_chars_itoa(char* __first, char* __last, _Tp __value, false_type)
# ifndef _LIBCPP_HAS_NO_INT128
template <>
-inline _LIBCPP_HIDE_FROM_ABI to_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_itoa(char* __first, char* __last, __uint128_t __value, false_type)
{
// When the value fits in 64-bits use the 64-bit code path. This reduces
@@ -340,7 +332,7 @@ __to_chars_itoa(char* __first, char* __last, __uint128_t __value, false_type)
#endif
template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI to_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_integral(char* __first, char* __last, _Tp __value, int __base,
true_type)
{
@@ -370,7 +362,7 @@ struct _LIBCPP_HIDDEN __integral<2> {
}
template <typename _Tp>
- _LIBCPP_HIDE_FROM_ABI static to_chars_result __to_chars(char* __first, char* __last, _Tp __value) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI static to_chars_result __to_chars(char* __first, char* __last, _Tp __value) {
ptrdiff_t __cap = __last - __first;
int __n = __width(__value);
if (__n > __cap)
@@ -383,7 +375,7 @@ struct _LIBCPP_HIDDEN __integral<2> {
unsigned __c = __value % __divisor;
__value /= __divisor;
__p -= 4;
- std::memcpy(__p, &__table<>::__base_2_lut[4 * __c], 4);
+ std::copy_n(&__base_2_lut[4 * __c], 4, __p);
}
do {
unsigned __c = __value % 2;
@@ -405,7 +397,7 @@ struct _LIBCPP_HIDDEN __integral<8> {
}
template <typename _Tp>
- _LIBCPP_HIDE_FROM_ABI static to_chars_result __to_chars(char* __first, char* __last, _Tp __value) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI static to_chars_result __to_chars(char* __first, char* __last, _Tp __value) {
ptrdiff_t __cap = __last - __first;
int __n = __width(__value);
if (__n > __cap)
@@ -418,7 +410,7 @@ struct _LIBCPP_HIDDEN __integral<8> {
unsigned __c = __value % __divisor;
__value /= __divisor;
__p -= 2;
- std::memcpy(__p, &__table<>::__base_8_lut[2 * __c], 2);
+ std::copy_n(&__base_8_lut[2 * __c], 2, __p);
}
do {
unsigned __c = __value % 8;
@@ -441,7 +433,7 @@ struct _LIBCPP_HIDDEN __integral<16> {
}
template <typename _Tp>
- _LIBCPP_HIDE_FROM_ABI static to_chars_result __to_chars(char* __first, char* __last, _Tp __value) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI static to_chars_result __to_chars(char* __first, char* __last, _Tp __value) {
ptrdiff_t __cap = __last - __first;
int __n = __width(__value);
if (__n > __cap)
@@ -454,7 +446,7 @@ struct _LIBCPP_HIDDEN __integral<16> {
unsigned __c = __value % __divisor;
__value /= __divisor;
__p -= 2;
- std::memcpy(__p, &__table<>::__base_16_lut[2 * __c], 2);
+ std::copy_n(&__base_16_lut[2 * __c], 2, __p);
}
if (__first != __last)
do {
@@ -470,34 +462,34 @@ struct _LIBCPP_HIDDEN __integral<16> {
template <unsigned _Base, typename _Tp,
typename enable_if<(sizeof(_Tp) >= sizeof(unsigned)), int>::type = 0>
-_LIBCPP_HIDE_FROM_ABI int
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI int
__to_chars_integral_width(_Tp __value) {
return __itoa::__integral<_Base>::__width(__value);
}
template <unsigned _Base, typename _Tp,
typename enable_if<(sizeof(_Tp) < sizeof(unsigned)), int>::type = 0>
-_LIBCPP_HIDE_FROM_ABI int
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI int
__to_chars_integral_width(_Tp __value) {
return std::__to_chars_integral_width<_Base>(static_cast<unsigned>(__value));
}
template <unsigned _Base, typename _Tp,
typename enable_if<(sizeof(_Tp) >= sizeof(unsigned)), int>::type = 0>
-_LIBCPP_HIDE_FROM_ABI to_chars_result
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_integral(char* __first, char* __last, _Tp __value) {
return __itoa::__integral<_Base>::__to_chars(__first, __last, __value);
}
template <unsigned _Base, typename _Tp,
typename enable_if<(sizeof(_Tp) < sizeof(unsigned)), int>::type = 0>
-_LIBCPP_HIDE_FROM_ABI to_chars_result
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_integral(char* __first, char* __last, _Tp __value) {
return std::__to_chars_integral<_Base>(__first, __last, static_cast<unsigned>(__value));
}
template <typename _Tp>
-_LIBCPP_HIDE_FROM_ABI int
+_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI int
__to_chars_integral_width(_Tp __value, unsigned __base) {
_LIBCPP_ASSERT(__value >= 0, "The function requires a non-negative value.");
@@ -524,7 +516,7 @@ __to_chars_integral_width(_Tp __value, unsigned __base) {
}
template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI to_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_integral(char* __first, char* __last, _Tp __value, int __base,
false_type)
{
@@ -556,7 +548,7 @@ __to_chars_integral(char* __first, char* __last, _Tp __value, int __base,
}
template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI to_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
to_chars(char* __first, char* __last, _Tp __value)
{
using _Type = __make_32_64_or_128_bit_t<_Tp>;
@@ -565,7 +557,7 @@ to_chars(char* __first, char* __last, _Tp __value)
}
template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI to_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
to_chars(char* __first, char* __last, _Tp __value, int __base)
{
_LIBCPP_ASSERT(2 <= __base && __base <= 36, "base not in [2, 36]");
@@ -575,7 +567,7 @@ to_chars(char* __first, char* __last, _Tp __value, int __base)
}
template <typename _It, typename _Tp, typename _Fn, typename... _Ts>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI from_chars_result
__sign_combinator(_It __first, _It __last, _Tp& __value, _Fn __f, _Ts... __args)
{
using __tl = numeric_limits<_Tp>;
@@ -598,7 +590,7 @@ __sign_combinator(_It __first, _It __last, _Tp& __value, _Fn __f, _Ts... __args)
if (__x <= __complement(__to_unsigned_like(__tl::min())))
{
__x = __complement(__x);
- std::memcpy(&__value, &__x, sizeof(__x));
+ std::copy_n(std::addressof(__x), 1, std::addressof(__value));
return __r;
}
}
@@ -615,7 +607,7 @@ __sign_combinator(_It __first, _It __last, _Tp& __value, _Fn __f, _Ts... __args)
}
template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI bool
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool
__in_pattern(_Tp __c)
{
return '0' <= __c && __c <= '9';
@@ -626,11 +618,11 @@ struct _LIBCPP_HIDDEN __in_pattern_result
bool __ok;
int __val;
- explicit _LIBCPP_HIDE_FROM_ABI operator bool() const { return __ok; }
+ explicit _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI operator bool() const { return __ok; }
};
template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI __in_pattern_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI __in_pattern_result
__in_pattern(_Tp __c, int __base)
{
if (__base <= 10)
@@ -644,7 +636,7 @@ __in_pattern(_Tp __c, int __base)
}
template <typename _It, typename _Tp, typename _Fn, typename... _Ts>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI from_chars_result
__subject_seq_combinator(_It __first, _It __last, _Tp& __value, _Fn __f,
_Ts... __args)
{
@@ -681,7 +673,7 @@ __subject_seq_combinator(_It __first, _It __last, _Tp& __value, _Fn __f,
}
template <typename _Tp, typename enable_if<is_unsigned<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI from_chars_result
__from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
{
using __tx = __itoa::__traits<_Tp>;
@@ -707,15 +699,34 @@ __from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
}
template <typename _Tp, typename enable_if<is_signed<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI from_chars_result
__from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
{
using __t = decltype(__to_unsigned_like(__value));
return __sign_combinator(__first, __last, __value, __from_chars_atoi<__t>);
}
+
+/*
+// Code used to generate __from_chars_log2f_lut.
+#include <cmath>
+#include <iostream>
+#include <format>
+
+int main() {
+ for (int i = 2; i <= 36; ++i)
+ std::cout << std::format("{},\n", log2f(i));
+}
+*/
+/// log2f table for bases [2, 36].
+inline constexpr float __from_chars_log2f_lut[35] = {
+ 1, 1.5849625, 2, 2.321928, 2.5849626, 2.807355, 3, 3.169925, 3.321928,
+ 3.4594316, 3.5849626, 3.7004397, 3.807355, 3.9068906, 4, 4.087463, 4.169925, 4.2479277,
+ 4.321928, 4.3923173, 4.4594316, 4.523562, 4.5849624, 4.643856, 4.70044, 4.7548876, 4.807355,
+ 4.857981, 4.9068904, 4.9541965, 5, 5.044394, 5.087463, 5.129283, 5.169925};
+
template <typename _Tp, typename enable_if<is_unsigned<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI from_chars_result
__from_chars_integral(const char* __first, const char* __last, _Tp& __value,
int __base)
{
@@ -727,7 +738,8 @@ __from_chars_integral(const char* __first, const char* __last, _Tp& __value,
[](const char* __p, const char* __lastp, _Tp& __val,
int __b) -> from_chars_result {
using __tl = numeric_limits<_Tp>;
- auto __digits = __tl::digits / log2f(float(__b));
+ // __base is always between 2 and 36 inclusive.
+ auto __digits = __tl::digits / __from_chars_log2f_lut[__b - 2];
_Tp __x = __in_pattern(*__p++, __b).__val, __y = 0;
for (int __i = 1; __p != __lastp; ++__i, ++__p)
@@ -762,7 +774,7 @@ __from_chars_integral(const char* __first, const char* __last, _Tp& __value,
}
template <typename _Tp, typename enable_if<is_signed<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI from_chars_result
__from_chars_integral(const char* __first, const char* __last, _Tp& __value,
int __base)
{
@@ -772,24 +784,20 @@ __from_chars_integral(const char* __first, const char* __last, _Tp& __value,
}
template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI from_chars_result
from_chars(const char* __first, const char* __last, _Tp& __value)
{
return __from_chars_atoi(__first, __last, __value);
}
template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI from_chars_result
from_chars(const char* __first, const char* __last, _Tp& __value, int __base)
{
_LIBCPP_ASSERT(2 <= __base && __base <= 36, "base not in [2, 36]");
return __from_chars_integral(__first, __last, __value, __base);
}
-// Floating-point implementation starts here.
-// Unlike the other parts of charconv this is only available in C++17 and newer.
-#if _LIBCPP_STD_VER > 14
-
_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS
to_chars_result to_chars(char* __first, char* __last, float __value);
@@ -817,11 +825,15 @@ to_chars_result to_chars(char* __first, char* __last, double __value, chars_form
_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS
to_chars_result to_chars(char* __first, char* __last, long double __value, chars_format __fmt, int __precision);
-# endif // _LIBCPP_STD_VER > 14
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCPP_STD_VER > 14
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <iosfwd>
+#endif
+
#endif // _LIBCPP_CHARCONV
diff --git a/contrib/libs/cxxsupp/libcxx/include/chrono b/contrib/libs/cxxsupp/libcxx/include/chrono
index 2af5fbcc51..40fea6f336 100644
--- a/contrib/libs/cxxsupp/libcxx/include/chrono
+++ b/contrib/libs/cxxsupp/libcxx/include/chrono
@@ -207,7 +207,11 @@ template <class ToDuration, class Rep, class Period>
template <class ToDuration, class Rep, class Period>
constexpr ToDuration round(const duration<Rep, Period>& d); // C++17
-// duration I/O is elsewhere
+// duration I/O
+template<class charT, class traits, class Rep, class Period> // C++20
+ basic_ostream<charT, traits>&
+ operator<<(basic_ostream<charT, traits>& os,
+ const duration<Rep, Period>& d);
// time_point arithmetic (all constexpr in C++14)
template <class Clock, class Duration1, class Rep2, class Period2>
@@ -332,32 +336,35 @@ constexpr day operator+(const day& x, const days& y) noexcept;
constexpr day operator+(const days& x, const day& y) noexcept;
constexpr day operator-(const day& x, const days& y) noexcept;
constexpr days operator-(const day& x, const day& y) noexcept;
+template<class charT, class traits>
+ basic_ostream<charT, traits>&
+ operator<<(basic_ostream<charT, traits>& os, const day& d);
// 25.8.4, class month // C++20
class month;
constexpr bool operator==(const month& x, const month& y) noexcept;
-constexpr bool operator!=(const month& x, const month& y) noexcept;
-constexpr bool operator< (const month& x, const month& y) noexcept;
-constexpr bool operator> (const month& x, const month& y) noexcept;
-constexpr bool operator<=(const month& x, const month& y) noexcept;
-constexpr bool operator>=(const month& x, const month& y) noexcept;
+constexpr strong_ordering operator<=>(const month& x, const month& y) noexcept;
+
constexpr month operator+(const month& x, const months& y) noexcept;
constexpr month operator+(const months& x, const month& y) noexcept;
constexpr month operator-(const month& x, const months& y) noexcept;
constexpr months operator-(const month& x, const month& y) noexcept;
+template<class charT, class traits>
+ basic_ostream<charT, traits>&
+ operator<<(basic_ostream<charT, traits>& os, const month& m);
// 25.8.5, class year // C++20
class year;
constexpr bool operator==(const year& x, const year& y) noexcept;
-constexpr bool operator!=(const year& x, const year& y) noexcept;
-constexpr bool operator< (const year& x, const year& y) noexcept;
-constexpr bool operator> (const year& x, const year& y) noexcept;
-constexpr bool operator<=(const year& x, const year& y) noexcept;
-constexpr bool operator>=(const year& x, const year& y) noexcept;
+constexpr strong_ordering operator<=>(const year& x, const year& y) noexcept;
+
constexpr year operator+(const year& x, const years& y) noexcept;
constexpr year operator+(const years& x, const year& y) noexcept;
constexpr year operator-(const year& x, const years& y) noexcept;
constexpr years operator-(const year& x, const year& y) noexcept;
+template<class charT, class traits>
+ basic_ostream<charT, traits>&
+ operator<<(basic_ostream<charT, traits>& os, const year& y);
// 25.8.6, class weekday // C++20
class weekday;
@@ -368,6 +375,9 @@ constexpr weekday operator+(const weekday& x, const days& y) noexcept;
constexpr weekday operator+(const days& x, const weekday& y) noexcept;
constexpr weekday operator-(const weekday& x, const days& y) noexcept;
constexpr days operator-(const weekday& x, const weekday& y) noexcept;
+template<class charT, class traits>
+ basic_ostream<charT, traits>&
+ operator<<(basic_ostream<charT, traits>& os, const weekday& wd);
// 25.8.7, class weekday_indexed // C++20
@@ -385,22 +395,14 @@ constexpr bool operator!=(const weekday_last& x, const weekday_last& y) noexcept
class month_day;
constexpr bool operator==(const month_day& x, const month_day& y) noexcept;
-constexpr bool operator!=(const month_day& x, const month_day& y) noexcept;
-constexpr bool operator< (const month_day& x, const month_day& y) noexcept;
-constexpr bool operator> (const month_day& x, const month_day& y) noexcept;
-constexpr bool operator<=(const month_day& x, const month_day& y) noexcept;
-constexpr bool operator>=(const month_day& x, const month_day& y) noexcept;
+constexpr strong_ordering operator<=>(const month_day& x, const month_day& y) noexcept;
// 25.8.10, class month_day_last // C++20
class month_day_last;
constexpr bool operator==(const month_day_last& x, const month_day_last& y) noexcept;
-constexpr bool operator!=(const month_day_last& x, const month_day_last& y) noexcept;
-constexpr bool operator< (const month_day_last& x, const month_day_last& y) noexcept;
-constexpr bool operator> (const month_day_last& x, const month_day_last& y) noexcept;
-constexpr bool operator<=(const month_day_last& x, const month_day_last& y) noexcept;
-constexpr bool operator>=(const month_day_last& x, const month_day_last& y) noexcept;
+constexpr strong_ordering operator<=>(const month_day_last& x, const month_day_last& y) noexcept;
// 25.8.11, class month_weekday // C++20
class month_weekday;
@@ -419,11 +421,7 @@ constexpr bool operator!=(const month_weekday_last& x, const month_weekday_last&
class year_month;
constexpr bool operator==(const year_month& x, const year_month& y) noexcept;
-constexpr bool operator!=(const year_month& x, const year_month& y) noexcept;
-constexpr bool operator< (const year_month& x, const year_month& y) noexcept;
-constexpr bool operator> (const year_month& x, const year_month& y) noexcept;
-constexpr bool operator<=(const year_month& x, const year_month& y) noexcept;
-constexpr bool operator>=(const year_month& x, const year_month& y) noexcept;
+constexpr strong_ordering operator<=>(const year_month& x, const year_month& y) noexcept;
constexpr year_month operator+(const year_month& ym, const months& dm) noexcept;
constexpr year_month operator+(const months& dm, const year_month& ym) noexcept;
@@ -437,11 +435,7 @@ constexpr year_month operator-(const year_month& ym, const years& dy) noexcept;
year_month_day;
constexpr bool operator==(const year_month_day& x, const year_month_day& y) noexcept;
-constexpr bool operator!=(const year_month_day& x, const year_month_day& y) noexcept;
-constexpr bool operator< (const year_month_day& x, const year_month_day& y) noexcept;
-constexpr bool operator> (const year_month_day& x, const year_month_day& y) noexcept;
-constexpr bool operator<=(const year_month_day& x, const year_month_day& y) noexcept;
-constexpr bool operator>=(const year_month_day& x, const year_month_day& y) noexcept;
+constexpr strong_ordering operator<=>(const year_month_day& x, const year_month_day& y) noexcept;
constexpr year_month_day operator+(const year_month_day& ymd, const months& dm) noexcept;
constexpr year_month_day operator+(const months& dm, const year_month_day& ymd) noexcept;
@@ -454,18 +448,8 @@ constexpr year_month_day operator-(const year_month_day& ymd, const years& dy) n
// 25.8.15, class year_month_day_last // C++20
class year_month_day_last;
-constexpr bool operator==(const year_month_day_last& x,
- const year_month_day_last& y) noexcept;
-constexpr bool operator!=(const year_month_day_last& x,
- const year_month_day_last& y) noexcept;
-constexpr bool operator< (const year_month_day_last& x,
- const year_month_day_last& y) noexcept;
-constexpr bool operator> (const year_month_day_last& x,
- const year_month_day_last& y) noexcept;
-constexpr bool operator<=(const year_month_day_last& x,
- const year_month_day_last& y) noexcept;
-constexpr bool operator>=(const year_month_day_last& x,
- const year_month_day_last& y) noexcept;
+constexpr bool operator==(const year_month_day_last& x, const year_month_day_last& y) noexcept;
+constexpr strong_ordering operator<=>(const year_month_day_last_day& x, const year_month_day_last_day& y) noexcept;
constexpr year_month_day_last
operator+(const year_month_day_last& ymdl, const months& dm) noexcept;
@@ -645,7 +629,18 @@ bool operator<(const time_zone& x, const time_zone& y) noexcept;
bool operator>(const time_zone& x, const time_zone& y) noexcept;
bool operator<=(const time_zone& x, const time_zone& y) noexcept;
bool operator>=(const time_zone& x, const time_zone& y) noexcept;
+} // chrono
+namespace std {
+ template<class Rep, class Period, class charT>
+ struct formatter<chrono::duration<Rep, Period>, charT>; // C++20
+ template<class charT> struct formatter<chrono::day, charT>; // C++20
+ template<class charT> struct formatter<chrono::month, charT>; // C++20
+ template<class charT> struct formatter<chrono::year, charT>; // C++20
+ template<class charT> struct formatter<chrono::weekday, charT>; // C++20
+} // namespace std
+
+namespace chrono {
// calendrical constants
inline constexpr last_spec last{}; // C++20
inline constexpr chrono::weekday Sunday{0}; // C++20
@@ -695,6 +690,7 @@ constexpr chrono::year operator ""y(unsigned lo
#include <__assert> // all public C++ headers provide the assertion handler
#include <__chrono/calendar.h>
#include <__chrono/convert_to_timespec.h>
+#include <__chrono/convert_to_tm.h>
#include <__chrono/day.h>
#include <__chrono/duration.h>
#include <__chrono/file_clock.h>
@@ -716,10 +712,24 @@ constexpr chrono::year operator ""y(unsigned lo
#include <version>
// standard-mandated includes
+
+// [time.syn]
#include <compare>
+#if 0
+# include <__chrono/formatter.h>
+# include <__chrono/ostream.h>
+# include <__chrono/parser_std_format_spec.h>
+# include <__chrono/statically_widen.h>
+#endif
+
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+#endif
+
#endif // _LIBCPP_CHRONO
diff --git a/contrib/libs/cxxsupp/libcxx/include/cinttypes b/contrib/libs/cxxsupp/libcxx/include/cinttypes
index a4cfe961cc..a5b9558abd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cinttypes
+++ b/contrib/libs/cxxsupp/libcxx/include/cinttypes
@@ -236,9 +236,22 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+
+// standard-mandated includes
+
+// [cinttypes.syn]
#include <cstdint>
+
#include <inttypes.h>
+#ifndef _LIBCPP_INTTYPES_H
+# error <cinttypes> tried including <inttypes.h> but didn't find libc++'s <inttypes.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/climits b/contrib/libs/cxxsupp/libcxx/include/climits
index 16800a652f..d773af50d2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/climits
+++ b/contrib/libs/cxxsupp/libcxx/include/climits
@@ -39,8 +39,17 @@ Macros:
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+
#include <limits.h>
+#ifndef _LIBCPP_LIMITS_H
+# error <climits> tried including <limits.h> but didn't find libc++'s <limits.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/clocale b/contrib/libs/cxxsupp/libcxx/include/clocale
index 8926042075..e2ace355d7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/clocale
+++ b/contrib/libs/cxxsupp/libcxx/include/clocale
@@ -36,8 +36,17 @@ lconv* localeconv();
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+
#include <locale.h>
+#ifndef _LIBCPP_LOCALE_H
+# error <clocale> tried including <locale.h> but didn't find libc++'s <locale.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/cmath b/contrib/libs/cxxsupp/libcxx/include/cmath
index 4d81eed339..ef3a67843e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cmath
+++ b/contrib/libs/cxxsupp/libcxx/include/cmath
@@ -306,10 +306,19 @@ constexpr long double lerp(long double a, long double b, long double t) noexcept
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
-#include <math.h>
#include <type_traits>
#include <version>
+#include <math.h>
+
+#ifndef _LIBCPP_MATH_H
+# error <cmath> tried including <math.h> but didn't find libc++'s <math.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
@@ -615,7 +624,7 @@ __libcpp_isfinite_or_builtin(_A1 __lcpp_x) _NOEXCEPT
#if _LIBCPP_STD_VER > 17
template <typename _Fp>
-constexpr
+_LIBCPP_HIDE_FROM_ABI constexpr
_Fp __lerp(_Fp __a, _Fp __b, _Fp __t) noexcept {
if ((__a <= 0 && __b >= 0) || (__a >= 0 && __b <= 0))
return __t * __b + (1 - __t) * __a;
@@ -628,13 +637,13 @@ _Fp __lerp(_Fp __a, _Fp __b, _Fp __t) noexcept {
return __x < __b ? __x : __b;
}
-constexpr float
+_LIBCPP_HIDE_FROM_ABI constexpr float
lerp(float __a, float __b, float __t) _NOEXCEPT { return __lerp(__a, __b, __t); }
-constexpr double
+_LIBCPP_HIDE_FROM_ABI constexpr double
lerp(double __a, double __b, double __t) _NOEXCEPT { return __lerp(__a, __b, __t); }
-constexpr long double
+_LIBCPP_HIDE_FROM_ABI constexpr long double
lerp(long double __a, long double __b, long double __t) _NOEXCEPT { return __lerp(__a, __b, __t); }
template <class _A1, class _A2, class _A3>
diff --git a/contrib/libs/cxxsupp/libcxx/include/codecvt b/contrib/libs/cxxsupp/libcxx/include/codecvt
index 9f18a7b1a9..ce378c8d1c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/codecvt
+++ b/contrib/libs/cxxsupp/libcxx/include/codecvt
@@ -81,9 +81,9 @@ template <>
class _LIBCPP_TYPE_VIS __codecvt_utf8<wchar_t>
: public codecvt<wchar_t, char, mbstate_t>
{
- unsigned long _Maxcode_;
+ unsigned long __maxcode_;
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
- codecvt_mode _Mode_;
+ codecvt_mode __mode_;
_LIBCPP_SUPPRESS_DEPRECATED_POP
public:
typedef wchar_t intern_type;
@@ -94,26 +94,22 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH
_LIBCPP_INLINE_VISIBILITY
explicit __codecvt_utf8(size_t __refs, unsigned long __maxcode,
codecvt_mode __mode)
- : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
- _Mode_(__mode) {}
+ : codecvt<wchar_t, char, mbstate_t>(__refs), __maxcode_(__maxcode),
+ __mode_(__mode) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
- virtual result
- do_out(state_type& __st,
- const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual result
- do_in(state_type& __st,
- const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
- intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
- virtual result
- do_unshift(state_type& __st,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual int do_encoding() const _NOEXCEPT;
- virtual bool do_always_noconv() const _NOEXCEPT;
- virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
- size_t __mx) const;
- virtual int do_max_length() const _NOEXCEPT;
+ result do_out(state_type& __st,
+ const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ result do_in(state_type& __st,
+ const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
+ intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const override;
+ result do_unshift(state_type& __st,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ int do_encoding() const _NOEXCEPT override;
+ bool do_always_noconv() const _NOEXCEPT override;
+ int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
+ int do_max_length() const _NOEXCEPT override;
};
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
@@ -122,8 +118,8 @@ template <>
class _LIBCPP_TYPE_VIS __codecvt_utf8<char16_t>
: public codecvt<char16_t, char, mbstate_t>
{
- unsigned long _Maxcode_;
- codecvt_mode _Mode_;
+ unsigned long __maxcode_;
+ codecvt_mode __mode_;
public:
typedef char16_t intern_type;
typedef char extern_type;
@@ -132,27 +128,23 @@ public:
_LIBCPP_INLINE_VISIBILITY
explicit __codecvt_utf8(size_t __refs, unsigned long __maxcode,
codecvt_mode __mode)
- : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
- _Mode_(__mode) {}
+ : codecvt<char16_t, char, mbstate_t>(__refs), __maxcode_(__maxcode),
+ __mode_(__mode) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
- virtual result
- do_out(state_type& __st,
- const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual result
- do_in(state_type& __st,
- const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
- intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
- virtual result
- do_unshift(state_type& __st,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual int do_encoding() const _NOEXCEPT;
- virtual bool do_always_noconv() const _NOEXCEPT;
- virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
- size_t __mx) const;
- virtual int do_max_length() const _NOEXCEPT;
+ result do_out(state_type& __st,
+ const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ result do_in(state_type& __st,
+ const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
+ intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const override;
+ result do_unshift(state_type& __st,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ int do_encoding() const _NOEXCEPT override;
+ bool do_always_noconv() const _NOEXCEPT override;
+ int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
+ int do_max_length() const _NOEXCEPT override;
};
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -160,8 +152,8 @@ template <>
class _LIBCPP_TYPE_VIS __codecvt_utf8<char32_t>
: public codecvt<char32_t, char, mbstate_t>
{
- unsigned long _Maxcode_;
- codecvt_mode _Mode_;
+ unsigned long __maxcode_;
+ codecvt_mode __mode_;
public:
typedef char32_t intern_type;
typedef char extern_type;
@@ -170,27 +162,23 @@ public:
_LIBCPP_INLINE_VISIBILITY
explicit __codecvt_utf8(size_t __refs, unsigned long __maxcode,
codecvt_mode __mode)
- : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
- _Mode_(__mode) {}
+ : codecvt<char32_t, char, mbstate_t>(__refs), __maxcode_(__maxcode),
+ __mode_(__mode) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
- virtual result
- do_out(state_type& __st,
- const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual result
- do_in(state_type& __st,
- const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
- intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
- virtual result
- do_unshift(state_type& __st,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual int do_encoding() const _NOEXCEPT;
- virtual bool do_always_noconv() const _NOEXCEPT;
- virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
- size_t __mx) const;
- virtual int do_max_length() const _NOEXCEPT;
+ result do_out(state_type& __st,
+ const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ result do_in(state_type& __st,
+ const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
+ intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const override;
+ result do_unshift(state_type& __st,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ int do_encoding() const _NOEXCEPT override;
+ bool do_always_noconv() const _NOEXCEPT override;
+ int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
+ int do_max_length() const _NOEXCEPT override;
};
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -218,9 +206,9 @@ template <>
class _LIBCPP_TYPE_VIS __codecvt_utf16<wchar_t, false>
: public codecvt<wchar_t, char, mbstate_t>
{
- unsigned long _Maxcode_;
+ unsigned long __maxcode_;
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
- codecvt_mode _Mode_;
+ codecvt_mode __mode_;
_LIBCPP_SUPPRESS_DEPRECATED_POP
public:
typedef wchar_t intern_type;
@@ -231,35 +219,32 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH
_LIBCPP_INLINE_VISIBILITY
explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode,
codecvt_mode __mode)
- : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
- _Mode_(__mode) {}
+ : codecvt<wchar_t, char, mbstate_t>(__refs), __maxcode_(__maxcode),
+ __mode_(__mode) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
- virtual result
- do_out(state_type& __st,
- const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual result
- do_in(state_type& __st,
- const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
- intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
- virtual result
- do_unshift(state_type& __st,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual int do_encoding() const _NOEXCEPT;
- virtual bool do_always_noconv() const _NOEXCEPT;
- virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
- size_t __mx) const;
- virtual int do_max_length() const _NOEXCEPT;
+ result do_out(state_type& __st,
+ const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ result do_in(state_type& __st,
+ const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
+ intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const override;
+ result do_unshift(state_type& __st,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ int do_encoding() const _NOEXCEPT override;
+ bool do_always_noconv() const _NOEXCEPT override;
+ int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
+ size_t __mx) const override;
+ int do_max_length() const _NOEXCEPT override;
};
template <>
class _LIBCPP_TYPE_VIS __codecvt_utf16<wchar_t, true>
: public codecvt<wchar_t, char, mbstate_t>
{
- unsigned long _Maxcode_;
+ unsigned long __maxcode_;
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
- codecvt_mode _Mode_;
+ codecvt_mode __mode_;
_LIBCPP_SUPPRESS_DEPRECATED_POP
public:
typedef wchar_t intern_type;
@@ -270,26 +255,22 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH
_LIBCPP_INLINE_VISIBILITY
explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode,
codecvt_mode __mode)
- : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
- _Mode_(__mode) {}
+ : codecvt<wchar_t, char, mbstate_t>(__refs), __maxcode_(__maxcode),
+ __mode_(__mode) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
- virtual result
- do_out(state_type& __st,
- const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual result
- do_in(state_type& __st,
- const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
- intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
- virtual result
- do_unshift(state_type& __st,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual int do_encoding() const _NOEXCEPT;
- virtual bool do_always_noconv() const _NOEXCEPT;
- virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
- size_t __mx) const;
- virtual int do_max_length() const _NOEXCEPT;
+ result do_out(state_type& __st,
+ const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ result do_in(state_type& __st,
+ const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
+ intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const override;
+ result do_unshift(state_type& __st,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ int do_encoding() const _NOEXCEPT override;
+ bool do_always_noconv() const _NOEXCEPT override;
+ int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
+ int do_max_length() const _NOEXCEPT override;
};
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
@@ -298,8 +279,8 @@ template <>
class _LIBCPP_TYPE_VIS __codecvt_utf16<char16_t, false>
: public codecvt<char16_t, char, mbstate_t>
{
- unsigned long _Maxcode_;
- codecvt_mode _Mode_;
+ unsigned long __maxcode_;
+ codecvt_mode __mode_;
public:
typedef char16_t intern_type;
typedef char extern_type;
@@ -308,27 +289,23 @@ public:
_LIBCPP_INLINE_VISIBILITY
explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode,
codecvt_mode __mode)
- : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
- _Mode_(__mode) {}
+ : codecvt<char16_t, char, mbstate_t>(__refs), __maxcode_(__maxcode),
+ __mode_(__mode) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
- virtual result
- do_out(state_type& __st,
- const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual result
- do_in(state_type& __st,
- const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
- intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
- virtual result
- do_unshift(state_type& __st,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual int do_encoding() const _NOEXCEPT;
- virtual bool do_always_noconv() const _NOEXCEPT;
- virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
- size_t __mx) const;
- virtual int do_max_length() const _NOEXCEPT;
+ result do_out(state_type& __st,
+ const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ result do_in(state_type& __st,
+ const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
+ intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const override;
+ result do_unshift(state_type& __st,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ int do_encoding() const _NOEXCEPT override;
+ bool do_always_noconv() const _NOEXCEPT override;
+ int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
+ int do_max_length() const _NOEXCEPT override;
};
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -336,8 +313,8 @@ template <>
class _LIBCPP_TYPE_VIS __codecvt_utf16<char16_t, true>
: public codecvt<char16_t, char, mbstate_t>
{
- unsigned long _Maxcode_;
- codecvt_mode _Mode_;
+ unsigned long __maxcode_;
+ codecvt_mode __mode_;
public:
typedef char16_t intern_type;
typedef char extern_type;
@@ -346,27 +323,23 @@ public:
_LIBCPP_INLINE_VISIBILITY
explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode,
codecvt_mode __mode)
- : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
- _Mode_(__mode) {}
+ : codecvt<char16_t, char, mbstate_t>(__refs), __maxcode_(__maxcode),
+ __mode_(__mode) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
- virtual result
- do_out(state_type& __st,
- const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual result
- do_in(state_type& __st,
- const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
- intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
- virtual result
- do_unshift(state_type& __st,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual int do_encoding() const _NOEXCEPT;
- virtual bool do_always_noconv() const _NOEXCEPT;
- virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
- size_t __mx) const;
- virtual int do_max_length() const _NOEXCEPT;
+ result do_out(state_type& __st,
+ const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ result do_in(state_type& __st,
+ const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
+ intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const override;
+ result do_unshift(state_type& __st,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ int do_encoding() const _NOEXCEPT override;
+ bool do_always_noconv() const _NOEXCEPT override;
+ int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
+ int do_max_length() const _NOEXCEPT override;
};
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -374,8 +347,8 @@ template <>
class _LIBCPP_TYPE_VIS __codecvt_utf16<char32_t, false>
: public codecvt<char32_t, char, mbstate_t>
{
- unsigned long _Maxcode_;
- codecvt_mode _Mode_;
+ unsigned long __maxcode_;
+ codecvt_mode __mode_;
public:
typedef char32_t intern_type;
typedef char extern_type;
@@ -384,27 +357,23 @@ public:
_LIBCPP_INLINE_VISIBILITY
explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode,
codecvt_mode __mode)
- : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
- _Mode_(__mode) {}
+ : codecvt<char32_t, char, mbstate_t>(__refs), __maxcode_(__maxcode),
+ __mode_(__mode) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
- virtual result
- do_out(state_type& __st,
- const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual result
- do_in(state_type& __st,
- const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
- intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
- virtual result
- do_unshift(state_type& __st,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual int do_encoding() const _NOEXCEPT;
- virtual bool do_always_noconv() const _NOEXCEPT;
- virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
- size_t __mx) const;
- virtual int do_max_length() const _NOEXCEPT;
+ result do_out(state_type& __st,
+ const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ result do_in(state_type& __st,
+ const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
+ intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const override;
+ result do_unshift(state_type& __st,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ int do_encoding() const _NOEXCEPT override;
+ bool do_always_noconv() const _NOEXCEPT override;
+ int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
+ int do_max_length() const _NOEXCEPT override;
};
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -412,8 +381,8 @@ template <>
class _LIBCPP_TYPE_VIS __codecvt_utf16<char32_t, true>
: public codecvt<char32_t, char, mbstate_t>
{
- unsigned long _Maxcode_;
- codecvt_mode _Mode_;
+ unsigned long __maxcode_;
+ codecvt_mode __mode_;
public:
typedef char32_t intern_type;
typedef char extern_type;
@@ -422,27 +391,23 @@ public:
_LIBCPP_INLINE_VISIBILITY
explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode,
codecvt_mode __mode)
- : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
- _Mode_(__mode) {}
+ : codecvt<char32_t, char, mbstate_t>(__refs), __maxcode_(__maxcode),
+ __mode_(__mode) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
- virtual result
- do_out(state_type& __st,
- const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual result
- do_in(state_type& __st,
- const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
- intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
- virtual result
- do_unshift(state_type& __st,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual int do_encoding() const _NOEXCEPT;
- virtual bool do_always_noconv() const _NOEXCEPT;
- virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
- size_t __mx) const;
- virtual int do_max_length() const _NOEXCEPT;
+ result do_out(state_type& __st,
+ const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ result do_in(state_type& __st,
+ const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
+ intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const override;
+ result do_unshift(state_type& __st,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ int do_encoding() const _NOEXCEPT override;
+ bool do_always_noconv() const _NOEXCEPT override;
+ int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
+ int do_max_length() const _NOEXCEPT override;
};
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -470,9 +435,9 @@ template <>
class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<wchar_t>
: public codecvt<wchar_t, char, mbstate_t>
{
- unsigned long _Maxcode_;
+ unsigned long __maxcode_;
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
- codecvt_mode _Mode_;
+ codecvt_mode __mode_;
_LIBCPP_SUPPRESS_DEPRECATED_POP
public:
typedef wchar_t intern_type;
@@ -483,26 +448,22 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH
_LIBCPP_INLINE_VISIBILITY
explicit __codecvt_utf8_utf16(size_t __refs, unsigned long __maxcode,
codecvt_mode __mode)
- : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
- _Mode_(__mode) {}
+ : codecvt<wchar_t, char, mbstate_t>(__refs), __maxcode_(__maxcode),
+ __mode_(__mode) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
- virtual result
- do_out(state_type& __st,
- const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual result
- do_in(state_type& __st,
- const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
- intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
- virtual result
- do_unshift(state_type& __st,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual int do_encoding() const _NOEXCEPT;
- virtual bool do_always_noconv() const _NOEXCEPT;
- virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
- size_t __mx) const;
- virtual int do_max_length() const _NOEXCEPT;
+ result do_out(state_type& __st,
+ const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ result do_in(state_type& __st,
+ const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
+ intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const override;
+ result do_unshift(state_type& __st,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ int do_encoding() const _NOEXCEPT override;
+ bool do_always_noconv() const _NOEXCEPT override;
+ int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
+ int do_max_length() const _NOEXCEPT override;
};
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
@@ -511,8 +472,8 @@ template <>
class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<char32_t>
: public codecvt<char32_t, char, mbstate_t>
{
- unsigned long _Maxcode_;
- codecvt_mode _Mode_;
+ unsigned long __maxcode_;
+ codecvt_mode __mode_;
public:
typedef char32_t intern_type;
typedef char extern_type;
@@ -521,27 +482,23 @@ public:
_LIBCPP_INLINE_VISIBILITY
explicit __codecvt_utf8_utf16(size_t __refs, unsigned long __maxcode,
codecvt_mode __mode)
- : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
- _Mode_(__mode) {}
+ : codecvt<char32_t, char, mbstate_t>(__refs), __maxcode_(__maxcode),
+ __mode_(__mode) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
- virtual result
- do_out(state_type& __st,
- const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual result
- do_in(state_type& __st,
- const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
- intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
- virtual result
- do_unshift(state_type& __st,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual int do_encoding() const _NOEXCEPT;
- virtual bool do_always_noconv() const _NOEXCEPT;
- virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
- size_t __mx) const;
- virtual int do_max_length() const _NOEXCEPT;
+ result do_out(state_type& __st,
+ const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ result do_in(state_type& __st,
+ const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
+ intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const override;
+ result do_unshift(state_type& __st,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ int do_encoding() const _NOEXCEPT override;
+ bool do_always_noconv() const _NOEXCEPT override;
+ int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
+ int do_max_length() const _NOEXCEPT override;
};
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -549,8 +506,8 @@ template <>
class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<char16_t>
: public codecvt<char16_t, char, mbstate_t>
{
- unsigned long _Maxcode_;
- codecvt_mode _Mode_;
+ unsigned long __maxcode_;
+ codecvt_mode __mode_;
public:
typedef char16_t intern_type;
typedef char extern_type;
@@ -559,27 +516,23 @@ public:
_LIBCPP_INLINE_VISIBILITY
explicit __codecvt_utf8_utf16(size_t __refs, unsigned long __maxcode,
codecvt_mode __mode)
- : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
- _Mode_(__mode) {}
+ : codecvt<char16_t, char, mbstate_t>(__refs), __maxcode_(__maxcode),
+ __mode_(__mode) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
- virtual result
- do_out(state_type& __st,
- const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual result
- do_in(state_type& __st,
- const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
- intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
- virtual result
- do_unshift(state_type& __st,
- extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
- virtual int do_encoding() const _NOEXCEPT;
- virtual bool do_always_noconv() const _NOEXCEPT;
- virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
- size_t __mx) const;
- virtual int do_max_length() const _NOEXCEPT;
+ result do_out(state_type& __st,
+ const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ result do_in(state_type& __st,
+ const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
+ intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const override;
+ result do_unshift(state_type& __st,
+ extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const override;
+ int do_encoding() const _NOEXCEPT override;
+ bool do_always_noconv() const _NOEXCEPT override;
+ int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
+ int do_max_length() const _NOEXCEPT override;
};
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -600,4 +553,19 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
_LIBCPP_END_NAMESPACE_STD
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <atomic>
+# include <concepts>
+# include <cstddef>
+# include <cstdlib>
+# include <cstring>
+# include <initializer_list>
+# include <iosfwd>
+# include <limits>
+# include <new>
+# include <stdexcept>
+# include <type_traits>
+# include <typeinfo>
+#endif
+
#endif // _LIBCPP_CODECVT
diff --git a/contrib/libs/cxxsupp/libcxx/include/complex b/contrib/libs/cxxsupp/libcxx/include/complex
index 1d8ccc09e6..293ec3d439 100644
--- a/contrib/libs/cxxsupp/libcxx/include/complex
+++ b/contrib/libs/cxxsupp/libcxx/include/complex
@@ -251,8 +251,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template<class _Tp> class _LIBCPP_TEMPLATE_VIS complex;
-template<class _Tp> complex<_Tp> operator*(const complex<_Tp>& __z, const complex<_Tp>& __w);
-template<class _Tp> complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y);
+template<class _Tp> _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator*(const complex<_Tp>& __z, const complex<_Tp>& __w);
+template<class _Tp> _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y);
template<class _Tp>
class _LIBCPP_TEMPLATE_VIS complex
@@ -263,15 +263,15 @@ private:
value_type __re_;
value_type __im_;
public:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
complex(const value_type& __re = value_type(), const value_type& __im = value_type())
: __re_(__re), __im_(__im) {}
- template<class _Xp> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ template<class _Xp> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
complex(const complex<_Xp>& __c)
: __re_(__c.real()), __im_(__c.imag()) {}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 value_type real() const {return __re_;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 value_type imag() const {return __im_;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 value_type real() const {return __re_;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 value_type imag() const {return __im_;}
_LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
_LIBCPP_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
@@ -583,7 +583,7 @@ operator-(const _Tp& __x, const complex<_Tp>& __y)
}
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
operator*(const complex<_Tp>& __z, const complex<_Tp>& __w)
{
_Tp __a = __z.real();
@@ -662,7 +662,7 @@ operator*(const _Tp& __x, const complex<_Tp>& __y)
}
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
operator/(const complex<_Tp>& __z, const complex<_Tp>& __w)
{
int __ilogbw = 0;
@@ -740,7 +740,7 @@ operator-(const complex<_Tp>& __x)
}
template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
{
@@ -748,7 +748,7 @@ operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
}
template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator==(const complex<_Tp>& __x, const _Tp& __y)
{
@@ -756,7 +756,7 @@ operator==(const complex<_Tp>& __x, const _Tp& __y)
}
template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator==(const _Tp& __x, const complex<_Tp>& __y)
{
@@ -764,7 +764,7 @@ operator==(const _Tp& __x, const complex<_Tp>& __y)
}
template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
{
@@ -772,7 +772,7 @@ operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
}
template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator!=(const complex<_Tp>& __x, const _Tp& __y)
{
@@ -780,7 +780,7 @@ operator!=(const complex<_Tp>& __x, const _Tp& __y)
}
template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator!=(const _Tp& __x, const complex<_Tp>& __y)
{
@@ -813,7 +813,7 @@ struct __libcpp_complex_overload_traits<_Tp, false, true>
// real
template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp
real(const complex<_Tp>& __c)
{
@@ -821,7 +821,7 @@ real(const complex<_Tp>& __c)
}
template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename __libcpp_complex_overload_traits<_Tp>::_ValueType
real(_Tp __re)
{
@@ -831,7 +831,7 @@ real(_Tp __re)
// imag
template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp
imag(const complex<_Tp>& __c)
{
@@ -839,7 +839,7 @@ imag(const complex<_Tp>& __c)
}
template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename __libcpp_complex_overload_traits<_Tp>::_ValueType
imag(_Tp)
{
@@ -987,7 +987,7 @@ proj(_Tp __re)
// polar
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
polar(const _Tp& __rho, const _Tp& __theta = _Tp())
{
if (__libcpp_isnan_or_builtin(__rho) || signbit(__rho))
@@ -1036,7 +1036,7 @@ log10(const complex<_Tp>& __x)
// sqrt
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
sqrt(const complex<_Tp>& __x)
{
if (__libcpp_isinf_or_builtin(__x.imag()))
@@ -1053,7 +1053,7 @@ sqrt(const complex<_Tp>& __x)
// exp
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
exp(const complex<_Tp>& __x)
{
_Tp __i = __x.imag();
@@ -1137,7 +1137,7 @@ __sqr(const complex<_Tp>& __x)
// asinh
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
asinh(const complex<_Tp>& __x)
{
const _Tp __pi(atan2(+0., -0.));
@@ -1166,7 +1166,7 @@ asinh(const complex<_Tp>& __x)
// acosh
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
acosh(const complex<_Tp>& __x)
{
const _Tp __pi(atan2(+0., -0.));
@@ -1200,7 +1200,7 @@ acosh(const complex<_Tp>& __x)
// atanh
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
atanh(const complex<_Tp>& __x)
{
const _Tp __pi(atan2(+0., -0.));
@@ -1233,7 +1233,7 @@ atanh(const complex<_Tp>& __x)
// sinh
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
sinh(const complex<_Tp>& __x)
{
if (__libcpp_isinf_or_builtin(__x.real()) && !__libcpp_isfinite_or_builtin(__x.imag()))
@@ -1248,7 +1248,7 @@ sinh(const complex<_Tp>& __x)
// cosh
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
cosh(const complex<_Tp>& __x)
{
if (__libcpp_isinf_or_builtin(__x.real()) && !__libcpp_isfinite_or_builtin(__x.imag()))
@@ -1265,7 +1265,7 @@ cosh(const complex<_Tp>& __x)
// tanh
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
tanh(const complex<_Tp>& __x)
{
if (__libcpp_isinf_or_builtin(__x.real()))
@@ -1289,7 +1289,7 @@ tanh(const complex<_Tp>& __x)
// asin
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
asin(const complex<_Tp>& __x)
{
complex<_Tp> __z = asinh(complex<_Tp>(-__x.imag(), __x.real()));
@@ -1299,7 +1299,7 @@ asin(const complex<_Tp>& __x)
// acos
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
acos(const complex<_Tp>& __x)
{
const _Tp __pi(atan2(+0., -0.));
@@ -1336,7 +1336,7 @@ acos(const complex<_Tp>& __x)
// atan
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
atan(const complex<_Tp>& __x)
{
complex<_Tp> __z = atanh(complex<_Tp>(-__x.imag(), __x.real()));
@@ -1346,7 +1346,7 @@ atan(const complex<_Tp>& __x)
// sin
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
sin(const complex<_Tp>& __x)
{
complex<_Tp> __z = sinh(complex<_Tp>(-__x.imag(), __x.real()));
@@ -1366,7 +1366,7 @@ cos(const complex<_Tp>& __x)
// tan
template<class _Tp>
-complex<_Tp>
+_LIBCPP_HIDE_FROM_ABI complex<_Tp>
tan(const complex<_Tp>& __x)
{
complex<_Tp> __z = tanh(complex<_Tp>(-__x.imag(), __x.real()));
@@ -1374,7 +1374,7 @@ tan(const complex<_Tp>& __x)
}
template<class _Tp, class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
{
if (__is.good())
@@ -1437,7 +1437,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
template<class _Tp, class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
{
basic_ostringstream<_CharT, _Traits> __s;
@@ -1455,35 +1455,34 @@ inline namespace literals
{
inline namespace complex_literals
{
- constexpr complex<long double> operator""il(long double __im)
+ _LIBCPP_HIDE_FROM_ABI constexpr complex<long double> operator""il(long double __im)
{
return { 0.0l, __im };
}
- constexpr complex<long double> operator""il(unsigned long long __im)
+ _LIBCPP_HIDE_FROM_ABI constexpr complex<long double> operator""il(unsigned long long __im)
{
return { 0.0l, static_cast<long double>(__im) };
}
- constexpr complex<double> operator""i(long double __im)
+ _LIBCPP_HIDE_FROM_ABI constexpr complex<double> operator""i(long double __im)
{
return { 0.0, static_cast<double>(__im) };
}
- constexpr complex<double> operator""i(unsigned long long __im)
+ _LIBCPP_HIDE_FROM_ABI constexpr complex<double> operator""i(unsigned long long __im)
{
return { 0.0, static_cast<double>(__im) };
}
-
#if !defined(__CUDACC__)
- constexpr complex<float> operator""if(long double __im)
+ _LIBCPP_HIDE_FROM_ABI constexpr complex<float> operator""if(long double __im)
{
return { 0.0f, static_cast<float>(__im) };
}
- constexpr complex<float> operator""if(unsigned long long __im)
+ _LIBCPP_HIDE_FROM_ABI constexpr complex<float> operator""if(unsigned long long __im)
{
return { 0.0f, static_cast<float>(__im) };
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/complex.h b/contrib/libs/cxxsupp/libcxx/include/complex.h
index a2814669c7..a3da21c843 100644
--- a/contrib/libs/cxxsupp/libcxx/include/complex.h
+++ b/contrib/libs/cxxsupp/libcxx/include/complex.h
@@ -24,13 +24,9 @@
#endif
#ifdef __cplusplus
-
-#include <ccomplex>
-
-#else // __cplusplus
-
-#include_next <complex.h>
-
-#endif // __cplusplus
+# include <ccomplex>
+#elif __has_include_next(<complex.h>)
+# include_next <complex.h>
+#endif
#endif // _LIBCPP_COMPLEX_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/condition_variable b/contrib/libs/cxxsupp/libcxx/include/condition_variable
index 92088f3e1b..6b4d506939 100644
--- a/contrib/libs/cxxsupp/libcxx/include/condition_variable
+++ b/contrib/libs/cxxsupp/libcxx/include/condition_variable
@@ -108,8 +108,9 @@ public:
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+#include <__memory/shared_ptr.h>
+#include <__memory/unique_ptr.h>
#include <__mutex_base>
-#include <memory>
#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -267,4 +268,8 @@ _LIBCPP_END_NAMESPACE_STD
#endif // !_LIBCPP_HAS_NO_THREADS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+#endif
+
#endif // _LIBCPP_CONDITION_VARIABLE
diff --git a/contrib/libs/cxxsupp/libcxx/include/coroutine b/contrib/libs/cxxsupp/libcxx/include/coroutine
index 6582f5554e..e0ce323843 100644
--- a/contrib/libs/cxxsupp/libcxx/include/coroutine
+++ b/contrib/libs/cxxsupp/libcxx/include/coroutine
@@ -46,15 +46,17 @@ struct suspend_always;
#include <__coroutine/trivial_awaitables.h>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <iosfwd>
-#endif
-
// standard-mandated includes
+
+// [coroutine.syn]
#include <compare>
#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
# pragma GCC system_header
#endif
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <iosfwd>
+#endif
+
#endif // _LIBCPP_COROUTINE
diff --git a/contrib/libs/cxxsupp/libcxx/include/csignal b/contrib/libs/cxxsupp/libcxx/include/csignal
index c1b58f818b..cf45f50753 100644
--- a/contrib/libs/cxxsupp/libcxx/include/csignal
+++ b/contrib/libs/cxxsupp/libcxx/include/csignal
@@ -42,8 +42,12 @@ int raise(int sig);
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+// <signal.h> is not provided by libc++
#if __has_include(<signal.h>)
-# include <signal.h>
+# include <signal.h>
+# ifdef _LIBCPP_SIGNAL_H
+# error "If libc++ starts defining <signal.h>, the __has_include check should move to libc++'s <signal.h>"
+# endif
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/contrib/libs/cxxsupp/libcxx/include/cstdarg b/contrib/libs/cxxsupp/libcxx/include/cstdarg
index f36ade202b..3a4291f458 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cstdarg
+++ b/contrib/libs/cxxsupp/libcxx/include/cstdarg
@@ -33,7 +33,14 @@ Types:
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
-#include <stdarg.h>
+
+// <stdarg.h> is not provided by libc++
+#if __has_include(<stdarg.h>)
+# include <stdarg.h>
+# ifdef _LIBCPP_STDARG_H
+# error "If libc++ starts defining <stdarg.h>, the __has_include check should move to libc++'s <stdarg.h>"
+# endif
+#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/cstddef b/contrib/libs/cxxsupp/libcxx/include/cstddef
index 8daba076d7..e3c0669175 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cstddef
+++ b/contrib/libs/cxxsupp/libcxx/include/cstddef
@@ -38,9 +38,18 @@ Types:
#include <__type_traits/enable_if.h>
#include <__type_traits/integral_constant.h>
#include <__type_traits/is_integral.h>
-#include <stddef.h>
#include <version>
+#include <stddef.h>
+
+#ifndef _LIBCPP_STDDEF_H
+# error <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
@@ -62,7 +71,7 @@ namespace std // purposefully not versioned
{
enum class byte : unsigned char {};
-constexpr byte operator| (byte __lhs, byte __rhs) noexcept
+_LIBCPP_HIDE_FROM_ABI constexpr byte operator| (byte __lhs, byte __rhs) noexcept
{
return static_cast<byte>(
static_cast<unsigned char>(
@@ -70,10 +79,10 @@ constexpr byte operator| (byte __lhs, byte __rhs) noexcept
));
}
-constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept
+_LIBCPP_HIDE_FROM_ABI constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept
{ return __lhs = __lhs | __rhs; }
-constexpr byte operator& (byte __lhs, byte __rhs) noexcept
+_LIBCPP_HIDE_FROM_ABI constexpr byte operator& (byte __lhs, byte __rhs) noexcept
{
return static_cast<byte>(
static_cast<unsigned char>(
@@ -81,10 +90,10 @@ constexpr byte operator& (byte __lhs, byte __rhs) noexcept
));
}
-constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept
+_LIBCPP_HIDE_FROM_ABI constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept
{ return __lhs = __lhs & __rhs; }
-constexpr byte operator^ (byte __lhs, byte __rhs) noexcept
+_LIBCPP_HIDE_FROM_ABI constexpr byte operator^ (byte __lhs, byte __rhs) noexcept
{
return static_cast<byte>(
static_cast<unsigned char>(
@@ -92,10 +101,10 @@ constexpr byte operator^ (byte __lhs, byte __rhs) noexcept
));
}
-constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept
+_LIBCPP_HIDE_FROM_ABI constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept
{ return __lhs = __lhs ^ __rhs; }
-constexpr byte operator~ (byte __b) noexcept
+_LIBCPP_HIDE_FROM_ABI constexpr byte operator~ (byte __b) noexcept
{
return static_cast<byte>(
static_cast<unsigned char>(
@@ -107,27 +116,27 @@ template <class _Tp>
using _EnableByteOverload = __enable_if_t<is_integral<_Tp>::value, byte>;
template <class _Integer>
- constexpr _EnableByteOverload<_Integer> &
+_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer> &
operator<<=(byte& __lhs, _Integer __shift) noexcept
{ return __lhs = __lhs << __shift; }
template <class _Integer>
- constexpr _EnableByteOverload<_Integer>
+_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer>
operator<< (byte __lhs, _Integer __shift) noexcept
{ return static_cast<byte>(static_cast<unsigned char>(static_cast<unsigned int>(__lhs) << __shift)); }
template <class _Integer>
- constexpr _EnableByteOverload<_Integer> &
+_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer> &
operator>>=(byte& __lhs, _Integer __shift) noexcept
{ return __lhs = __lhs >> __shift; }
template <class _Integer>
- constexpr _EnableByteOverload<_Integer>
+_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer>
operator>> (byte __lhs, _Integer __shift) noexcept
{ return static_cast<byte>(static_cast<unsigned char>(static_cast<unsigned int>(__lhs) >> __shift)); }
template <class _Integer, class = _EnableByteOverload<_Integer> >
- _LIBCPP_NODISCARD_EXT constexpr _Integer
+_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Integer
to_integer(byte __b) noexcept { return static_cast<_Integer>(__b); }
} // namespace std
diff --git a/contrib/libs/cxxsupp/libcxx/include/cstdint b/contrib/libs/cxxsupp/libcxx/include/cstdint
index 83cda947b4..829d9398f3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cstdint
+++ b/contrib/libs/cxxsupp/libcxx/include/cstdint
@@ -142,8 +142,17 @@ Types:
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+
#include <stdint.h>
+#ifndef _LIBCPP_STDINT_H
+# error <cstdint> tried including <stdint.h> but didn't find libc++'s <stdint.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/cstdio b/contrib/libs/cxxsupp/libcxx/include/cstdio
index d191086a85..221b0b314c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cstdio
+++ b/contrib/libs/cxxsupp/libcxx/include/cstdio
@@ -97,8 +97,17 @@ void perror(const char* s);
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+
#include <stdio.h>
+#ifndef _LIBCPP_STDIO_H
+# error <cstdio> tried including <stdio.h> but didn't find libc++'s <stdio.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/cstdlib b/contrib/libs/cxxsupp/libcxx/include/cstdlib
index 84ee541558..457f2a65bb 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cstdlib
+++ b/contrib/libs/cxxsupp/libcxx/include/cstdlib
@@ -83,8 +83,17 @@ void *aligned_alloc(size_t alignment, size_t size); // C11
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+
#include <stdlib.h>
+#ifndef _LIBCPP_STDLIB_H
+# error <cstdlib> tried including <stdlib.h> but didn't find libc++'s <stdlib.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/cstring b/contrib/libs/cxxsupp/libcxx/include/cstring
index 37c92e149b..42bbe73924 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cstring
+++ b/contrib/libs/cxxsupp/libcxx/include/cstring
@@ -58,8 +58,17 @@ size_t strlen(const char* s);
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+
#include <string.h>
+#ifndef _LIBCPP_STRING_H
+# error <cstring> tried including <string.h> but didn't find libc++'s <string.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/ctime b/contrib/libs/cxxsupp/libcxx/include/ctime
index 6869550899..7cb4a1acac 100644
--- a/contrib/libs/cxxsupp/libcxx/include/ctime
+++ b/contrib/libs/cxxsupp/libcxx/include/ctime
@@ -47,7 +47,14 @@ int timespec_get( struct timespec *ts, int base); // C++17
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
-#include <time.h>
+
+// <time.h> is not provided by libc++
+#if __has_include(<time.h>)
+# include <time.h>
+# ifdef _LIBCPP_TIME_H
+# error "If libc++ starts defining <time.h>, the __has_include check should move to libc++'s <time.h>"
+# endif
+#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/ctype.h b/contrib/libs/cxxsupp/libcxx/include/ctype.h
index ba0925069c..728173ed67 100644
--- a/contrib/libs/cxxsupp/libcxx/include/ctype.h
+++ b/contrib/libs/cxxsupp/libcxx/include/ctype.h
@@ -35,7 +35,9 @@ int toupper(int c);
# pragma GCC system_header
#endif
-#include_next <ctype.h>
+#if __has_include_next(<ctype.h>)
+# include_next <ctype.h>
+#endif
#ifdef __cplusplus
diff --git a/contrib/libs/cxxsupp/libcxx/include/cwchar b/contrib/libs/cxxsupp/libcxx/include/cwchar
index 5c69ab2a7b..220c817072 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cwchar
+++ b/contrib/libs/cxxsupp/libcxx/include/cwchar
@@ -105,8 +105,17 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
#include <cwctype>
+
#include <wchar.h>
+#ifndef _LIBCPP_WCHAR_H
+# error <cwchar> tried including <wchar.h> but didn't find libc++'s <wchar.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/cwctype b/contrib/libs/cxxsupp/libcxx/include/cwctype
index 429b00c244..5a2d2427d8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cwctype
+++ b/contrib/libs/cxxsupp/libcxx/include/cwctype
@@ -52,8 +52,17 @@ wctrans_t wctrans(const char* property);
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
#include <cctype>
+
#include <wctype.h>
+#ifndef _LIBCPP_WCTYPE_H
+# error <cwctype> tried including <wctype.h> but didn't find libc++'s <wctype.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/deque b/contrib/libs/cxxsupp/libcxx/include/deque
index 8e8d98eebc..40b9eff155 100644
--- a/contrib/libs/cxxsupp/libcxx/include/deque
+++ b/contrib/libs/cxxsupp/libcxx/include/deque
@@ -176,7 +176,13 @@ template <class T, class Allocator, class Predicate>
#include <__iterator/next.h>
#include <__iterator/prev.h>
#include <__iterator/reverse_iterator.h>
+#include <__memory/allocator_destructor.h>
+#include <__memory/pointer_traits.h>
+#include <__memory/temp_value.h>
+#include <__memory/unique_ptr.h>
+#include <__memory_resource/polymorphic_allocator.h>
#include <__split_buffer>
+#include <__type_traits/is_allocator.h>
#include <__utility/forward.h>
#include <__utility/move.h>
#include <__utility/swap.h>
@@ -185,12 +191,6 @@ template <class T, class Allocator, class Predicate>
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <algorithm>
-# include <functional>
-# include <iterator>
-#endif
-
// standard-mandated includes
// [iterator.range]
@@ -214,7 +214,6 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Tp, class _Allocator> class __deque_base;
template <class _Tp, class _Allocator = allocator<_Tp> > class _LIBCPP_TEMPLATE_VIS deque;
template <class _ValueType, class _Pointer, class _Reference, class _MapPointer,
@@ -223,7 +222,7 @@ class _LIBCPP_TEMPLATE_VIS __deque_iterator;
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@@ -231,21 +230,21 @@ copy(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
-_OutputIterator
+_LIBCPP_HIDE_FROM_ABI _OutputIterator
copy(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r);
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r);
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy_backward(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@@ -253,21 +252,21 @@ copy_backward(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
-_OutputIterator
+_LIBCPP_HIDE_FROM_ABI _OutputIterator
copy_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r);
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r);
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@@ -275,21 +274,21 @@ move(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
-_OutputIterator
+_LIBCPP_HIDE_FROM_ABI _OutputIterator
move(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r);
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r);
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move_backward(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@@ -297,14 +296,14 @@ move_backward(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
-_OutputIterator
+_LIBCPP_HIDE_FROM_ABI _OutputIterator
move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r);
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r);
@@ -342,22 +341,22 @@ public:
typedef random_access_iterator_tag iterator_category;
typedef _Reference reference;
- _LIBCPP_INLINE_VISIBILITY __deque_iterator() _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI __deque_iterator() _NOEXCEPT
#if _LIBCPP_STD_VER > 11
: __m_iter_(nullptr), __ptr_(nullptr)
#endif
{}
template <class _Pp, class _Rp, class _MP>
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
__deque_iterator(const __deque_iterator<value_type, _Pp, _Rp, _MP, difference_type, _BS>& __it,
typename enable_if<is_convertible<_Pp, pointer>::value>::type* = 0) _NOEXCEPT
: __m_iter_(__it.__m_iter_), __ptr_(__it.__ptr_) {}
- _LIBCPP_INLINE_VISIBILITY reference operator*() const {return *__ptr_;}
- _LIBCPP_INLINE_VISIBILITY pointer operator->() const {return __ptr_;}
+ _LIBCPP_HIDE_FROM_ABI reference operator*() const {return *__ptr_;}
+ _LIBCPP_HIDE_FROM_ABI pointer operator->() const {return __ptr_;}
- _LIBCPP_INLINE_VISIBILITY __deque_iterator& operator++()
+ _LIBCPP_HIDE_FROM_ABI __deque_iterator& operator++()
{
if (++__ptr_ - *__m_iter_ == __block_size)
{
@@ -367,14 +366,14 @@ public:
return *this;
}
- _LIBCPP_INLINE_VISIBILITY __deque_iterator operator++(int)
+ _LIBCPP_HIDE_FROM_ABI __deque_iterator operator++(int)
{
__deque_iterator __tmp = *this;
++(*this);
return __tmp;
}
- _LIBCPP_INLINE_VISIBILITY __deque_iterator& operator--()
+ _LIBCPP_HIDE_FROM_ABI __deque_iterator& operator--()
{
if (__ptr_ == *__m_iter_)
{
@@ -385,14 +384,14 @@ public:
return *this;
}
- _LIBCPP_INLINE_VISIBILITY __deque_iterator operator--(int)
+ _LIBCPP_HIDE_FROM_ABI __deque_iterator operator--(int)
{
__deque_iterator __tmp = *this;
--(*this);
return __tmp;
}
- _LIBCPP_INLINE_VISIBILITY __deque_iterator& operator+=(difference_type __n)
+ _LIBCPP_HIDE_FROM_ABI __deque_iterator& operator+=(difference_type __n)
{
if (__n != 0)
{
@@ -412,30 +411,30 @@ public:
return *this;
}
- _LIBCPP_INLINE_VISIBILITY __deque_iterator& operator-=(difference_type __n)
+ _LIBCPP_HIDE_FROM_ABI __deque_iterator& operator-=(difference_type __n)
{
return *this += -__n;
}
- _LIBCPP_INLINE_VISIBILITY __deque_iterator operator+(difference_type __n) const
+ _LIBCPP_HIDE_FROM_ABI __deque_iterator operator+(difference_type __n) const
{
__deque_iterator __t(*this);
__t += __n;
return __t;
}
- _LIBCPP_INLINE_VISIBILITY __deque_iterator operator-(difference_type __n) const
+ _LIBCPP_HIDE_FROM_ABI __deque_iterator operator-(difference_type __n) const
{
__deque_iterator __t(*this);
__t -= __n;
return __t;
}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
friend __deque_iterator operator+(difference_type __n, const __deque_iterator& __it)
{return __it + __n;}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
friend difference_type operator-(const __deque_iterator& __x, const __deque_iterator& __y)
{
if (__x != __y)
@@ -445,39 +444,38 @@ public:
return 0;
}
- _LIBCPP_INLINE_VISIBILITY reference operator[](difference_type __n) const
+ _LIBCPP_HIDE_FROM_ABI reference operator[](difference_type __n) const
{return *(*this + __n);}
- _LIBCPP_INLINE_VISIBILITY friend
+ _LIBCPP_HIDE_FROM_ABI friend
bool operator==(const __deque_iterator& __x, const __deque_iterator& __y)
{return __x.__ptr_ == __y.__ptr_;}
- _LIBCPP_INLINE_VISIBILITY friend
+ _LIBCPP_HIDE_FROM_ABI friend
bool operator!=(const __deque_iterator& __x, const __deque_iterator& __y)
{return !(__x == __y);}
- _LIBCPP_INLINE_VISIBILITY friend
+ _LIBCPP_HIDE_FROM_ABI friend
bool operator<(const __deque_iterator& __x, const __deque_iterator& __y)
{return __x.__m_iter_ < __y.__m_iter_ ||
(__x.__m_iter_ == __y.__m_iter_ && __x.__ptr_ < __y.__ptr_);}
- _LIBCPP_INLINE_VISIBILITY friend
+ _LIBCPP_HIDE_FROM_ABI friend
bool operator>(const __deque_iterator& __x, const __deque_iterator& __y)
{return __y < __x;}
- _LIBCPP_INLINE_VISIBILITY friend
+ _LIBCPP_HIDE_FROM_ABI friend
bool operator<=(const __deque_iterator& __x, const __deque_iterator& __y)
{return !(__y < __x);}
- _LIBCPP_INLINE_VISIBILITY friend
+ _LIBCPP_HIDE_FROM_ABI friend
bool operator>=(const __deque_iterator& __x, const __deque_iterator& __y)
{return !(__x < __y);}
private:
- _LIBCPP_INLINE_VISIBILITY explicit __deque_iterator(__map_iterator __m, pointer __p) _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI explicit __deque_iterator(__map_iterator __m, pointer __p) _NOEXCEPT
: __m_iter_(__m), __ptr_(__p) {}
- template <class _Tp, class _Ap> friend class __deque_base;
template <class _Tp, class _Ap> friend class _LIBCPP_TEMPLATE_VIS deque;
template <class _Vp, class _Pp, class _Rp, class _MP, class _Dp, _Dp>
friend class _LIBCPP_TEMPLATE_VIS __deque_iterator;
@@ -593,7 +591,7 @@ const _DiffType __deque_iterator<_ValueType, _Pointer, _Reference, _MapPointer,
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@@ -623,7 +621,7 @@ copy(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
-_OutputIterator
+_LIBCPP_HIDE_FROM_ABI _OutputIterator
copy(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r)
@@ -651,7 +649,7 @@ copy(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r)
@@ -681,7 +679,7 @@ copy(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy_backward(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@@ -711,7 +709,7 @@ copy_backward(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
-_OutputIterator
+_LIBCPP_HIDE_FROM_ABI _OutputIterator
copy_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r)
@@ -739,7 +737,7 @@ copy_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r)
@@ -769,7 +767,7 @@ copy_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@@ -799,7 +797,7 @@ move(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
-_OutputIterator
+_LIBCPP_HIDE_FROM_ABI _OutputIterator
move(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r)
@@ -827,7 +825,7 @@ move(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r)
@@ -857,7 +855,7 @@ move(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move_backward(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@@ -887,7 +885,7 @@ move_backward(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
-_OutputIterator
+_LIBCPP_HIDE_FROM_ABI _OutputIterator
move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r)
@@ -915,7 +913,7 @@ move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
-__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
+_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r)
@@ -941,545 +939,329 @@ move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
return __r;
}
-template <class _Tp, class _Allocator>
-class __deque_base
+template <class _Tp, class _Allocator /*= allocator<_Tp>*/>
+class _LIBCPP_TEMPLATE_VIS deque
{
- __deque_base(const __deque_base& __c);
- __deque_base& operator=(const __deque_base& __c);
public:
- typedef _Allocator allocator_type;
- typedef allocator_traits<allocator_type> __alloc_traits;
- typedef typename __alloc_traits::size_type size_type;
-
- typedef _Tp value_type;
- typedef value_type& reference;
- typedef const value_type& const_reference;
- typedef typename __alloc_traits::difference_type difference_type;
- typedef typename __alloc_traits::pointer pointer;
- typedef typename __alloc_traits::const_pointer const_pointer;
-
- static const difference_type __block_size;
-
- typedef typename __rebind_alloc_helper<__alloc_traits, pointer>::type __pointer_allocator;
- typedef allocator_traits<__pointer_allocator> __map_traits;
- typedef typename __map_traits::pointer __map_pointer;
- typedef typename __rebind_alloc_helper<__alloc_traits, const_pointer>::type __const_pointer_allocator;
- typedef typename allocator_traits<__const_pointer_allocator>::const_pointer __map_const_pointer;
- typedef __split_buffer<pointer, __pointer_allocator> __map;
-
- typedef __deque_iterator<value_type, pointer, reference, __map_pointer,
- difference_type> iterator;
- typedef __deque_iterator<value_type, const_pointer, const_reference, __map_const_pointer,
- difference_type> const_iterator;
-
- struct __deque_block_range {
- explicit __deque_block_range(pointer __b, pointer __e) _NOEXCEPT : __begin_(__b), __end_(__e) {}
- const pointer __begin_;
- const pointer __end_;
- };
-
- struct __deque_range {
- iterator __pos_;
- const iterator __end_;
-
- __deque_range(iterator __pos, iterator __e) _NOEXCEPT
- : __pos_(__pos), __end_(__e) {}
-
- explicit operator bool() const _NOEXCEPT {
- return __pos_ != __end_;
- }
+ // types:
- __deque_range begin() const {
- return *this;
- }
+ using value_type = _Tp;
- __deque_range end() const {
- return __deque_range(__end_, __end_);
- }
- __deque_block_range operator*() const _NOEXCEPT {
- if (__pos_.__m_iter_ == __end_.__m_iter_) {
- return __deque_block_range(__pos_.__ptr_, __end_.__ptr_);
- }
- return __deque_block_range(__pos_.__ptr_, *__pos_.__m_iter_ + __block_size);
- }
+ static_assert((is_same<typename _Allocator::value_type, value_type>::value),
+ "Allocator::value_type must be same type as value_type");
- __deque_range& operator++() _NOEXCEPT {
- if (__pos_.__m_iter_ == __end_.__m_iter_) {
- __pos_ = __end_;
- } else {
- ++__pos_.__m_iter_;
- __pos_.__ptr_ = *__pos_.__m_iter_;
- }
- return *this;
- }
+ using allocator_type = _Allocator;
+ using __alloc_traits = allocator_traits<allocator_type>;
+ using size_type = typename __alloc_traits::size_type;
+ using difference_type = typename __alloc_traits::difference_type;
- friend bool operator==(__deque_range const& __lhs, __deque_range const& __rhs) {
- return __lhs.__pos_ == __rhs.__pos_;
- }
- friend bool operator!=(__deque_range const& __lhs, __deque_range const& __rhs) {
- return !(__lhs == __rhs);
- }
- };
+ using pointer = typename __alloc_traits::pointer;
+ using const_pointer = typename __alloc_traits::const_pointer;
+ using __pointer_allocator = __rebind_alloc<__alloc_traits, pointer>;
+ using __const_pointer_allocator = __rebind_alloc<__alloc_traits, const_pointer>;
+ using __map = __split_buffer<pointer, __pointer_allocator>;
+ using __map_alloc_traits = allocator_traits<__pointer_allocator>;
+ using __map_pointer = typename __map_alloc_traits::pointer;
+ using __map_const_pointer = typename allocator_traits<__const_pointer_allocator>::const_pointer;
+ using reference = value_type&;
+ using const_reference = const value_type&;
- struct _ConstructTransaction {
- _ConstructTransaction(__deque_base* __db, __deque_block_range& __r)
- : __pos_(__r.__begin_), __end_(__r.__end_), __begin_(__r.__begin_), __base_(__db) {}
+ using iterator = __deque_iterator<value_type, pointer, reference, __map_pointer, difference_type>;
+ using const_iterator =
+ __deque_iterator<value_type, const_pointer, const_reference, __map_const_pointer, difference_type>;
+ using reverse_iterator = std::reverse_iterator<iterator>;
+ using const_reverse_iterator = std::reverse_iterator<const_iterator>;
+ static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
+ "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
+ "original allocator");
+ static_assert(is_nothrow_default_constructible<allocator_type>::value ==
+ is_nothrow_default_constructible<__pointer_allocator>::value,
+ "rebinding an allocator should not change excpetion guarantees");
+ static_assert(is_nothrow_move_constructible<allocator_type>::value ==
+ is_nothrow_move_constructible<typename __map::allocator_type>::value,
+ "rebinding an allocator should not change excpetion guarantees");
- ~_ConstructTransaction() {
- __base_->size() += (__pos_ - __begin_);
- }
+private:
+ struct __deque_block_range {
+ explicit _LIBCPP_HIDE_FROM_ABI
+ __deque_block_range(pointer __b, pointer __e) _NOEXCEPT : __begin_(__b), __end_(__e) {}
+ const pointer __begin_;
+ const pointer __end_;
+ };
- pointer __pos_;
- const pointer __end_;
- private:
- const pointer __begin_;
- __deque_base * const __base_;
- };
-
-protected:
- __map __map_;
- size_type __start_;
- __compressed_pair<size_type, allocator_type> __size_;
-
- iterator begin() _NOEXCEPT;
- const_iterator begin() const _NOEXCEPT;
- iterator end() _NOEXCEPT;
- const_iterator end() const _NOEXCEPT;
-
- _LIBCPP_INLINE_VISIBILITY size_type& size() {return __size_.first();}
- _LIBCPP_INLINE_VISIBILITY
- const size_type& size() const _NOEXCEPT {return __size_.first();}
- _LIBCPP_INLINE_VISIBILITY allocator_type& __alloc() {return __size_.second();}
- _LIBCPP_INLINE_VISIBILITY
- const allocator_type& __alloc() const _NOEXCEPT {return __size_.second();}
-
- _LIBCPP_INLINE_VISIBILITY
- __deque_base()
- _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
- _LIBCPP_INLINE_VISIBILITY
- explicit __deque_base(const allocator_type& __a);
-public:
- ~__deque_base();
+ struct __deque_range {
+ iterator __pos_;
+ const iterator __end_;
-#ifndef _LIBCPP_CXX03_LANG
- __deque_base(__deque_base&& __c)
- _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
- __deque_base(__deque_base&& __c, const allocator_type& __a);
-#endif // _LIBCPP_CXX03_LANG
+ _LIBCPP_HIDE_FROM_ABI __deque_range(iterator __pos, iterator __e) _NOEXCEPT
+ : __pos_(__pos), __end_(__e) {}
- void swap(__deque_base& __c)
-#if _LIBCPP_STD_VER >= 14
- _NOEXCEPT;
-#else
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
- __is_nothrow_swappable<allocator_type>::value);
-#endif
-protected:
- void clear() _NOEXCEPT;
-
- bool __invariants() const;
-
- _LIBCPP_INLINE_VISIBILITY
- void __move_assign(__deque_base& __c)
- _NOEXCEPT_(__alloc_traits::propagate_on_container_move_assignment::value &&
- is_nothrow_move_assignable<allocator_type>::value)
- {
- __map_ = _VSTD::move(__c.__map_);
- __start_ = __c.__start_;
- size() = __c.size();
- __move_assign_alloc(__c);
- __c.__start_ = __c.size() = 0;
+ explicit _LIBCPP_HIDE_FROM_ABI operator bool() const _NOEXCEPT {
+ return __pos_ != __end_;
}
- _LIBCPP_INLINE_VISIBILITY
- void __move_assign_alloc(__deque_base& __c)
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_move_assignment::value ||
- is_nothrow_move_assignable<allocator_type>::value)
- {__move_assign_alloc(__c, integral_constant<bool,
- __alloc_traits::propagate_on_container_move_assignment::value>());}
-
-private:
- _LIBCPP_INLINE_VISIBILITY
- void __move_assign_alloc(__deque_base& __c, true_type)
- _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
- {
- __alloc() = _VSTD::move(__c.__alloc());
- }
-
- _LIBCPP_INLINE_VISIBILITY
- void __move_assign_alloc(__deque_base&, false_type) _NOEXCEPT
- {}
-};
-
-template <class _Tp, class _Allocator>
-const typename __deque_base<_Tp, _Allocator>::difference_type
- __deque_base<_Tp, _Allocator>::__block_size =
- __deque_block_size<value_type, difference_type>::value;
+ _LIBCPP_HIDE_FROM_ABI __deque_range begin() const {
+ return *this;
+ }
-template <class _Tp, class _Allocator>
-bool
-__deque_base<_Tp, _Allocator>::__invariants() const
-{
- if (!__map_.__invariants())
- return false;
- if (__map_.size() >= size_type(-1) / __block_size)
- return false;
- for (typename __map::const_iterator __i = __map_.begin(), __e = __map_.end();
- __i != __e; ++__i)
- if (*__i == nullptr)
- return false;
- if (__map_.size() != 0)
- {
- if (size() >= __map_.size() * __block_size)
- return false;
- if (__start_ >= __map_.size() * __block_size - size())
- return false;
+ _LIBCPP_HIDE_FROM_ABI __deque_range end() const {
+ return __deque_range(__end_, __end_);
}
- else
- {
- if (size() != 0)
- return false;
- if (__start_ != 0)
- return false;
+ _LIBCPP_HIDE_FROM_ABI __deque_block_range operator*() const _NOEXCEPT {
+ if (__pos_.__m_iter_ == __end_.__m_iter_) {
+ return __deque_block_range(__pos_.__ptr_, __end_.__ptr_);
+ }
+ return __deque_block_range(__pos_.__ptr_, *__pos_.__m_iter_ + __block_size);
}
- return true;
-}
-
-template <class _Tp, class _Allocator>
-typename __deque_base<_Tp, _Allocator>::iterator
-__deque_base<_Tp, _Allocator>::begin() _NOEXCEPT
-{
- __map_pointer __mp = __map_.begin() + __start_ / __block_size;
- return iterator(__mp, __map_.empty() ? 0 : *__mp + __start_ % __block_size);
-}
-
-template <class _Tp, class _Allocator>
-typename __deque_base<_Tp, _Allocator>::const_iterator
-__deque_base<_Tp, _Allocator>::begin() const _NOEXCEPT
-{
- __map_const_pointer __mp = static_cast<__map_const_pointer>(__map_.begin() + __start_ / __block_size);
- return const_iterator(__mp, __map_.empty() ? 0 : *__mp + __start_ % __block_size);
-}
-
-template <class _Tp, class _Allocator>
-typename __deque_base<_Tp, _Allocator>::iterator
-__deque_base<_Tp, _Allocator>::end() _NOEXCEPT
-{
- size_type __p = size() + __start_;
- __map_pointer __mp = __map_.begin() + __p / __block_size;
- return iterator(__mp, __map_.empty() ? 0 : *__mp + __p % __block_size);
-}
-
-template <class _Tp, class _Allocator>
-typename __deque_base<_Tp, _Allocator>::const_iterator
-__deque_base<_Tp, _Allocator>::end() const _NOEXCEPT
-{
- size_type __p = size() + __start_;
- __map_const_pointer __mp = static_cast<__map_const_pointer>(__map_.begin() + __p / __block_size);
- return const_iterator(__mp, __map_.empty() ? 0 : *__mp + __p % __block_size);
-}
-
-template <class _Tp, class _Allocator>
-inline
-__deque_base<_Tp, _Allocator>::__deque_base()
- _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
- : __start_(0), __size_(0, __default_init_tag()) {}
-
-template <class _Tp, class _Allocator>
-inline
-__deque_base<_Tp, _Allocator>::__deque_base(const allocator_type& __a)
- : __map_(__pointer_allocator(__a)), __start_(0), __size_(0, __a) {}
-
-template <class _Tp, class _Allocator>
-__deque_base<_Tp, _Allocator>::~__deque_base()
-{
- clear();
- typename __map::iterator __i = __map_.begin();
- typename __map::iterator __e = __map_.end();
- for (; __i != __e; ++__i)
- __alloc_traits::deallocate(__alloc(), *__i, __block_size);
-}
-#ifndef _LIBCPP_CXX03_LANG
+ _LIBCPP_HIDE_FROM_ABI __deque_range& operator++() _NOEXCEPT {
+ if (__pos_.__m_iter_ == __end_.__m_iter_) {
+ __pos_ = __end_;
+ } else {
+ ++__pos_.__m_iter_;
+ __pos_.__ptr_ = *__pos_.__m_iter_;
+ }
+ return *this;
+ }
-template <class _Tp, class _Allocator>
-__deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c)
- _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
- : __map_(_VSTD::move(__c.__map_)),
- __start_(_VSTD::move(__c.__start_)),
- __size_(_VSTD::move(__c.__size_))
-{
- __c.__start_ = 0;
- __c.size() = 0;
-}
-template <class _Tp, class _Allocator>
-__deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c, const allocator_type& __a)
- : __map_(_VSTD::move(__c.__map_), __pointer_allocator(__a)),
- __start_(_VSTD::move(__c.__start_)),
- __size_(_VSTD::move(__c.size()), __a)
-{
- if (__a == __c.__alloc())
- {
- __c.__start_ = 0;
- __c.size() = 0;
+ _LIBCPP_HIDE_FROM_ABI friend bool operator==(__deque_range const& __lhs, __deque_range const& __rhs) {
+ return __lhs.__pos_ == __rhs.__pos_;
}
- else
- {
- __map_.clear();
- __start_ = 0;
- size() = 0;
+ _LIBCPP_HIDE_FROM_ABI friend bool operator!=(__deque_range const& __lhs, __deque_range const& __rhs) {
+ return !(__lhs == __rhs);
}
-}
+ };
-#endif // _LIBCPP_CXX03_LANG
+ struct _ConstructTransaction {
+ _LIBCPP_HIDE_FROM_ABI _ConstructTransaction(deque* __db, __deque_block_range& __r)
+ : __pos_(__r.__begin_), __end_(__r.__end_), __begin_(__r.__begin_), __base_(__db) {}
-template <class _Tp, class _Allocator>
-void
-__deque_base<_Tp, _Allocator>::swap(__deque_base& __c)
-#if _LIBCPP_STD_VER >= 14
- _NOEXCEPT
-#else
- _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
- __is_nothrow_swappable<allocator_type>::value)
-#endif
-{
- __map_.swap(__c.__map_);
- _VSTD::swap(__start_, __c.__start_);
- _VSTD::swap(size(), __c.size());
- _VSTD::__swap_allocator(__alloc(), __c.__alloc());
-}
-template <class _Tp, class _Allocator>
-void
-__deque_base<_Tp, _Allocator>::clear() _NOEXCEPT
-{
- allocator_type& __a = __alloc();
- for (iterator __i = begin(), __e = end(); __i != __e; ++__i)
- __alloc_traits::destroy(__a, _VSTD::addressof(*__i));
- size() = 0;
- while (__map_.size() > 2)
- {
- __alloc_traits::deallocate(__a, __map_.front(), __block_size);
- __map_.pop_front();
- }
- switch (__map_.size())
- {
- case 1:
- __start_ = __block_size / 2;
- break;
- case 2:
- __start_ = __block_size;
- break;
+ _LIBCPP_HIDE_FROM_ABI ~_ConstructTransaction() {
+ __base_->__size() += (__pos_ - __begin_);
}
-}
-template <class _Tp, class _Allocator /*= allocator<_Tp>*/>
-class _LIBCPP_TEMPLATE_VIS deque
- : private __deque_base<_Tp, _Allocator>
-{
-public:
- // types:
+ pointer __pos_;
+ const pointer __end_;
+ private:
+ const pointer __begin_;
+ deque* const __base_;
+ };
- typedef _Tp value_type;
- typedef _Allocator allocator_type;
+ static const difference_type __block_size;
- static_assert((is_same<typename allocator_type::value_type, value_type>::value),
- "Allocator::value_type must be same type as value_type");
+ __map __map_;
+ size_type __start_;
+ __compressed_pair<size_type, allocator_type> __size_;
- typedef __deque_base<value_type, allocator_type> __base;
+public:
- typedef typename __base::__alloc_traits __alloc_traits;
- typedef typename __base::reference reference;
- typedef typename __base::const_reference const_reference;
- typedef typename __base::iterator iterator;
- typedef typename __base::const_iterator const_iterator;
- typedef typename __base::size_type size_type;
- typedef typename __base::difference_type difference_type;
+ // construct/copy/destroy:
+ _LIBCPP_HIDE_FROM_ABI
+ deque() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
+ : __start_(0), __size_(0, __default_init_tag()) {}
- typedef typename __base::pointer pointer;
- typedef typename __base::const_pointer const_pointer;
- typedef _VSTD::reverse_iterator<iterator> reverse_iterator;
- typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
+ _LIBCPP_HIDE_FROM_ABI ~deque() {
+ clear();
+ typename __map::iterator __i = __map_.begin();
+ typename __map::iterator __e = __map_.end();
+ for (; __i != __e; ++__i)
+ __alloc_traits::deallocate(__alloc(), *__i, __block_size);
+ }
- using typename __base::__deque_range;
- using typename __base::__deque_block_range;
- using typename __base::_ConstructTransaction;
+ _LIBCPP_HIDE_FROM_ABI explicit deque(const allocator_type& __a)
+ : __map_(__pointer_allocator(__a)), __start_(0), __size_(0, __a) {}
- // construct/copy/destroy:
- _LIBCPP_INLINE_VISIBILITY
- deque()
- _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
- {}
- _LIBCPP_INLINE_VISIBILITY explicit deque(const allocator_type& __a) : __base(__a) {}
- explicit deque(size_type __n);
+ explicit _LIBCPP_HIDE_FROM_ABI deque(size_type __n);
#if _LIBCPP_STD_VER > 11
- explicit deque(size_type __n, const _Allocator& __a);
+ explicit _LIBCPP_HIDE_FROM_ABI deque(size_type __n, const _Allocator& __a);
#endif
- deque(size_type __n, const value_type& __v);
+ _LIBCPP_HIDE_FROM_ABI deque(size_type __n, const value_type& __v);
template <class = __enable_if_t<__is_allocator<_Allocator>::value> >
- deque(size_type __n, const value_type& __v, const allocator_type& __a) : __base(__a)
+ _LIBCPP_HIDE_FROM_ABI deque(size_type __n, const value_type& __v, const allocator_type& __a)
+ : __map_(__pointer_allocator(__a)), __start_(0), __size_(0, __a)
{
if (__n > 0)
__append(__n, __v);
}
template <class _InputIter>
- deque(_InputIter __f, _InputIter __l,
+ _LIBCPP_HIDE_FROM_ABI deque(_InputIter __f, _InputIter __l,
typename enable_if<__is_cpp17_input_iterator<_InputIter>::value>::type* = 0);
template <class _InputIter>
- deque(_InputIter __f, _InputIter __l, const allocator_type& __a,
+ _LIBCPP_HIDE_FROM_ABI deque(_InputIter __f, _InputIter __l, const allocator_type& __a,
typename enable_if<__is_cpp17_input_iterator<_InputIter>::value>::type* = 0);
- deque(const deque& __c);
- deque(const deque& __c, const __type_identity_t<allocator_type>& __a);
+ _LIBCPP_HIDE_FROM_ABI deque(const deque& __c);
+ _LIBCPP_HIDE_FROM_ABI deque(const deque& __c, const __type_identity_t<allocator_type>& __a);
- deque& operator=(const deque& __c);
+ _LIBCPP_HIDE_FROM_ABI deque& operator=(const deque& __c);
#ifndef _LIBCPP_CXX03_LANG
- deque(initializer_list<value_type> __il);
- deque(initializer_list<value_type> __il, const allocator_type& __a);
+ _LIBCPP_HIDE_FROM_ABI deque(initializer_list<value_type> __il);
+ _LIBCPP_HIDE_FROM_ABI deque(initializer_list<value_type> __il, const allocator_type& __a);
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
deque& operator=(initializer_list<value_type> __il) {assign(__il); return *this;}
- _LIBCPP_INLINE_VISIBILITY
- deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value);
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
+ deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
+ _LIBCPP_HIDE_FROM_ABI
deque(deque&& __c, const __type_identity_t<allocator_type>& __a);
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
deque& operator=(deque&& __c)
_NOEXCEPT_(__alloc_traits::propagate_on_container_move_assignment::value &&
is_nothrow_move_assignable<allocator_type>::value);
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
void assign(initializer_list<value_type> __il) {assign(__il.begin(), __il.end());}
#endif // _LIBCPP_CXX03_LANG
template <class _InputIter>
- void assign(_InputIter __f, _InputIter __l,
+ _LIBCPP_HIDE_FROM_ABI void assign(_InputIter __f, _InputIter __l,
typename enable_if<__is_cpp17_input_iterator<_InputIter>::value &&
!__is_cpp17_random_access_iterator<_InputIter>::value>::type* = 0);
template <class _RAIter>
- void assign(_RAIter __f, _RAIter __l,
+ _LIBCPP_HIDE_FROM_ABI void assign(_RAIter __f, _RAIter __l,
typename enable_if<__is_cpp17_random_access_iterator<_RAIter>::value>::type* = 0);
- void assign(size_type __n, const value_type& __v);
+ _LIBCPP_HIDE_FROM_ABI void assign(size_type __n, const value_type& __v);
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
allocator_type get_allocator() const _NOEXCEPT;
-
- // iterators:
-
- _LIBCPP_INLINE_VISIBILITY
- iterator begin() _NOEXCEPT {return __base::begin();}
- _LIBCPP_INLINE_VISIBILITY
- const_iterator begin() const _NOEXCEPT {return __base::begin();}
- _LIBCPP_INLINE_VISIBILITY
- iterator end() _NOEXCEPT {return __base::end();}
- _LIBCPP_INLINE_VISIBILITY
- const_iterator end() const _NOEXCEPT {return __base::end();}
-
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI allocator_type& __alloc() _NOEXCEPT { return __size_.second(); }
+ _LIBCPP_HIDE_FROM_ABI const allocator_type& __alloc() const _NOEXCEPT { return __size_.second(); }
+
+ // iterators:
+
+ _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT {
+ __map_pointer __mp = __map_.begin() + __start_ / __block_size;
+ return iterator(__mp, __map_.empty() ? 0 : *__mp + __start_ % __block_size);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT {
+ __map_const_pointer __mp =
+ static_cast<__map_const_pointer>(__map_.begin() + __start_ / __block_size);
+ return const_iterator(__mp, __map_.empty() ? 0 : *__mp + __start_ % __block_size);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT {
+ size_type __p = size() + __start_;
+ __map_pointer __mp = __map_.begin() + __p / __block_size;
+ return iterator(__mp, __map_.empty() ? 0 : *__mp + __p % __block_size);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT {
+ size_type __p = size() + __start_;
+ __map_const_pointer __mp = static_cast<__map_const_pointer>(__map_.begin() + __p / __block_size);
+ return const_iterator(__mp, __map_.empty() ? 0 : *__mp + __p % __block_size);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI
reverse_iterator rbegin() _NOEXCEPT
- {return reverse_iterator(__base::end());}
- _LIBCPP_INLINE_VISIBILITY
+ {return reverse_iterator(end());}
+ _LIBCPP_HIDE_FROM_ABI
const_reverse_iterator rbegin() const _NOEXCEPT
- {return const_reverse_iterator(__base::end());}
- _LIBCPP_INLINE_VISIBILITY
+ {return const_reverse_iterator(end());}
+ _LIBCPP_HIDE_FROM_ABI
reverse_iterator rend() _NOEXCEPT
- {return reverse_iterator(__base::begin());}
- _LIBCPP_INLINE_VISIBILITY
+ {return reverse_iterator(begin());}
+ _LIBCPP_HIDE_FROM_ABI
const_reverse_iterator rend() const _NOEXCEPT
- {return const_reverse_iterator(__base::begin());}
+ {return const_reverse_iterator(begin());}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
const_iterator cbegin() const _NOEXCEPT
- {return __base::begin();}
- _LIBCPP_INLINE_VISIBILITY
+ {return begin();}
+ _LIBCPP_HIDE_FROM_ABI
const_iterator cend() const _NOEXCEPT
- {return __base::end();}
- _LIBCPP_INLINE_VISIBILITY
+ {return end();}
+ _LIBCPP_HIDE_FROM_ABI
const_reverse_iterator crbegin() const _NOEXCEPT
- {return const_reverse_iterator(__base::end());}
- _LIBCPP_INLINE_VISIBILITY
+ {return const_reverse_iterator(end());}
+ _LIBCPP_HIDE_FROM_ABI
const_reverse_iterator crend() const _NOEXCEPT
- {return const_reverse_iterator(__base::begin());}
+ {return const_reverse_iterator(begin());}
// capacity:
- _LIBCPP_INLINE_VISIBILITY
- size_type size() const _NOEXCEPT {return __base::size();}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
+ size_type size() const _NOEXCEPT {return __size();}
+
+ _LIBCPP_HIDE_FROM_ABI size_type& __size() _NOEXCEPT { return __size_.first(); }
+ _LIBCPP_HIDE_FROM_ABI const size_type& __size() const _NOEXCEPT { return __size_.first(); }
+
+ _LIBCPP_HIDE_FROM_ABI
size_type max_size() const _NOEXCEPT
{return _VSTD::min<size_type>(
- __alloc_traits::max_size(__base::__alloc()),
+ __alloc_traits::max_size(__alloc()),
numeric_limits<difference_type>::max());}
- void resize(size_type __n);
- void resize(size_type __n, const value_type& __v);
- void shrink_to_fit() _NOEXCEPT;
- _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
- bool empty() const _NOEXCEPT {return __base::size() == 0;}
+ _LIBCPP_HIDE_FROM_ABI void resize(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI void resize(size_type __n, const value_type& __v);
+ _LIBCPP_HIDE_FROM_ABI void shrink_to_fit() _NOEXCEPT;
+ _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+ bool empty() const _NOEXCEPT {return size() == 0;}
// element access:
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
reference operator[](size_type __i) _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
const_reference operator[](size_type __i) const _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
reference at(size_type __i);
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
const_reference at(size_type __i) const;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
reference front() _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
const_reference front() const _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
reference back() _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
const_reference back() const _NOEXCEPT;
// 23.2.2.3 modifiers:
- void push_front(const value_type& __v);
- void push_back(const value_type& __v);
+ _LIBCPP_HIDE_FROM_ABI void push_front(const value_type& __v);
+ _LIBCPP_HIDE_FROM_ABI void push_back(const value_type& __v);
#ifndef _LIBCPP_CXX03_LANG
#if _LIBCPP_STD_VER > 14
- template <class... _Args> reference emplace_front(_Args&&... __args);
- template <class... _Args> reference emplace_back (_Args&&... __args);
+ template <class... _Args> _LIBCPP_HIDE_FROM_ABI reference emplace_front(_Args&&... __args);
+ template <class... _Args> _LIBCPP_HIDE_FROM_ABI reference emplace_back (_Args&&... __args);
#else
- template <class... _Args> void emplace_front(_Args&&... __args);
- template <class... _Args> void emplace_back (_Args&&... __args);
+ template <class... _Args> _LIBCPP_HIDE_FROM_ABI void emplace_front(_Args&&... __args);
+ template <class... _Args> _LIBCPP_HIDE_FROM_ABI void emplace_back (_Args&&... __args);
#endif
- template <class... _Args> iterator emplace(const_iterator __p, _Args&&... __args);
+ template <class... _Args> _LIBCPP_HIDE_FROM_ABI iterator emplace(const_iterator __p, _Args&&... __args);
- void push_front(value_type&& __v);
- void push_back(value_type&& __v);
- iterator insert(const_iterator __p, value_type&& __v);
+ _LIBCPP_HIDE_FROM_ABI void push_front(value_type&& __v);
+ _LIBCPP_HIDE_FROM_ABI void push_back(value_type&& __v);
+ _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, value_type&& __v);
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
iterator insert(const_iterator __p, initializer_list<value_type> __il)
{return insert(__p, __il.begin(), __il.end());}
#endif // _LIBCPP_CXX03_LANG
- iterator insert(const_iterator __p, const value_type& __v);
- iterator insert(const_iterator __p, size_type __n, const value_type& __v);
+ _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, const value_type& __v);
+ _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, size_type __n, const value_type& __v);
template <class _InputIter>
- iterator insert(const_iterator __p, _InputIter __f, _InputIter __l,
+ _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, _InputIter __f, _InputIter __l,
typename enable_if<__is_exactly_cpp17_input_iterator<_InputIter>::value>::type* = 0);
template <class _ForwardIterator>
- iterator insert(const_iterator __p, _ForwardIterator __f, _ForwardIterator __l,
+ _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, _ForwardIterator __f, _ForwardIterator __l,
typename enable_if<__is_exactly_cpp17_forward_iterator<_ForwardIterator>::value>::type* = 0);
template <class _BiIter>
- iterator insert(const_iterator __p, _BiIter __f, _BiIter __l,
+ _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __p, _BiIter __f, _BiIter __l,
typename enable_if<__is_cpp17_bidirectional_iterator<_BiIter>::value>::type* = 0);
- void pop_front();
- void pop_back();
- iterator erase(const_iterator __p);
- iterator erase(const_iterator __f, const_iterator __l);
+ _LIBCPP_HIDE_FROM_ABI void pop_front();
+ _LIBCPP_HIDE_FROM_ABI void pop_back();
+ _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __p);
+ _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __f, const_iterator __l);
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
void swap(deque& __c)
#if _LIBCPP_STD_VER >= 14
_NOEXCEPT;
@@ -1487,121 +1269,177 @@ public:
_NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
__is_nothrow_swappable<allocator_type>::value);
#endif
- _LIBCPP_REINITIALIZES_OBJECT _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_REINITIALIZES_OBJECT _LIBCPP_HIDE_FROM_ABI
void clear() _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
- bool __invariants() const {return __base::__invariants();}
+ _LIBCPP_HIDE_FROM_ABI
+ bool __invariants() const {
+ if (!__map_.__invariants())
+ return false;
+ if (__map_.size() >= size_type(-1) / __block_size)
+ return false;
+ for (typename __map::const_iterator __i = __map_.begin(), __e = __map_.end();
+ __i != __e; ++__i)
+ if (*__i == nullptr)
+ return false;
+ if (__map_.size() != 0)
+ {
+ if (size() >= __map_.size() * __block_size)
+ return false;
+ if (__start_ >= __map_.size() * __block_size - size())
+ return false;
+ }
+ else
+ {
+ if (size() != 0)
+ return false;
+ if (__start_ != 0)
+ return false;
+ }
+ return true;
+ }
- typedef typename __base::__map_const_pointer __map_const_pointer;
+ _LIBCPP_HIDE_FROM_ABI
+ void __move_assign_alloc(deque& __c)
+ _NOEXCEPT_(!__alloc_traits::propagate_on_container_move_assignment::value ||
+ is_nothrow_move_assignable<allocator_type>::value)
+ {__move_assign_alloc(__c, integral_constant<bool,
+ __alloc_traits::propagate_on_container_move_assignment::value>());}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
+ void __move_assign_alloc(deque& __c, true_type)
+ _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
+ {
+ __alloc() = _VSTD::move(__c.__alloc());
+ }
+
+ _LIBCPP_HIDE_FROM_ABI
+ void __move_assign_alloc(deque&, false_type) _NOEXCEPT
+ {}
+
+ _LIBCPP_HIDE_FROM_ABI
+ void __move_assign(deque& __c)
+ _NOEXCEPT_(__alloc_traits::propagate_on_container_move_assignment::value &&
+ is_nothrow_move_assignable<allocator_type>::value)
+ {
+ __map_ = _VSTD::move(__c.__map_);
+ __start_ = __c.__start_;
+ __size() = __c.size();
+ __move_assign_alloc(__c);
+ __c.__start_ = __c.__size() = 0;
+ }
+
+ _LIBCPP_HIDE_FROM_ABI
static size_type __recommend_blocks(size_type __n)
{
- return __n / __base::__block_size + (__n % __base::__block_size != 0);
+ return __n / __block_size + (__n % __block_size != 0);
}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
size_type __capacity() const
{
- return __base::__map_.size() == 0 ? 0 : __base::__map_.size() * __base::__block_size - 1;
+ return __map_.size() == 0 ? 0 : __map_.size() * __block_size - 1;
}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
size_type __block_count() const
{
- return __base::__map_.size();
+ return __map_.size();
}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
size_type __front_spare() const
{
- return __base::__start_;
+ return __start_;
}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
size_type __front_spare_blocks() const {
- return __front_spare() / __base::__block_size;
+ return __front_spare() / __block_size;
}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
size_type __back_spare() const
{
- return __capacity() - (__base::__start_ + __base::size());
+ return __capacity() - (__start_ + size());
}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
size_type __back_spare_blocks() const {
- return __back_spare() / __base::__block_size;
+ return __back_spare() / __block_size;
}
private:
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
bool __maybe_remove_front_spare(bool __keep_one = true) {
if (__front_spare_blocks() >= 2 || (!__keep_one && __front_spare_blocks())) {
- __alloc_traits::deallocate(__base::__alloc(), __base::__map_.front(),
- __base::__block_size);
- __base::__map_.pop_front();
- __base::__start_ -= __base::__block_size;
+ __alloc_traits::deallocate(__alloc(), __map_.front(),
+ __block_size);
+ __map_.pop_front();
+ __start_ -= __block_size;
return true;
}
return false;
}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
bool __maybe_remove_back_spare(bool __keep_one = true) {
if (__back_spare_blocks() >= 2 || (!__keep_one && __back_spare_blocks())) {
- __alloc_traits::deallocate(__base::__alloc(), __base::__map_.back(),
- __base::__block_size);
- __base::__map_.pop_back();
+ __alloc_traits::deallocate(__alloc(), __map_.back(),
+ __block_size);
+ __map_.pop_back();
return true;
}
return false;
}
template <class _InpIter>
- void __append(_InpIter __f, _InpIter __l,
+ _LIBCPP_HIDE_FROM_ABI void __append(_InpIter __f, _InpIter __l,
typename enable_if<__is_exactly_cpp17_input_iterator<_InpIter>::value>::type* = 0);
template <class _ForIter>
- void __append(_ForIter __f, _ForIter __l,
+ _LIBCPP_HIDE_FROM_ABI void __append(_ForIter __f, _ForIter __l,
typename enable_if<__is_cpp17_forward_iterator<_ForIter>::value>::type* = 0);
- void __append(size_type __n);
- void __append(size_type __n, const value_type& __v);
- void __erase_to_end(const_iterator __f);
- void __add_front_capacity();
- void __add_front_capacity(size_type __n);
- void __add_back_capacity();
- void __add_back_capacity(size_type __n);
- iterator __move_and_check(iterator __f, iterator __l, iterator __r,
+ _LIBCPP_HIDE_FROM_ABI void __append(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI void __append(size_type __n, const value_type& __v);
+ _LIBCPP_HIDE_FROM_ABI void __erase_to_end(const_iterator __f);
+ _LIBCPP_HIDE_FROM_ABI void __add_front_capacity();
+ _LIBCPP_HIDE_FROM_ABI void __add_front_capacity(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI void __add_back_capacity();
+ _LIBCPP_HIDE_FROM_ABI void __add_back_capacity(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI iterator __move_and_check(iterator __f, iterator __l, iterator __r,
const_pointer& __vt);
- iterator __move_backward_and_check(iterator __f, iterator __l, iterator __r,
+ _LIBCPP_HIDE_FROM_ABI iterator __move_backward_and_check(iterator __f, iterator __l, iterator __r,
const_pointer& __vt);
- void __move_construct_and_check(iterator __f, iterator __l,
+ _LIBCPP_HIDE_FROM_ABI void __move_construct_and_check(iterator __f, iterator __l,
iterator __r, const_pointer& __vt);
- void __move_construct_backward_and_check(iterator __f, iterator __l,
+ _LIBCPP_HIDE_FROM_ABI void __move_construct_backward_and_check(iterator __f, iterator __l,
iterator __r, const_pointer& __vt);
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
void __copy_assign_alloc(const deque& __c)
{__copy_assign_alloc(__c, integral_constant<bool,
__alloc_traits::propagate_on_container_copy_assignment::value>());}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
void __copy_assign_alloc(const deque& __c, true_type)
{
- if (__base::__alloc() != __c.__alloc())
+ if (__alloc() != __c.__alloc())
{
clear();
shrink_to_fit();
}
- __base::__alloc() = __c.__alloc();
- __base::__map_.__alloc() = __c.__map_.__alloc();
+ __alloc() = __c.__alloc();
+ __map_.__alloc() = __c.__map_.__alloc();
}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
void __copy_assign_alloc(const deque&, false_type)
{}
- void __move_assign(deque& __c, true_type)
+ _LIBCPP_HIDE_FROM_ABI void __move_assign(deque& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
- void __move_assign(deque& __c, false_type);
+ _LIBCPP_HIDE_FROM_ABI void __move_assign(deque& __c, false_type);
};
+template <class _Tp, class _Alloc>
+_LIBCPP_CONSTEXPR const typename allocator_traits<_Alloc>::difference_type deque<_Tp, _Alloc>::__block_size =
+ __deque_block_size<value_type, difference_type>::value;
+
#if _LIBCPP_STD_VER >= 17
template<class _InputIterator,
class _Alloc = allocator<__iter_value_type<_InputIterator>>,
@@ -1622,6 +1460,7 @@ deque(_InputIterator, _InputIterator, _Alloc)
template <class _Tp, class _Allocator>
deque<_Tp, _Allocator>::deque(size_type __n)
+ : __start_(0), __size_(0, __default_init_tag())
{
if (__n > 0)
__append(__n);
@@ -1630,7 +1469,7 @@ deque<_Tp, _Allocator>::deque(size_type __n)
#if _LIBCPP_STD_VER > 11
template <class _Tp, class _Allocator>
deque<_Tp, _Allocator>::deque(size_type __n, const _Allocator& __a)
- : __base(__a)
+ : __map_(__pointer_allocator(__a)), __start_(0), __size_(0, __a)
{
if (__n > 0)
__append(__n);
@@ -1639,6 +1478,7 @@ deque<_Tp, _Allocator>::deque(size_type __n, const _Allocator& __a)
template <class _Tp, class _Allocator>
deque<_Tp, _Allocator>::deque(size_type __n, const value_type& __v)
+ : __start_(0), __size_(0, __default_init_tag())
{
if (__n > 0)
__append(__n, __v);
@@ -1648,6 +1488,7 @@ template <class _Tp, class _Allocator>
template <class _InputIter>
deque<_Tp, _Allocator>::deque(_InputIter __f, _InputIter __l,
typename enable_if<__is_cpp17_input_iterator<_InputIter>::value>::type*)
+ : __start_(0), __size_(0, __default_init_tag())
{
__append(__f, __l);
}
@@ -1656,21 +1497,23 @@ template <class _Tp, class _Allocator>
template <class _InputIter>
deque<_Tp, _Allocator>::deque(_InputIter __f, _InputIter __l, const allocator_type& __a,
typename enable_if<__is_cpp17_input_iterator<_InputIter>::value>::type*)
- : __base(__a)
+ : __map_(__pointer_allocator(__a)), __start_(0), __size_(0, __a)
{
__append(__f, __l);
}
template <class _Tp, class _Allocator>
deque<_Tp, _Allocator>::deque(const deque& __c)
- : __base(__alloc_traits::select_on_container_copy_construction(__c.__alloc()))
+ : __map_(__pointer_allocator(__alloc_traits::select_on_container_copy_construction(__c.__alloc()))),
+ __start_(0),
+ __size_(0, __map_.__alloc())
{
__append(__c.begin(), __c.end());
}
template <class _Tp, class _Allocator>
deque<_Tp, _Allocator>::deque(const deque& __c, const __type_identity_t<allocator_type>& __a)
- : __base(__a)
+ : __map_(__pointer_allocator(__a)), __start_(0), __size_(0, __a)
{
__append(__c.begin(), __c.end());
}
@@ -1691,13 +1534,14 @@ deque<_Tp, _Allocator>::operator=(const deque& __c)
template <class _Tp, class _Allocator>
deque<_Tp, _Allocator>::deque(initializer_list<value_type> __il)
+ : __start_(0), __size_(0, __default_init_tag())
{
__append(__il.begin(), __il.end());
}
template <class _Tp, class _Allocator>
deque<_Tp, _Allocator>::deque(initializer_list<value_type> __il, const allocator_type& __a)
- : __base(__a)
+ : __map_(__pointer_allocator(__a)), __start_(0), __size_(0, __a)
{
__append(__il.begin(), __il.end());
}
@@ -1705,18 +1549,30 @@ deque<_Tp, _Allocator>::deque(initializer_list<value_type> __il, const allocator
template <class _Tp, class _Allocator>
inline
deque<_Tp, _Allocator>::deque(deque&& __c)
- _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)
- : __base(_VSTD::move(__c))
+ _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
+ : __map_(std::move(__c.__map_)), __start_(std::move(__c.__start_)), __size_(std::move(__c.__size_))
{
+ __c.__start_ = 0;
+ __c.__size() = 0;
}
template <class _Tp, class _Allocator>
inline
deque<_Tp, _Allocator>::deque(deque&& __c, const __type_identity_t<allocator_type>& __a)
- : __base(_VSTD::move(__c), __a)
+ : __map_(std::move(__c.__map_), __pointer_allocator(__a)),
+ __start_(std::move(__c.__start_)),
+ __size_(std::move(__c.__size()), __a)
{
- if (__a != __c.__alloc())
+ if (__a == __c.__alloc())
{
+ __c.__start_ = 0;
+ __c.__size() = 0;
+ }
+ else
+ {
+ __map_.clear();
+ __start_ = 0;
+ __size() = 0;
typedef move_iterator<iterator> _Ip;
assign(_Ip(__c.begin()), _Ip(__c.end()));
}
@@ -1738,7 +1594,7 @@ template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::__move_assign(deque& __c, false_type)
{
- if (__base::__alloc() != __c.__alloc())
+ if (__alloc() != __c.__alloc())
{
typedef move_iterator<iterator> _Ip;
assign(_Ip(__c.begin()), _Ip(__c.end()));
@@ -1754,7 +1610,7 @@ deque<_Tp, _Allocator>::__move_assign(deque& __c, true_type)
{
clear();
shrink_to_fit();
- __base::__move_assign(__c);
+ __move_assign(__c);
}
#endif // _LIBCPP_CXX03_LANG
@@ -1766,8 +1622,8 @@ deque<_Tp, _Allocator>::assign(_InputIter __f, _InputIter __l,
typename enable_if<__is_cpp17_input_iterator<_InputIter>::value &&
!__is_cpp17_random_access_iterator<_InputIter>::value>::type*)
{
- iterator __i = __base::begin();
- iterator __e = __base::end();
+ iterator __i = begin();
+ iterator __e = end();
for (; __f != __l && __i != __e; ++__f, (void) ++__i)
*__i = *__f;
if (__f != __l)
@@ -1782,28 +1638,28 @@ void
deque<_Tp, _Allocator>::assign(_RAIter __f, _RAIter __l,
typename enable_if<__is_cpp17_random_access_iterator<_RAIter>::value>::type*)
{
- if (static_cast<size_type>(__l - __f) > __base::size())
+ if (static_cast<size_type>(__l - __f) > size())
{
- _RAIter __m = __f + __base::size();
- _VSTD::copy(__f, __m, __base::begin());
+ _RAIter __m = __f + size();
+ _VSTD::copy(__f, __m, begin());
__append(__m, __l);
}
else
- __erase_to_end(_VSTD::copy(__f, __l, __base::begin()));
+ __erase_to_end(_VSTD::copy(__f, __l, begin()));
}
template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::assign(size_type __n, const value_type& __v)
{
- if (__n > __base::size())
+ if (__n > size())
{
- _VSTD::fill_n(__base::begin(), __base::size(), __v);
- __n -= __base::size();
+ _VSTD::fill_n(begin(), size(), __v);
+ __n -= size();
__append(__n, __v);
}
else
- __erase_to_end(_VSTD::fill_n(__base::begin(), __n, __v));
+ __erase_to_end(_VSTD::fill_n(begin(), __n, __v));
}
template <class _Tp, class _Allocator>
@@ -1811,49 +1667,49 @@ inline
_Allocator
deque<_Tp, _Allocator>::get_allocator() const _NOEXCEPT
{
- return __base::__alloc();
+ return __alloc();
}
template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::resize(size_type __n)
{
- if (__n > __base::size())
- __append(__n - __base::size());
- else if (__n < __base::size())
- __erase_to_end(__base::begin() + __n);
+ if (__n > size())
+ __append(__n - size());
+ else if (__n < size())
+ __erase_to_end(begin() + __n);
}
template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::resize(size_type __n, const value_type& __v)
{
- if (__n > __base::size())
- __append(__n - __base::size(), __v);
- else if (__n < __base::size())
- __erase_to_end(__base::begin() + __n);
+ if (__n > size())
+ __append(__n - size(), __v);
+ else if (__n < size())
+ __erase_to_end(begin() + __n);
}
template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT
{
- allocator_type& __a = __base::__alloc();
+ allocator_type& __a = __alloc();
if (empty())
{
- while (__base::__map_.size() > 0)
+ while (__map_.size() > 0)
{
- __alloc_traits::deallocate(__a, __base::__map_.back(), __base::__block_size);
- __base::__map_.pop_back();
+ __alloc_traits::deallocate(__a, __map_.back(), __block_size);
+ __map_.pop_back();
}
- __base::__start_ = 0;
+ __start_ = 0;
}
else
{
__maybe_remove_front_spare(/*__keep_one=*/false);
__maybe_remove_back_spare(/*__keep_one=*/false);
}
- __base::__map_.shrink_to_fit();
+ __map_.shrink_to_fit();
}
template <class _Tp, class _Allocator>
@@ -1861,8 +1717,8 @@ inline
typename deque<_Tp, _Allocator>::reference
deque<_Tp, _Allocator>::operator[](size_type __i) _NOEXCEPT
{
- size_type __p = __base::__start_ + __i;
- return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
+ size_type __p = __start_ + __i;
+ return *(*(__map_.begin() + __p / __block_size) + __p % __block_size);
}
template <class _Tp, class _Allocator>
@@ -1870,8 +1726,8 @@ inline
typename deque<_Tp, _Allocator>::const_reference
deque<_Tp, _Allocator>::operator[](size_type __i) const _NOEXCEPT
{
- size_type __p = __base::__start_ + __i;
- return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
+ size_type __p = __start_ + __i;
+ return *(*(__map_.begin() + __p / __block_size) + __p % __block_size);
}
template <class _Tp, class _Allocator>
@@ -1879,10 +1735,10 @@ inline
typename deque<_Tp, _Allocator>::reference
deque<_Tp, _Allocator>::at(size_type __i)
{
- if (__i >= __base::size())
+ if (__i >= size())
_VSTD::__throw_out_of_range("deque");
- size_type __p = __base::__start_ + __i;
- return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
+ size_type __p = __start_ + __i;
+ return *(*(__map_.begin() + __p / __block_size) + __p % __block_size);
}
template <class _Tp, class _Allocator>
@@ -1890,10 +1746,10 @@ inline
typename deque<_Tp, _Allocator>::const_reference
deque<_Tp, _Allocator>::at(size_type __i) const
{
- if (__i >= __base::size())
+ if (__i >= size())
_VSTD::__throw_out_of_range("deque");
- size_type __p = __base::__start_ + __i;
- return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
+ size_type __p = __start_ + __i;
+ return *(*(__map_.begin() + __p / __block_size) + __p % __block_size);
}
template <class _Tp, class _Allocator>
@@ -1901,8 +1757,8 @@ inline
typename deque<_Tp, _Allocator>::reference
deque<_Tp, _Allocator>::front() _NOEXCEPT
{
- return *(*(__base::__map_.begin() + __base::__start_ / __base::__block_size)
- + __base::__start_ % __base::__block_size);
+ return *(*(__map_.begin() + __start_ / __block_size)
+ + __start_ % __block_size);
}
template <class _Tp, class _Allocator>
@@ -1910,8 +1766,8 @@ inline
typename deque<_Tp, _Allocator>::const_reference
deque<_Tp, _Allocator>::front() const _NOEXCEPT
{
- return *(*(__base::__map_.begin() + __base::__start_ / __base::__block_size)
- + __base::__start_ % __base::__block_size);
+ return *(*(__map_.begin() + __start_ / __block_size)
+ + __start_ % __block_size);
}
template <class _Tp, class _Allocator>
@@ -1919,8 +1775,8 @@ inline
typename deque<_Tp, _Allocator>::reference
deque<_Tp, _Allocator>::back() _NOEXCEPT
{
- size_type __p = __base::size() + __base::__start_ - 1;
- return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
+ size_type __p = size() + __start_ - 1;
+ return *(*(__map_.begin() + __p / __block_size) + __p % __block_size);
}
template <class _Tp, class _Allocator>
@@ -1928,33 +1784,33 @@ inline
typename deque<_Tp, _Allocator>::const_reference
deque<_Tp, _Allocator>::back() const _NOEXCEPT
{
- size_type __p = __base::size() + __base::__start_ - 1;
- return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
+ size_type __p = size() + __start_ - 1;
+ return *(*(__map_.begin() + __p / __block_size) + __p % __block_size);
}
template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::push_back(const value_type& __v)
{
- allocator_type& __a = __base::__alloc();
+ allocator_type& __a = __alloc();
if (__back_spare() == 0)
__add_back_capacity();
// __back_spare() >= 1
- __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), __v);
- ++__base::size();
+ __alloc_traits::construct(__a, _VSTD::addressof(*end()), __v);
+ ++__size();
}
template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::push_front(const value_type& __v)
{
- allocator_type& __a = __base::__alloc();
+ allocator_type& __a = __alloc();
if (__front_spare() == 0)
__add_front_capacity();
// __front_spare() >= 1
- __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), __v);
- --__base::__start_;
- ++__base::size();
+ __alloc_traits::construct(__a, _VSTD::addressof(*--begin()), __v);
+ --__start_;
+ ++__size();
}
#ifndef _LIBCPP_CXX03_LANG
@@ -1962,12 +1818,12 @@ template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::push_back(value_type&& __v)
{
- allocator_type& __a = __base::__alloc();
+ allocator_type& __a = __alloc();
if (__back_spare() == 0)
__add_back_capacity();
// __back_spare() >= 1
- __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::move(__v));
- ++__base::size();
+ __alloc_traits::construct(__a, _VSTD::addressof(*end()), _VSTD::move(__v));
+ ++__size();
}
template <class _Tp, class _Allocator>
@@ -1979,15 +1835,15 @@ void
#endif
deque<_Tp, _Allocator>::emplace_back(_Args&&... __args)
{
- allocator_type& __a = __base::__alloc();
+ allocator_type& __a = __alloc();
if (__back_spare() == 0)
__add_back_capacity();
// __back_spare() >= 1
- __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()),
+ __alloc_traits::construct(__a, _VSTD::addressof(*end()),
_VSTD::forward<_Args>(__args)...);
- ++__base::size();
+ ++__size();
#if _LIBCPP_STD_VER > 14
- return *--__base::end();
+ return *--end();
#endif
}
@@ -1995,13 +1851,13 @@ template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::push_front(value_type&& __v)
{
- allocator_type& __a = __base::__alloc();
+ allocator_type& __a = __alloc();
if (__front_spare() == 0)
__add_front_capacity();
// __front_spare() >= 1
- __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::move(__v));
- --__base::__start_;
- ++__base::size();
+ __alloc_traits::construct(__a, _VSTD::addressof(*--begin()), _VSTD::move(__v));
+ --__start_;
+ ++__size();
}
@@ -2014,15 +1870,15 @@ void
#endif
deque<_Tp, _Allocator>::emplace_front(_Args&&... __args)
{
- allocator_type& __a = __base::__alloc();
+ allocator_type& __a = __alloc();
if (__front_spare() == 0)
__add_front_capacity();
// __front_spare() >= 1
- __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::forward<_Args>(__args)...);
- --__base::__start_;
- ++__base::size();
+ __alloc_traits::construct(__a, _VSTD::addressof(*--begin()), _VSTD::forward<_Args>(__args)...);
+ --__start_;
+ ++__size();
#if _LIBCPP_STD_VER > 14
- return *__base::begin();
+ return *begin();
#endif
}
@@ -2030,9 +1886,9 @@ template <class _Tp, class _Allocator>
typename deque<_Tp, _Allocator>::iterator
deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
{
- size_type __pos = __p - __base::begin();
- size_type __to_end = __base::size() - __pos;
- allocator_type& __a = __base::__alloc();
+ size_type __pos = __p - begin();
+ size_type __to_end = size() - __pos;
+ allocator_type& __a = __alloc();
if (__pos < __to_end)
{ // insert by shifting things backward
if (__front_spare() == 0)
@@ -2040,17 +1896,17 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
// __front_spare() >= 1
if (__pos == 0)
{
- __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::move(__v));
- --__base::__start_;
- ++__base::size();
+ __alloc_traits::construct(__a, _VSTD::addressof(*--begin()), _VSTD::move(__v));
+ --__start_;
+ ++__size();
}
else
{
- iterator __b = __base::begin();
+ iterator __b = begin();
iterator __bm1 = _VSTD::prev(__b);
__alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b));
- --__base::__start_;
- ++__base::size();
+ --__start_;
+ ++__size();
if (__pos > 1)
__b = _VSTD::move(_VSTD::next(__b), __b + __pos, __b);
*__b = _VSTD::move(__v);
@@ -2061,24 +1917,24 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
if (__back_spare() == 0)
__add_back_capacity();
// __back_capacity >= 1
- size_type __de = __base::size() - __pos;
+ size_type __de = size() - __pos;
if (__de == 0)
{
- __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::move(__v));
- ++__base::size();
+ __alloc_traits::construct(__a, _VSTD::addressof(*end()), _VSTD::move(__v));
+ ++__size();
}
else
{
- iterator __e = __base::end();
+ iterator __e = end();
iterator __em1 = _VSTD::prev(__e);
__alloc_traits::construct(__a, _VSTD::addressof(*__e), _VSTD::move(*__em1));
- ++__base::size();
+ ++__size();
if (__de > 1)
__e = _VSTD::move_backward(__e - __de, __em1, __e);
*--__e = _VSTD::move(__v);
}
}
- return __base::begin() + __pos;
+ return begin() + __pos;
}
template <class _Tp, class _Allocator>
@@ -2086,9 +1942,9 @@ template <class... _Args>
typename deque<_Tp, _Allocator>::iterator
deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
{
- size_type __pos = __p - __base::begin();
- size_type __to_end = __base::size() - __pos;
- allocator_type& __a = __base::__alloc();
+ size_type __pos = __p - begin();
+ size_type __to_end = size() - __pos;
+ allocator_type& __a = __alloc();
if (__pos < __to_end)
{ // insert by shifting things backward
if (__front_spare() == 0)
@@ -2096,18 +1952,18 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
// __front_spare() >= 1
if (__pos == 0)
{
- __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::forward<_Args>(__args)...);
- --__base::__start_;
- ++__base::size();
+ __alloc_traits::construct(__a, _VSTD::addressof(*--begin()), _VSTD::forward<_Args>(__args)...);
+ --__start_;
+ ++__size();
}
else
{
- __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...);
- iterator __b = __base::begin();
+ __temp_value<value_type, _Allocator> __tmp(__alloc(), _VSTD::forward<_Args>(__args)...);
+ iterator __b = begin();
iterator __bm1 = _VSTD::prev(__b);
__alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b));
- --__base::__start_;
- ++__base::size();
+ --__start_;
+ ++__size();
if (__pos > 1)
__b = _VSTD::move(_VSTD::next(__b), __b + __pos, __b);
*__b = _VSTD::move(__tmp.get());
@@ -2118,25 +1974,25 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
if (__back_spare() == 0)
__add_back_capacity();
// __back_capacity >= 1
- size_type __de = __base::size() - __pos;
+ size_type __de = size() - __pos;
if (__de == 0)
{
- __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::forward<_Args>(__args)...);
- ++__base::size();
+ __alloc_traits::construct(__a, _VSTD::addressof(*end()), _VSTD::forward<_Args>(__args)...);
+ ++__size();
}
else
{
- __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...);
- iterator __e = __base::end();
+ __temp_value<value_type, _Allocator> __tmp(__alloc(), _VSTD::forward<_Args>(__args)...);
+ iterator __e = end();
iterator __em1 = _VSTD::prev(__e);
__alloc_traits::construct(__a, _VSTD::addressof(*__e), _VSTD::move(*__em1));
- ++__base::size();
+ ++__size();
if (__de > 1)
__e = _VSTD::move_backward(__e - __de, __em1, __e);
*--__e = _VSTD::move(__tmp.get());
}
}
- return __base::begin() + __pos;
+ return begin() + __pos;
}
#endif // _LIBCPP_CXX03_LANG
@@ -2146,9 +2002,9 @@ template <class _Tp, class _Allocator>
typename deque<_Tp, _Allocator>::iterator
deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
{
- size_type __pos = __p - __base::begin();
- size_type __to_end = __base::size() - __pos;
- allocator_type& __a = __base::__alloc();
+ size_type __pos = __p - begin();
+ size_type __to_end = size() - __pos;
+ allocator_type& __a = __alloc();
if (__pos < __to_end)
{ // insert by shifting things backward
if (__front_spare() == 0)
@@ -2156,20 +2012,20 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
// __front_spare() >= 1
if (__pos == 0)
{
- __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), __v);
- --__base::__start_;
- ++__base::size();
+ __alloc_traits::construct(__a, _VSTD::addressof(*--begin()), __v);
+ --__start_;
+ ++__size();
}
else
{
const_pointer __vt = pointer_traits<const_pointer>::pointer_to(__v);
- iterator __b = __base::begin();
+ iterator __b = begin();
iterator __bm1 = _VSTD::prev(__b);
if (__vt == pointer_traits<const_pointer>::pointer_to(*__b))
__vt = pointer_traits<const_pointer>::pointer_to(*__bm1);
__alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b));
- --__base::__start_;
- ++__base::size();
+ --__start_;
+ ++__size();
if (__pos > 1)
__b = __move_and_check(_VSTD::next(__b), __b + __pos, __b, __vt);
*__b = *__vt;
@@ -2180,46 +2036,46 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
if (__back_spare() == 0)
__add_back_capacity();
// __back_capacity >= 1
- size_type __de = __base::size() - __pos;
+ size_type __de = size() - __pos;
if (__de == 0)
{
- __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), __v);
- ++__base::size();
+ __alloc_traits::construct(__a, _VSTD::addressof(*end()), __v);
+ ++__size();
}
else
{
const_pointer __vt = pointer_traits<const_pointer>::pointer_to(__v);
- iterator __e = __base::end();
+ iterator __e = end();
iterator __em1 = _VSTD::prev(__e);
if (__vt == pointer_traits<const_pointer>::pointer_to(*__em1))
__vt = pointer_traits<const_pointer>::pointer_to(*__e);
__alloc_traits::construct(__a, _VSTD::addressof(*__e), _VSTD::move(*__em1));
- ++__base::size();
+ ++__size();
if (__de > 1)
__e = __move_backward_and_check(__e - __de, __em1, __e, __vt);
*--__e = *__vt;
}
}
- return __base::begin() + __pos;
+ return begin() + __pos;
}
template <class _Tp, class _Allocator>
typename deque<_Tp, _Allocator>::iterator
deque<_Tp, _Allocator>::insert(const_iterator __p, size_type __n, const value_type& __v)
{
- size_type __pos = __p - __base::begin();
- size_type __to_end = __base::size() - __pos;
- allocator_type& __a = __base::__alloc();
+ size_type __pos = __p - begin();
+ size_type __to_end = __size() - __pos;
+ allocator_type& __a = __alloc();
if (__pos < __to_end)
{ // insert by shifting things backward
if (__n > __front_spare())
__add_front_capacity(__n - __front_spare());
// __n <= __front_spare()
- iterator __old_begin = __base::begin();
+ iterator __old_begin = begin();
iterator __i = __old_begin;
if (__n > __pos)
{
- for (size_type __m = __n - __pos; __m; --__m, --__base::__start_, ++__base::size())
+ for (size_type __m = __n - __pos; __m; --__m, --__start_, ++__size())
__alloc_traits::construct(__a, _VSTD::addressof(*--__i), __v);
__n = __pos;
}
@@ -2239,12 +2095,12 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, size_type __n, const value_ty
if (__n > __back_capacity)
__add_back_capacity(__n - __back_capacity);
// __n <= __back_capacity
- iterator __old_end = __base::end();
+ iterator __old_end = end();
iterator __i = __old_end;
- size_type __de = __base::size() - __pos;
+ size_type __de = size() - __pos;
if (__n > __de)
{
- for (size_type __m = __n - __de; __m; --__m, (void) ++__i, ++__base::size())
+ for (size_type __m = __n - __de; __m; --__m, (void) ++__i, ++__size())
__alloc_traits::construct(__a, _VSTD::addressof(*__i), __v);
__n = __de;
}
@@ -2258,7 +2114,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, size_type __n, const value_ty
_VSTD::fill_n(__old_end - __n, __n, *__vt);
}
}
- return __base::begin() + __pos;
+ return begin() + __pos;
}
template <class _Tp, class _Allocator>
@@ -2267,7 +2123,7 @@ typename deque<_Tp, _Allocator>::iterator
deque<_Tp, _Allocator>::insert(const_iterator __p, _InputIter __f, _InputIter __l,
typename enable_if<__is_exactly_cpp17_input_iterator<_InputIter>::value>::type*)
{
- __split_buffer<value_type, allocator_type&> __buf(__base::__alloc());
+ __split_buffer<value_type, allocator_type&> __buf(__alloc());
__buf.__construct_at_end(__f, __l);
typedef typename __split_buffer<value_type, allocator_type&>::iterator __bi;
return insert(__p, move_iterator<__bi>(__buf.begin()), move_iterator<__bi>(__buf.end()));
@@ -2280,7 +2136,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, _ForwardIterator __f, _Forwar
typename enable_if<__is_exactly_cpp17_forward_iterator<_ForwardIterator>::value>::type*)
{
size_type __n = _VSTD::distance(__f, __l);
- __split_buffer<value_type, allocator_type&> __buf(__n, 0, __base::__alloc());
+ __split_buffer<value_type, allocator_type&> __buf(__n, 0, __alloc());
__buf.__construct_at_end(__f, __l);
typedef typename __split_buffer<value_type, allocator_type&>::iterator __fwd;
return insert(__p, move_iterator<__fwd>(__buf.begin()), move_iterator<__fwd>(__buf.end()));
@@ -2293,21 +2149,21 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, _BiIter __f, _BiIter __l,
typename enable_if<__is_cpp17_bidirectional_iterator<_BiIter>::value>::type*)
{
size_type __n = _VSTD::distance(__f, __l);
- size_type __pos = __p - __base::begin();
- size_type __to_end = __base::size() - __pos;
- allocator_type& __a = __base::__alloc();
+ size_type __pos = __p - begin();
+ size_type __to_end = size() - __pos;
+ allocator_type& __a = __alloc();
if (__pos < __to_end)
{ // insert by shifting things backward
if (__n > __front_spare())
__add_front_capacity(__n - __front_spare());
// __n <= __front_spare()
- iterator __old_begin = __base::begin();
+ iterator __old_begin = begin();
iterator __i = __old_begin;
_BiIter __m = __f;
if (__n > __pos)
{
__m = __pos < __n / 2 ? _VSTD::prev(__l, __pos) : _VSTD::next(__f, __n - __pos);
- for (_BiIter __j = __m; __j != __f; --__base::__start_, ++__base::size())
+ for (_BiIter __j = __m; __j != __f; --__start_, ++__size())
__alloc_traits::construct(__a, _VSTD::addressof(*--__i), *--__j);
__n = __pos;
}
@@ -2317,8 +2173,8 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, _BiIter __f, _BiIter __l,
for (iterator __j = __obn; __j != __old_begin;)
{
__alloc_traits::construct(__a, _VSTD::addressof(*--__i), _VSTD::move(*--__j));
- --__base::__start_;
- ++__base::size();
+ --__start_;
+ ++__size();
}
if (__n < __pos)
__old_begin = _VSTD::move(__obn, __old_begin + __pos, __old_begin);
@@ -2331,28 +2187,28 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, _BiIter __f, _BiIter __l,
if (__n > __back_capacity)
__add_back_capacity(__n - __back_capacity);
// __n <= __back_capacity
- iterator __old_end = __base::end();
+ iterator __old_end = end();
iterator __i = __old_end;
_BiIter __m = __l;
- size_type __de = __base::size() - __pos;
+ size_type __de = size() - __pos;
if (__n > __de)
{
__m = __de < __n / 2 ? _VSTD::next(__f, __de) : _VSTD::prev(__l, __n - __de);
- for (_BiIter __j = __m; __j != __l; ++__i, (void) ++__j, ++__base::size())
+ for (_BiIter __j = __m; __j != __l; ++__i, (void) ++__j, ++__size())
__alloc_traits::construct(__a, _VSTD::addressof(*__i), *__j);
__n = __de;
}
if (__n > 0)
{
iterator __oen = __old_end - __n;
- for (iterator __j = __oen; __j != __old_end; ++__i, (void) ++__j, ++__base::size())
+ for (iterator __j = __oen; __j != __old_end; ++__i, (void) ++__j, ++__size())
__alloc_traits::construct(__a, _VSTD::addressof(*__i), _VSTD::move(*__j));
if (__n < __de)
__old_end = _VSTD::move_backward(__old_end - __de, __oen, __old_end);
_VSTD::copy_backward(__f, __m, __old_end);
}
}
- return __base::begin() + __pos;
+ return begin() + __pos;
}
template <class _Tp, class _Allocator>
@@ -2376,12 +2232,12 @@ deque<_Tp, _Allocator>::__append(_ForIter __f, _ForIter __l,
typename enable_if<__is_cpp17_forward_iterator<_ForIter>::value>::type*)
{
size_type __n = _VSTD::distance(__f, __l);
- allocator_type& __a = __base::__alloc();
+ allocator_type& __a = __alloc();
size_type __back_capacity = __back_spare();
if (__n > __back_capacity)
__add_back_capacity(__n - __back_capacity);
// __n <= __back_capacity
- for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) {
+ for (__deque_block_range __br : __deque_range(end(), end() + __n)) {
_ConstructTransaction __tx(this, __br);
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, (void)++__f) {
__alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_), *__f);
@@ -2393,12 +2249,12 @@ template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::__append(size_type __n)
{
- allocator_type& __a = __base::__alloc();
+ allocator_type& __a = __alloc();
size_type __back_capacity = __back_spare();
if (__n > __back_capacity)
__add_back_capacity(__n - __back_capacity);
// __n <= __back_capacity
- for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) {
+ for (__deque_block_range __br : __deque_range(end(), end() + __n)) {
_ConstructTransaction __tx(this, __br);
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
__alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_));
@@ -2410,12 +2266,12 @@ template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::__append(size_type __n, const value_type& __v)
{
- allocator_type& __a = __base::__alloc();
+ allocator_type& __a = __alloc();
size_type __back_capacity = __back_spare();
if (__n > __back_capacity)
__add_back_capacity(__n - __back_capacity);
// __n <= __back_capacity
- for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) {
+ for (__deque_block_range __br : __deque_range(end(), end() + __n)) {
_ConstructTransaction __tx(this, __br);
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
__alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_), __v);
@@ -2430,57 +2286,57 @@ template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::__add_front_capacity()
{
- allocator_type& __a = __base::__alloc();
- if (__back_spare() >= __base::__block_size)
+ allocator_type& __a = __alloc();
+ if (__back_spare() >= __block_size)
{
- __base::__start_ += __base::__block_size;
- pointer __pt = __base::__map_.back();
- __base::__map_.pop_back();
- __base::__map_.push_front(__pt);
+ __start_ += __block_size;
+ pointer __pt = __map_.back();
+ __map_.pop_back();
+ __map_.push_front(__pt);
}
- // Else if __base::__map_.size() < __base::__map_.capacity() then we need to allocate 1 buffer
- else if (__base::__map_.size() < __base::__map_.capacity())
+ // Else if __map_.size() < __map_.capacity() then we need to allocate 1 buffer
+ else if (__map_.size() < __map_.capacity())
{ // we can put the new buffer into the map, but don't shift things around
// until all buffers are allocated. If we throw, we don't need to fix
// anything up (any added buffers are undetectible)
- if (__base::__map_.__front_spare() > 0)
- __base::__map_.push_front(__alloc_traits::allocate(__a, __base::__block_size));
+ if (__map_.__front_spare() > 0)
+ __map_.push_front(__alloc_traits::allocate(__a, __block_size));
else
{
- __base::__map_.push_back(__alloc_traits::allocate(__a, __base::__block_size));
+ __map_.push_back(__alloc_traits::allocate(__a, __block_size));
// Done allocating, reorder capacity
- pointer __pt = __base::__map_.back();
- __base::__map_.pop_back();
- __base::__map_.push_front(__pt);
+ pointer __pt = __map_.back();
+ __map_.pop_back();
+ __map_.push_front(__pt);
}
- __base::__start_ = __base::__map_.size() == 1 ?
- __base::__block_size / 2 :
- __base::__start_ + __base::__block_size;
+ __start_ = __map_.size() == 1 ?
+ __block_size / 2 :
+ __start_ + __block_size;
}
// Else need to allocate 1 buffer, *and* we need to reallocate __map_.
else
{
- __split_buffer<pointer, typename __base::__pointer_allocator&>
- __buf(max<size_type>(2 * __base::__map_.capacity(), 1),
- 0, __base::__map_.__alloc());
+ __split_buffer<pointer, __pointer_allocator&>
+ __buf(max<size_type>(2 * __map_.capacity(), 1),
+ 0, __map_.__alloc());
typedef __allocator_destructor<_Allocator> _Dp;
unique_ptr<pointer, _Dp> __hold(
- __alloc_traits::allocate(__a, __base::__block_size),
- _Dp(__a, __base::__block_size));
+ __alloc_traits::allocate(__a, __block_size),
+ _Dp(__a, __block_size));
__buf.push_back(__hold.get());
__hold.release();
- for (typename __base::__map_pointer __i = __base::__map_.begin();
- __i != __base::__map_.end(); ++__i)
+ for (__map_pointer __i = __map_.begin();
+ __i != __map_.end(); ++__i)
__buf.push_back(*__i);
- _VSTD::swap(__base::__map_.__first_, __buf.__first_);
- _VSTD::swap(__base::__map_.__begin_, __buf.__begin_);
- _VSTD::swap(__base::__map_.__end_, __buf.__end_);
- _VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap());
- __base::__start_ = __base::__map_.size() == 1 ?
- __base::__block_size / 2 :
- __base::__start_ + __base::__block_size;
+ _VSTD::swap(__map_.__first_, __buf.__first_);
+ _VSTD::swap(__map_.__begin_, __buf.__begin_);
+ _VSTD::swap(__map_.__end_, __buf.__end_);
+ _VSTD::swap(__map_.__end_cap(), __buf.__end_cap());
+ __start_ = __map_.size() == 1 ?
+ __block_size / 2 :
+ __start_ + __block_size;
}
}
@@ -2490,82 +2346,82 @@ template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::__add_front_capacity(size_type __n)
{
- allocator_type& __a = __base::__alloc();
- size_type __nb = __recommend_blocks(__n + __base::__map_.empty());
+ allocator_type& __a = __alloc();
+ size_type __nb = __recommend_blocks(__n + __map_.empty());
// Number of unused blocks at back:
- size_type __back_capacity = __back_spare() / __base::__block_size;
+ size_type __back_capacity = __back_spare() / __block_size;
__back_capacity = _VSTD::min(__back_capacity, __nb); // don't take more than you need
__nb -= __back_capacity; // number of blocks need to allocate
// If __nb == 0, then we have sufficient capacity.
if (__nb == 0)
{
- __base::__start_ += __base::__block_size * __back_capacity;
+ __start_ += __block_size * __back_capacity;
for (; __back_capacity > 0; --__back_capacity)
{
- pointer __pt = __base::__map_.back();
- __base::__map_.pop_back();
- __base::__map_.push_front(__pt);
+ pointer __pt = __map_.back();
+ __map_.pop_back();
+ __map_.push_front(__pt);
}
}
// Else if __nb <= __map_.capacity() - __map_.size() then we need to allocate __nb buffers
- else if (__nb <= __base::__map_.capacity() - __base::__map_.size())
+ else if (__nb <= __map_.capacity() - __map_.size())
{ // we can put the new buffers into the map, but don't shift things around
// until all buffers are allocated. If we throw, we don't need to fix
// anything up (any added buffers are undetectible)
- for (; __nb > 0; --__nb, __base::__start_ += __base::__block_size - (__base::__map_.size() == 1))
+ for (; __nb > 0; --__nb, __start_ += __block_size - (__map_.size() == 1))
{
- if (__base::__map_.__front_spare() == 0)
+ if (__map_.__front_spare() == 0)
break;
- __base::__map_.push_front(__alloc_traits::allocate(__a, __base::__block_size));
+ __map_.push_front(__alloc_traits::allocate(__a, __block_size));
}
for (; __nb > 0; --__nb, ++__back_capacity)
- __base::__map_.push_back(__alloc_traits::allocate(__a, __base::__block_size));
+ __map_.push_back(__alloc_traits::allocate(__a, __block_size));
// Done allocating, reorder capacity
- __base::__start_ += __back_capacity * __base::__block_size;
+ __start_ += __back_capacity * __block_size;
for (; __back_capacity > 0; --__back_capacity)
{
- pointer __pt = __base::__map_.back();
- __base::__map_.pop_back();
- __base::__map_.push_front(__pt);
+ pointer __pt = __map_.back();
+ __map_.pop_back();
+ __map_.push_front(__pt);
}
}
// Else need to allocate __nb buffers, *and* we need to reallocate __map_.
else
{
- size_type __ds = (__nb + __back_capacity) * __base::__block_size - __base::__map_.empty();
- __split_buffer<pointer, typename __base::__pointer_allocator&>
- __buf(max<size_type>(2* __base::__map_.capacity(),
- __nb + __base::__map_.size()),
- 0, __base::__map_.__alloc());
+ size_type __ds = (__nb + __back_capacity) * __block_size - __map_.empty();
+ __split_buffer<pointer, __pointer_allocator&>
+ __buf(max<size_type>(2* __map_.capacity(),
+ __nb + __map_.size()),
+ 0, __map_.__alloc());
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
#endif // _LIBCPP_NO_EXCEPTIONS
for (; __nb > 0; --__nb)
- __buf.push_back(__alloc_traits::allocate(__a, __base::__block_size));
+ __buf.push_back(__alloc_traits::allocate(__a, __block_size));
#ifndef _LIBCPP_NO_EXCEPTIONS
}
catch (...)
{
- for (typename __base::__map_pointer __i = __buf.begin();
+ for (__map_pointer __i = __buf.begin();
__i != __buf.end(); ++__i)
- __alloc_traits::deallocate(__a, *__i, __base::__block_size);
+ __alloc_traits::deallocate(__a, *__i, __block_size);
throw;
}
#endif // _LIBCPP_NO_EXCEPTIONS
for (; __back_capacity > 0; --__back_capacity)
{
- __buf.push_back(__base::__map_.back());
- __base::__map_.pop_back();
+ __buf.push_back(__map_.back());
+ __map_.pop_back();
}
- for (typename __base::__map_pointer __i = __base::__map_.begin();
- __i != __base::__map_.end(); ++__i)
+ for (__map_pointer __i = __map_.begin();
+ __i != __map_.end(); ++__i)
__buf.push_back(*__i);
- _VSTD::swap(__base::__map_.__first_, __buf.__first_);
- _VSTD::swap(__base::__map_.__begin_, __buf.__begin_);
- _VSTD::swap(__base::__map_.__end_, __buf.__end_);
- _VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap());
- __base::__start_ += __ds;
+ _VSTD::swap(__map_.__first_, __buf.__first_);
+ _VSTD::swap(__map_.__begin_, __buf.__begin_);
+ _VSTD::swap(__map_.__end_, __buf.__end_);
+ _VSTD::swap(__map_.__end_cap(), __buf.__end_cap());
+ __start_ += __ds;
}
}
@@ -2575,52 +2431,52 @@ template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::__add_back_capacity()
{
- allocator_type& __a = __base::__alloc();
- if (__front_spare() >= __base::__block_size)
+ allocator_type& __a = __alloc();
+ if (__front_spare() >= __block_size)
{
- __base::__start_ -= __base::__block_size;
- pointer __pt = __base::__map_.front();
- __base::__map_.pop_front();
- __base::__map_.push_back(__pt);
+ __start_ -= __block_size;
+ pointer __pt = __map_.front();
+ __map_.pop_front();
+ __map_.push_back(__pt);
}
// Else if __nb <= __map_.capacity() - __map_.size() then we need to allocate __nb buffers
- else if (__base::__map_.size() < __base::__map_.capacity())
+ else if (__map_.size() < __map_.capacity())
{ // we can put the new buffer into the map, but don't shift things around
// until it is allocated. If we throw, we don't need to fix
// anything up (any added buffers are undetectible)
- if (__base::__map_.__back_spare() != 0)
- __base::__map_.push_back(__alloc_traits::allocate(__a, __base::__block_size));
+ if (__map_.__back_spare() != 0)
+ __map_.push_back(__alloc_traits::allocate(__a, __block_size));
else
{
- __base::__map_.push_front(__alloc_traits::allocate(__a, __base::__block_size));
+ __map_.push_front(__alloc_traits::allocate(__a, __block_size));
// Done allocating, reorder capacity
- pointer __pt = __base::__map_.front();
- __base::__map_.pop_front();
- __base::__map_.push_back(__pt);
+ pointer __pt = __map_.front();
+ __map_.pop_front();
+ __map_.push_back(__pt);
}
}
// Else need to allocate 1 buffer, *and* we need to reallocate __map_.
else
{
- __split_buffer<pointer, typename __base::__pointer_allocator&>
- __buf(max<size_type>(2* __base::__map_.capacity(), 1),
- __base::__map_.size(),
- __base::__map_.__alloc());
+ __split_buffer<pointer, __pointer_allocator&>
+ __buf(max<size_type>(2* __map_.capacity(), 1),
+ __map_.size(),
+ __map_.__alloc());
typedef __allocator_destructor<_Allocator> _Dp;
unique_ptr<pointer, _Dp> __hold(
- __alloc_traits::allocate(__a, __base::__block_size),
- _Dp(__a, __base::__block_size));
+ __alloc_traits::allocate(__a, __block_size),
+ _Dp(__a, __block_size));
__buf.push_back(__hold.get());
__hold.release();
- for (typename __base::__map_pointer __i = __base::__map_.end();
- __i != __base::__map_.begin();)
+ for (__map_pointer __i = __map_.end();
+ __i != __map_.begin();)
__buf.push_front(*--__i);
- _VSTD::swap(__base::__map_.__first_, __buf.__first_);
- _VSTD::swap(__base::__map_.__begin_, __buf.__begin_);
- _VSTD::swap(__base::__map_.__end_, __buf.__end_);
- _VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap());
+ _VSTD::swap(__map_.__first_, __buf.__first_);
+ _VSTD::swap(__map_.__begin_, __buf.__begin_);
+ _VSTD::swap(__map_.__end_, __buf.__end_);
+ _VSTD::swap(__map_.__end_cap(), __buf.__end_cap());
}
}
@@ -2630,84 +2486,84 @@ template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::__add_back_capacity(size_type __n)
{
- allocator_type& __a = __base::__alloc();
- size_type __nb = __recommend_blocks(__n + __base::__map_.empty());
+ allocator_type& __a = __alloc();
+ size_type __nb = __recommend_blocks(__n + __map_.empty());
// Number of unused blocks at front:
- size_type __front_capacity = __front_spare() / __base::__block_size;
+ size_type __front_capacity = __front_spare() / __block_size;
__front_capacity = _VSTD::min(__front_capacity, __nb); // don't take more than you need
__nb -= __front_capacity; // number of blocks need to allocate
// If __nb == 0, then we have sufficient capacity.
if (__nb == 0)
{
- __base::__start_ -= __base::__block_size * __front_capacity;
+ __start_ -= __block_size * __front_capacity;
for (; __front_capacity > 0; --__front_capacity)
{
- pointer __pt = __base::__map_.front();
- __base::__map_.pop_front();
- __base::__map_.push_back(__pt);
+ pointer __pt = __map_.front();
+ __map_.pop_front();
+ __map_.push_back(__pt);
}
}
// Else if __nb <= __map_.capacity() - __map_.size() then we need to allocate __nb buffers
- else if (__nb <= __base::__map_.capacity() - __base::__map_.size())
+ else if (__nb <= __map_.capacity() - __map_.size())
{ // we can put the new buffers into the map, but don't shift things around
// until all buffers are allocated. If we throw, we don't need to fix
// anything up (any added buffers are undetectible)
for (; __nb > 0; --__nb)
{
- if (__base::__map_.__back_spare() == 0)
+ if (__map_.__back_spare() == 0)
break;
- __base::__map_.push_back(__alloc_traits::allocate(__a, __base::__block_size));
+ __map_.push_back(__alloc_traits::allocate(__a, __block_size));
}
- for (; __nb > 0; --__nb, ++__front_capacity, __base::__start_ +=
- __base::__block_size - (__base::__map_.size() == 1))
- __base::__map_.push_front(__alloc_traits::allocate(__a, __base::__block_size));
+ for (; __nb > 0; --__nb, ++__front_capacity, __start_ +=
+ __block_size - (__map_.size() == 1))
+ __map_.push_front(__alloc_traits::allocate(__a, __block_size));
// Done allocating, reorder capacity
- __base::__start_ -= __base::__block_size * __front_capacity;
+ __start_ -= __block_size * __front_capacity;
for (; __front_capacity > 0; --__front_capacity)
{
- pointer __pt = __base::__map_.front();
- __base::__map_.pop_front();
- __base::__map_.push_back(__pt);
+ pointer __pt = __map_.front();
+ __map_.pop_front();
+ __map_.push_back(__pt);
}
}
// Else need to allocate __nb buffers, *and* we need to reallocate __map_.
else
{
- size_type __ds = __front_capacity * __base::__block_size;
- __split_buffer<pointer, typename __base::__pointer_allocator&>
- __buf(max<size_type>(2* __base::__map_.capacity(),
- __nb + __base::__map_.size()),
- __base::__map_.size() - __front_capacity,
- __base::__map_.__alloc());
+ size_type __ds = __front_capacity * __block_size;
+ __split_buffer<pointer, __pointer_allocator&>
+ __buf(max<size_type>(2* __map_.capacity(),
+ __nb + __map_.size()),
+ __map_.size() - __front_capacity,
+ __map_.__alloc());
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
#endif // _LIBCPP_NO_EXCEPTIONS
for (; __nb > 0; --__nb)
- __buf.push_back(__alloc_traits::allocate(__a, __base::__block_size));
+ __buf.push_back(__alloc_traits::allocate(__a, __block_size));
#ifndef _LIBCPP_NO_EXCEPTIONS
}
catch (...)
{
- for (typename __base::__map_pointer __i = __buf.begin();
+ for (__map_pointer __i = __buf.begin();
__i != __buf.end(); ++__i)
- __alloc_traits::deallocate(__a, *__i, __base::__block_size);
+ __alloc_traits::deallocate(__a, *__i, __block_size);
throw;
}
#endif // _LIBCPP_NO_EXCEPTIONS
for (; __front_capacity > 0; --__front_capacity)
{
- __buf.push_back(__base::__map_.front());
- __base::__map_.pop_front();
+ __buf.push_back(__map_.front());
+ __map_.pop_front();
}
- for (typename __base::__map_pointer __i = __base::__map_.end();
- __i != __base::__map_.begin();)
+ for (__map_pointer __i = __map_.end();
+ __i != __map_.begin();)
__buf.push_front(*--__i);
- _VSTD::swap(__base::__map_.__first_, __buf.__first_);
- _VSTD::swap(__base::__map_.__begin_, __buf.__begin_);
- _VSTD::swap(__base::__map_.__end_, __buf.__end_);
- _VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap());
- __base::__start_ -= __ds;
+ _VSTD::swap(__map_.__first_, __buf.__first_);
+ _VSTD::swap(__map_.__begin_, __buf.__begin_);
+ _VSTD::swap(__map_.__end_, __buf.__end_);
+ _VSTD::swap(__map_.__end_cap(), __buf.__end_cap());
+ __start_ -= __ds;
}
}
@@ -2715,12 +2571,12 @@ template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::pop_front()
{
- allocator_type& __a = __base::__alloc();
- __alloc_traits::destroy(__a, _VSTD::__to_address(*(__base::__map_.begin() +
- __base::__start_ / __base::__block_size) +
- __base::__start_ % __base::__block_size));
- --__base::size();
- ++__base::__start_;
+ allocator_type& __a = __alloc();
+ __alloc_traits::destroy(__a, _VSTD::__to_address(*(__map_.begin() +
+ __start_ / __block_size) +
+ __start_ % __block_size));
+ --__size();
+ ++__start_;
__maybe_remove_front_spare();
}
@@ -2729,12 +2585,12 @@ void
deque<_Tp, _Allocator>::pop_back()
{
_LIBCPP_ASSERT(!empty(), "deque::pop_back called on an empty deque");
- allocator_type& __a = __base::__alloc();
- size_type __p = __base::size() + __base::__start_ - 1;
- __alloc_traits::destroy(__a, _VSTD::__to_address(*(__base::__map_.begin() +
- __p / __base::__block_size) +
- __p % __base::__block_size));
- --__base::size();
+ allocator_type& __a = __alloc();
+ size_type __p = size() + __start_ - 1;
+ __alloc_traits::destroy(__a, _VSTD::__to_address(*(__map_.begin() +
+ __p / __block_size) +
+ __p % __block_size));
+ --__size();
__maybe_remove_back_spare();
}
@@ -2752,7 +2608,7 @@ deque<_Tp, _Allocator>::__move_and_check(iterator __f, iterator __l, iterator __
while (__n > 0)
{
pointer __fb = __f.__ptr_;
- pointer __fe = *__f.__m_iter_ + __base::__block_size;
+ pointer __fe = *__f.__m_iter_ + __block_size;
difference_type __bs = __fe - __fb;
if (__bs > __n)
{
@@ -2806,15 +2662,15 @@ void
deque<_Tp, _Allocator>::__move_construct_and_check(iterator __f, iterator __l,
iterator __r, const_pointer& __vt)
{
- allocator_type& __a = __base::__alloc();
+ allocator_type& __a = __alloc();
// as if
- // for (; __f != __l; ++__r, ++__f, ++__base::size())
+ // for (; __f != __l; ++__r, ++__f, ++__size())
// __alloc_traits::construct(__a, _VSTD::addressof(*__r), _VSTD::move(*__f));
difference_type __n = __l - __f;
while (__n > 0)
{
pointer __fb = __f.__ptr_;
- pointer __fe = *__f.__m_iter_ + __base::__block_size;
+ pointer __fe = *__f.__m_iter_ + __block_size;
difference_type __bs = __fe - __fb;
if (__bs > __n)
{
@@ -2823,7 +2679,7 @@ deque<_Tp, _Allocator>::__move_construct_and_check(iterator __f, iterator __l,
}
if (__fb <= __vt && __vt < __fe)
__vt = (const_iterator(static_cast<__map_const_pointer>(__f.__m_iter_), __vt) += __r - __f).__ptr_;
- for (; __fb != __fe; ++__fb, ++__r, ++__base::size())
+ for (; __fb != __fe; ++__fb, ++__r, ++__size())
__alloc_traits::construct(__a, _VSTD::addressof(*__r), _VSTD::move(*__fb));
__n -= __bs;
__f += __bs;
@@ -2837,13 +2693,13 @@ void
deque<_Tp, _Allocator>::__move_construct_backward_and_check(iterator __f, iterator __l,
iterator __r, const_pointer& __vt)
{
- allocator_type& __a = __base::__alloc();
+ allocator_type& __a = __alloc();
// as if
// for (iterator __j = __l; __j != __f;)
// {
// __alloc_traitsconstruct(__a, _VSTD::addressof(*--__r), _VSTD::move(*--__j));
- // --__base::__start_;
- // ++__base::size();
+ // --__start_;
+ // ++__size();
// }
difference_type __n = __l - __f;
while (__n > 0)
@@ -2862,8 +2718,8 @@ deque<_Tp, _Allocator>::__move_construct_backward_and_check(iterator __f, iterat
while (__le != __lb)
{
__alloc_traits::construct(__a, _VSTD::addressof(*--__r), _VSTD::move(*--__le));
- --__base::__start_;
- ++__base::size();
+ --__start_;
+ ++__size();
}
__n -= __bs;
__l -= __bs - 1;
@@ -2874,26 +2730,26 @@ template <class _Tp, class _Allocator>
typename deque<_Tp, _Allocator>::iterator
deque<_Tp, _Allocator>::erase(const_iterator __f)
{
- iterator __b = __base::begin();
+ iterator __b = begin();
difference_type __pos = __f - __b;
iterator __p = __b + __pos;
- allocator_type& __a = __base::__alloc();
- if (static_cast<size_t>(__pos) <= (__base::size() - 1) / 2)
+ allocator_type& __a = __alloc();
+ if (static_cast<size_t>(__pos) <= (size() - 1) / 2)
{ // erase from front
_VSTD::move_backward(__b, __p, _VSTD::next(__p));
__alloc_traits::destroy(__a, _VSTD::addressof(*__b));
- --__base::size();
- ++__base::__start_;
+ --__size();
+ ++__start_;
__maybe_remove_front_spare();
}
else
{ // erase from back
- iterator __i = _VSTD::move(_VSTD::next(__p), __base::end(), __p);
+ iterator __i = _VSTD::move(_VSTD::next(__p), end(), __p);
__alloc_traits::destroy(__a, _VSTD::addressof(*__i));
- --__base::size();
+ --__size();
__maybe_remove_back_spare();
}
- return __base::begin() + __pos;
+ return begin() + __pos;
}
template <class _Tp, class _Allocator>
@@ -2901,49 +2757,49 @@ typename deque<_Tp, _Allocator>::iterator
deque<_Tp, _Allocator>::erase(const_iterator __f, const_iterator __l)
{
difference_type __n = __l - __f;
- iterator __b = __base::begin();
+ iterator __b = begin();
difference_type __pos = __f - __b;
iterator __p = __b + __pos;
if (__n > 0)
{
- allocator_type& __a = __base::__alloc();
- if (static_cast<size_t>(__pos) <= (__base::size() - __n) / 2)
+ allocator_type& __a = __alloc();
+ if (static_cast<size_t>(__pos) <= (size() - __n) / 2)
{ // erase from front
iterator __i = _VSTD::move_backward(__b, __p, __p + __n);
for (; __b != __i; ++__b)
__alloc_traits::destroy(__a, _VSTD::addressof(*__b));
- __base::size() -= __n;
- __base::__start_ += __n;
+ __size() -= __n;
+ __start_ += __n;
while (__maybe_remove_front_spare()) {
}
}
else
{ // erase from back
- iterator __i = _VSTD::move(__p + __n, __base::end(), __p);
- for (iterator __e = __base::end(); __i != __e; ++__i)
+ iterator __i = _VSTD::move(__p + __n, end(), __p);
+ for (iterator __e = end(); __i != __e; ++__i)
__alloc_traits::destroy(__a, _VSTD::addressof(*__i));
- __base::size() -= __n;
+ __size() -= __n;
while (__maybe_remove_back_spare()) {
}
}
}
- return __base::begin() + __pos;
+ return begin() + __pos;
}
template <class _Tp, class _Allocator>
void
deque<_Tp, _Allocator>::__erase_to_end(const_iterator __f)
{
- iterator __e = __base::end();
+ iterator __e = end();
difference_type __n = __e - __f;
if (__n > 0)
{
- allocator_type& __a = __base::__alloc();
- iterator __b = __base::begin();
+ allocator_type& __a = __alloc();
+ iterator __b = begin();
difference_type __pos = __f - __b;
for (iterator __p = __b + __pos; __p != __e; ++__p)
__alloc_traits::destroy(__a, _VSTD::addressof(*__p));
- __base::size() -= __n;
+ __size() -= __n;
while (__maybe_remove_back_spare()) {
}
}
@@ -2960,7 +2816,10 @@ deque<_Tp, _Allocator>::swap(deque& __c)
__is_nothrow_swappable<allocator_type>::value)
#endif
{
- __base::swap(__c);
+ __map_.swap(__c.__map_);
+ _VSTD::swap(__start_, __c.__start_);
+ _VSTD::swap(__size(), __c.__size());
+ _VSTD::__swap_allocator(__alloc(), __c.__alloc());
}
template <class _Tp, class _Allocator>
@@ -2969,11 +2828,28 @@ inline
void
deque<_Tp, _Allocator>::clear() _NOEXCEPT
{
- __base::clear();
+ allocator_type& __a = __alloc();
+ for (iterator __i = begin(), __e = end(); __i != __e; ++__i)
+ __alloc_traits::destroy(__a, _VSTD::addressof(*__i));
+ __size() = 0;
+ while (__map_.size() > 2)
+ {
+ __alloc_traits::deallocate(__a, __map_.front(), __block_size);
+ __map_.pop_front();
+ }
+ switch (__map_.size())
+ {
+ case 1:
+ __start_ = __block_size / 2;
+ break;
+ case 2:
+ __start_ = __block_size;
+ break;
+ }
}
template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator==(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
{
@@ -2982,7 +2858,7 @@ operator==(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
}
template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator!=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
{
@@ -2990,7 +2866,7 @@ operator!=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
}
template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator< (const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
{
@@ -2998,7 +2874,7 @@ operator< (const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
}
template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator> (const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
{
@@ -3006,7 +2882,7 @@ operator> (const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
}
template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator>=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
{
@@ -3014,7 +2890,7 @@ operator>=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
}
template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator<=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
{
@@ -3022,7 +2898,7 @@ operator<=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
}
template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
void
swap(deque<_Tp, _Allocator>& __x, deque<_Tp, _Allocator>& __y)
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
@@ -3032,7 +2908,7 @@ swap(deque<_Tp, _Allocator>& __x, deque<_Tp, _Allocator>& __y)
#if _LIBCPP_STD_VER > 17
template <class _Tp, class _Allocator, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY typename deque<_Tp, _Allocator>::size_type
+inline _LIBCPP_HIDE_FROM_ABI typename deque<_Tp, _Allocator>::size_type
erase(deque<_Tp, _Allocator>& __c, const _Up& __v) {
auto __old_size = __c.size();
__c.erase(_VSTD::remove(__c.begin(), __c.end(), __v), __c.end());
@@ -3040,7 +2916,7 @@ erase(deque<_Tp, _Allocator>& __c, const _Up& __v) {
}
template <class _Tp, class _Allocator, class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY typename deque<_Tp, _Allocator>::size_type
+inline _LIBCPP_HIDE_FROM_ABI typename deque<_Tp, _Allocator>::size_type
erase_if(deque<_Tp, _Allocator>& __c, _Predicate __pred) {
auto __old_size = __c.size();
__c.erase(_VSTD::remove_if(__c.begin(), __c.end(), __pred), __c.end());
@@ -3058,6 +2934,25 @@ inline constexpr bool __format::__enable_insertable<std::deque<wchar_t>> = true;
_LIBCPP_END_NAMESPACE_STD
+#if _LIBCPP_STD_VER > 14
+_LIBCPP_BEGIN_NAMESPACE_STD
+namespace pmr {
+template <class _ValueT>
+using deque = std::deque<_ValueT, polymorphic_allocator<_ValueT>>;
+} // namespace pmr
+_LIBCPP_END_NAMESPACE_STD
+#endif
+
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <algorithm>
+# include <atomic>
+# include <concepts>
+# include <functional>
+# include <iosfwd>
+# include <iterator>
+# include <typeinfo>
+#endif
+
#endif // _LIBCPP_DEQUE
diff --git a/contrib/libs/cxxsupp/libcxx/include/errno.h b/contrib/libs/cxxsupp/libcxx/include/errno.h
index ea0559f0f5..7b02d2b479 100644
--- a/contrib/libs/cxxsupp/libcxx/include/errno.h
+++ b/contrib/libs/cxxsupp/libcxx/include/errno.h
@@ -28,7 +28,9 @@ Macros:
# pragma GCC system_header
#endif
-#include_next <errno.h>
+#if __has_include_next(<errno.h>)
+# include_next <errno.h>
+#endif
#ifdef __cplusplus
diff --git a/contrib/libs/cxxsupp/libcxx/include/exception b/contrib/libs/cxxsupp/libcxx/include/exception
index f8a00833f7..2d37d7ab09 100644
--- a/contrib/libs/cxxsupp/libcxx/include/exception
+++ b/contrib/libs/cxxsupp/libcxx/include/exception
@@ -85,8 +85,10 @@ template <class E> void rethrow_if_nested(const E& e);
#include <type_traits>
#include <version>
+// <vcruntime_exception.h> defines its own std::exception and std::bad_exception types,
+// which we use in order to be ABI-compatible with other STLs on Windows.
#if defined(_LIBCPP_ABI_VCRUNTIME)
-#include <vcruntime_exception.h>
+# include <vcruntime_exception.h>
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -96,24 +98,66 @@ template <class E> void rethrow_if_nested(const E& e);
namespace std // purposefully not using versioning namespace
{
-#if !defined(_LIBCPP_ABI_VCRUNTIME)
-class _LIBCPP_EXCEPTION_ABI exception
-{
+#if defined(_LIBCPP_ABI_VCRUNTIME) && (!defined(_HAS_EXCEPTIONS) || _HAS_EXCEPTIONS != 0)
+// The std::exception class was already included above, but we're explicit about this condition here for clarity.
+
+#elif defined(_LIBCPP_ABI_VCRUNTIME) && _HAS_EXCEPTIONS == 0
+// However, <vcruntime_exception.h> does not define std::exception and std::bad_exception
+// when _HAS_EXCEPTIONS == 0.
+//
+// Since libc++ still wants to provide the std::exception hierarchy even when _HAS_EXCEPTIONS == 0
+// (after all those are simply types like any other), we define an ABI-compatible version
+// of the VCRuntime std::exception and std::bad_exception types in that mode.
+
+struct __std_exception_data {
+ char const* _What;
+ bool _DoFree;
+};
+
+class exception { // base of all library exceptions
public:
- _LIBCPP_INLINE_VISIBILITY exception() _NOEXCEPT {}
- _LIBCPP_INLINE_VISIBILITY exception(const exception&) _NOEXCEPT = default;
+ exception() _NOEXCEPT : __data_() {}
+
+ explicit exception(char const* __message) _NOEXCEPT : __data_() {
+ __data_._What = __message;
+ __data_._DoFree = true;
+ }
+
+ exception(exception const&) _NOEXCEPT {}
+
+ exception& operator=(exception const&) _NOEXCEPT { return *this; }
+
+ virtual ~exception() _NOEXCEPT {}
+
+ virtual char const* what() const _NOEXCEPT { return __data_._What ? __data_._What : "Unknown exception"; }
- virtual ~exception() _NOEXCEPT;
- virtual const char* what() const _NOEXCEPT;
+private:
+ __std_exception_data __data_;
};
-class _LIBCPP_EXCEPTION_ABI bad_exception
- : public exception
-{
+class bad_exception : public exception {
+public:
+ bad_exception() _NOEXCEPT : exception("bad exception") {}
+};
+
+#else // !defined(_LIBCPP_ABI_VCRUNTIME)
+// On all other platforms, we define our own std::exception and std::bad_exception types
+// regardless of whether exceptions are turned on as a language feature.
+
+class _LIBCPP_EXCEPTION_ABI exception {
+public:
+ _LIBCPP_INLINE_VISIBILITY exception() _NOEXCEPT {}
+ _LIBCPP_INLINE_VISIBILITY exception(const exception&) _NOEXCEPT = default;
+
+ virtual ~exception() _NOEXCEPT;
+ virtual const char* what() const _NOEXCEPT;
+};
+
+class _LIBCPP_EXCEPTION_ABI bad_exception : public exception {
public:
- _LIBCPP_INLINE_VISIBILITY bad_exception() _NOEXCEPT {}
- virtual ~bad_exception() _NOEXCEPT;
- virtual const char* what() const _NOEXCEPT;
+ _LIBCPP_INLINE_VISIBILITY bad_exception() _NOEXCEPT {}
+ ~bad_exception() _NOEXCEPT override;
+ const char* what() const _NOEXCEPT override;
};
#endif // !_LIBCPP_ABI_VCRUNTIME
@@ -261,7 +305,7 @@ struct __throw_with_nested<_Tp, _Up, false> {
#endif
template <class _Tp>
-_LIBCPP_NORETURN
+_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
void
throw_with_nested(_Tp&& __t)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/fenv.h b/contrib/libs/cxxsupp/libcxx/include/fenv.h
index a9ba680024..15e41568cb 100644
--- a/contrib/libs/cxxsupp/libcxx/include/fenv.h
+++ b/contrib/libs/cxxsupp/libcxx/include/fenv.h
@@ -56,7 +56,9 @@ int feupdateenv(const fenv_t* envp);
# pragma GCC system_header
#endif
-#include_next <fenv.h>
+#if __has_include_next(<fenv.h>)
+# include_next <fenv.h>
+#endif
#ifdef __cplusplus
diff --git a/contrib/libs/cxxsupp/libcxx/include/filesystem b/contrib/libs/cxxsupp/libcxx/include/filesystem
index 87de8861ea..7efa4ed2b3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/filesystem
+++ b/contrib/libs/cxxsupp/libcxx/include/filesystem
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP_FILESYSTEM
#define _LIBCPP_FILESYSTEM
@@ -14,36 +15,223 @@
namespace std::filesystem {
- class path;
+ // `class path` from http://eel.is/c++draft/fs.class.path.general#6
+ class path {
+ public:
+ using value_type = see below;
+ using string_type = basic_string<value_type>;
+ static constexpr value_type preferred_separator = see below;
+
+ enum format;
+
+ path() noexcept;
+ path(const path& p);
+ path(path&& p) noexcept;
+ path(string_type&& source, format fmt = auto_format);
+ template<class Source>
+ path(const Source& source, format fmt = auto_format);
+ template<class InputIterator>
+ path(InputIterator first, InputIterator last, format fmt = auto_format);
+ template<class Source>
+ path(const Source& source, const locale& loc, format fmt = auto_format);
+ template<class InputIterator>
+ path(InputIterator first, InputIterator last, const locale& loc, format fmt = auto_format);
+ ~path();
+
+ path& operator=(const path& p);
+ path& operator=(path&& p) noexcept;
+ path& operator=(string_type&& source);
+ path& assign(string_type&& source);
+ template<class Source>
+ path& operator=(const Source& source);
+ template<class Source>
+ path& assign(const Source& source);
+ template<class InputIterator>
+ path& assign(InputIterator first, InputIterator last);
+
+ path& operator/=(const path& p);
+ template<class Source>
+ path& operator/=(const Source& source);
+ template<class Source>
+ path& append(const Source& source);
+ template<class InputIterator>
+ path& append(InputIterator first, InputIterator last);
+
+ path& operator+=(const path& x);
+ path& operator+=(const string_type& x);
+ path& operator+=(basic_string_view<value_type> x);
+ path& operator+=(const value_type* x);
+ path& operator+=(value_type x);
+ template<class Source>
+ path& operator+=(const Source& x);
+ template<class EcharT>
+ path& operator+=(EcharT x);
+ template<class Source>
+ path& concat(const Source& x);
+ template<class InputIterator>
+ path& concat(InputIterator first, InputIterator last);
+
+ void clear() noexcept;
+ path& make_preferred();
+ path& remove_filename();
+ path& replace_filename(const path& replacement);
+ path& replace_extension(const path& replacement = path());
+ void swap(path& rhs) noexcept;
+
+ friend bool operator==(const path& lhs, const path& rhs) noexcept;
+ friend bool operator!=(const path& lhs, const path& rhs) noexcept; // removed in C++20
+ friend bool operator< (const path& lhs, const path& rhs) noexcept; // removed in C++20
+ friend bool operator<=(const path& lhs, const path& rhs) noexcept; // removed in C++20
+ friend bool operator> (const path& lhs, const path& rhs) noexcept; // removed in C++20
+ friend bool operator>=(const path& lhs, const path& rhs) noexcept; // removed in C++20
+ friend strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept; // C++20
+
+ friend path operator/(const path& lhs, const path& rhs);
+
+ const string_type& native() const noexcept;
+ const value_type* c_str() const noexcept;
+ operator string_type() const;
+
+ template<class EcharT, class traits = char_traits<EcharT>,
+ class Allocator = allocator<EcharT>>
+ basic_string<EcharT, traits, Allocator>
+ string(const Allocator& a = Allocator()) const;
+ std::string string() const;
+ std::wstring wstring() const;
+ std::u8string u8string() const;
+ std::u16string u16string() const;
+ std::u32string u32string() const;
+
+ template<class EcharT, class traits = char_traits<EcharT>,
+ class Allocator = allocator<EcharT>>
+ basic_string<EcharT, traits, Allocator>
+ generic_string(const Allocator& a = Allocator()) const;
+ std::string generic_string() const;
+ std::wstring generic_wstring() const;
+ std::u8string generic_u8string() const;
+ std::u16string generic_u16string() const;
+ std::u32string generic_u32string() const;
+
+ int compare(const path& p) const noexcept;
+ int compare(const string_type& s) const;
+ int compare(basic_string_view<value_type> s) const;
+ int compare(const value_type* s) const;
+
+ path root_name() const;
+ path root_directory() const;
+ path root_path() const;
+ path relative_path() const;
+ path parent_path() const;
+ path filename() const;
+ path stem() const;
+ path extension() const;
+
+ [[nodiscard]] bool empty() const noexcept;
+ bool has_root_name() const;
+ bool has_root_directory() const;
+ bool has_root_path() const;
+ bool has_relative_path() const;
+ bool has_parent_path() const;
+ bool has_filename() const;
+ bool has_stem() const;
+ bool has_extension() const;
+ bool is_absolute() const;
+ bool is_relative() const;
+
+ path lexically_normal() const;
+ path lexically_relative(const path& base) const;
+ path lexically_proximate(const path& base) const;
+
+ class iterator;
+ using const_iterator = iterator;
+
+ iterator begin() const;
+ iterator end() const;
+
+ template<class charT, class traits>
+ friend basic_ostream<charT, traits>&
+ operator<<(basic_ostream<charT, traits>& os, const path& p);
+ template<class charT, class traits>
+ friend basic_istream<charT, traits>&
+ operator>>(basic_istream<charT, traits>& is, path& p);
+ };
void swap(path& lhs, path& rhs) noexcept;
size_t hash_value(const path& p) noexcept;
- bool operator==(const path& lhs, const path& rhs) noexcept;
- bool operator!=(const path& lhs, const path& rhs) noexcept;
- bool operator< (const path& lhs, const path& rhs) noexcept;
- bool operator<=(const path& lhs, const path& rhs) noexcept;
- bool operator> (const path& lhs, const path& rhs) noexcept;
- bool operator>=(const path& lhs, const path& rhs) noexcept;
-
- path operator/ (const path& lhs, const path& rhs);
-
- // fs.path.io operators are friends of path.
- template <class charT, class traits>
- friend basic_ostream<charT, traits>&
- operator<<(basic_ostream<charT, traits>& os, const path& p);
-
- template <class charT, class traits>
- friend basic_istream<charT, traits>&
- operator>>(basic_istream<charT, traits>& is, path& p);
-
template <class Source>
path u8path(const Source& source);
template <class InputIterator>
path u8path(InputIterator first, InputIterator last);
class filesystem_error;
- class directory_entry;
+
+ class directory_entry {
+ public:
+ directory_entry() noexcept = default;
+ directory_entry(const directory_entry&) = default;
+ directory_entry(directory_entry&&) noexcept = default;
+ explicit directory_entry(const filesystem::path& p);
+ directory_entry(const filesystem::path& p, error_code& ec);
+ ~directory_entry();
+
+ directory_entry& operator=(const directory_entry&) = default;
+ directory_entry& operator=(directory_entry&&) noexcept = default;
+
+ void assign(const filesystem::path& p);
+ void assign(const filesystem::path& p, error_code& ec);
+ void replace_filename(const filesystem::path& p);
+ void replace_filename(const filesystem::path& p, error_code& ec);
+ void refresh();
+ void refresh(error_code& ec) noexcept;
+
+ const filesystem::path& path() const noexcept;
+ operator const filesystem::path&() const noexcept;
+ bool exists() const;
+ bool exists(error_code& ec) const noexcept;
+ bool is_block_file() const;
+ bool is_block_file(error_code& ec) const noexcept;
+ bool is_character_file() const;
+ bool is_character_file(error_code& ec) const noexcept;
+ bool is_directory() const;
+ bool is_directory(error_code& ec) const noexcept;
+ bool is_fifo() const;
+ bool is_fifo(error_code& ec) const noexcept;
+ bool is_other() const;
+ bool is_other(error_code& ec) const noexcept;
+ bool is_regular_file() const;
+ bool is_regular_file(error_code& ec) const noexcept;
+ bool is_socket() const;
+ bool is_socket(error_code& ec) const noexcept;
+ bool is_symlink() const;
+ bool is_symlink(error_code& ec) const noexcept;
+ uintmax_t file_size() const;
+ uintmax_t file_size(error_code& ec) const noexcept;
+ uintmax_t hard_link_count() const;
+ uintmax_t hard_link_count(error_code& ec) const noexcept;
+ file_time_type last_write_time() const;
+ file_time_type last_write_time(error_code& ec) const noexcept;
+ file_status status() const;
+ file_status status(error_code& ec) const noexcept;
+ file_status symlink_status() const;
+ file_status symlink_status(error_code& ec) const noexcept;
+
+ bool operator==(const directory_entry& rhs) const noexcept;
+ bool operator!=(const directory_entry& rhs) const noexcept; // removed in C++20
+ bool operator< (const directory_entry& rhs) const noexcept; // removed in C++20
+ bool operator<=(const directory_entry& rhs) const noexcept; // removed in C++20
+ bool operator> (const directory_entry& rhs) const noexcept; // removed in C++20
+ bool operator>=(const directory_entry& rhs) const noexcept; // removed in C++20
+ strong_ordering operator<=>(const directory_entry& rhs) const noexcept; // since C++20
+
+ template<class charT, class traits>
+ friend basic_ostream<charT, traits>&
+ operator<<(basic_ostream<charT, traits>& os, const directory_entry& d);
+
+ private:
+ filesystem::path pathobject; // exposition only
+ friend class directory_iterator; // exposition only
+ };
class directory_iterator;
@@ -64,6 +252,8 @@
uintmax_t capacity;
uintmax_t free;
uintmax_t available;
+
+ friend bool operator==(const space_info&, const space_info&) = default; // C++20
};
enum class file_type;
@@ -260,6 +450,8 @@ inline constexpr bool std::ranges::enable_view<std::filesystem::recursive_direct
#include <version>
// standard-mandated includes
+
+// [fs.filesystem.syn]
#include <compare>
#if defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
@@ -270,4 +462,8 @@ inline constexpr bool std::ranges::enable_view<std::filesystem::recursive_direct
# pragma GCC system_header
#endif
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+#endif
+
#endif // _LIBCPP_FILESYSTEM
diff --git a/contrib/libs/cxxsupp/libcxx/include/float.h b/contrib/libs/cxxsupp/libcxx/include/float.h
index 606081251d..9e5f711fab 100644
--- a/contrib/libs/cxxsupp/libcxx/include/float.h
+++ b/contrib/libs/cxxsupp/libcxx/include/float.h
@@ -76,7 +76,9 @@ Macros:
# pragma GCC system_header
#endif
-#include_next <float.h>
+#if __has_include_next(<float.h>)
+# include_next <float.h>
+#endif
#ifdef __cplusplus
diff --git a/contrib/libs/cxxsupp/libcxx/include/format b/contrib/libs/cxxsupp/libcxx/include/format
index 6b14570bc6..8817dceb1e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/format
+++ b/contrib/libs/cxxsupp/libcxx/include/format
@@ -141,9 +141,7 @@ namespace std {
// Enable the contents of the header only when libc++ was built with experimental features enabled.
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
-#include <__algorithm/clamp.h>
#include <__config>
-#include <__debug>
#include <__format/buffer.h>
#include <__format/concepts.h>
#include <__format/enable_insertable.h>
@@ -152,6 +150,7 @@ namespace std {
#include <__format/format_args.h>
#include <__format/format_context.h>
#include <__format/format_error.h>
+#include <__format/format_functions.h>
#include <__format/format_fwd.h>
#include <__format/format_parse_context.h>
#include <__format/format_string.h>
@@ -165,645 +164,11 @@ namespace std {
#include <__format/formatter_string.h>
#include <__format/parser_std_format_spec.h>
#include <__format/unicode.h>
-#include <__iterator/back_insert_iterator.h>
-#include <__iterator/incrementable_traits.h>
-#include <__variant/monostate.h>
-#include <array>
-#include <concepts>
-#include <string>
-#include <string_view>
-#include <type_traits>
-
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-#include <locale>
-#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-#if _LIBCPP_STD_VER > 17
-
-// TODO FMT Move the implementation in this file to its own granular headers.
-
-// TODO FMT Evaluate which templates should be external templates. This
-// improves the efficiency of the header. However since the header is still
-// under heavy development and not all classes are stable it makes no sense
-// to do this optimization now.
-
-using format_args = basic_format_args<format_context>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-using wformat_args = basic_format_args<wformat_context>;
-#endif
-
-template <class _Context = format_context, class... _Args>
-_LIBCPP_HIDE_FROM_ABI __format_arg_store<_Context, _Args...> make_format_args(_Args&&... __args) {
- return _VSTD::__format_arg_store<_Context, _Args...>(__args...);
-}
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <class... _Args>
-_LIBCPP_HIDE_FROM_ABI __format_arg_store<wformat_context, _Args...> make_wformat_args(_Args&&... __args) {
- return _VSTD::__format_arg_store<wformat_context, _Args...>(__args...);
-}
-#endif
-
-namespace __format {
-
-/// Helper class parse and handle argument.
-///
-/// When parsing a handle which is not enabled the code is ill-formed.
-/// This helper uses the parser of the appropriate formatter for the stored type.
-template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS __compile_time_handle {
-public:
- _LIBCPP_HIDE_FROM_ABI
- constexpr void __parse(basic_format_parse_context<_CharT>& __parse_ctx) const { __parse_(__parse_ctx); }
-
- template <class _Tp>
- _LIBCPP_HIDE_FROM_ABI constexpr void __enable() {
- __parse_ = [](basic_format_parse_context<_CharT>& __parse_ctx) {
- formatter<_Tp, _CharT> __f;
- __parse_ctx.advance_to(__f.parse(__parse_ctx));
- };
- }
-
- // Before calling __parse the proper handler needs to be set with __enable.
- // The default handler isn't a core constant expression.
- _LIBCPP_HIDE_FROM_ABI constexpr __compile_time_handle()
- : __parse_([](basic_format_parse_context<_CharT>&) { __throw_format_error("Not a handle"); }) {}
-
-private:
- void (*__parse_)(basic_format_parse_context<_CharT>&);
-};
-
-// Dummy format_context only providing the parts used during constant
-// validation of the basic_format_string.
-template <class _CharT>
-struct _LIBCPP_TEMPLATE_VIS __compile_time_basic_format_context {
-public:
- using char_type = _CharT;
-
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __compile_time_basic_format_context(
- const __arg_t* __args, const __compile_time_handle<_CharT>* __handles, size_t __size)
- : __args_(__args), __handles_(__handles), __size_(__size) {}
-
- // During the compile-time validation nothing needs to be written.
- // Therefore all operations of this iterator are a NOP.
- struct iterator {
- _LIBCPP_HIDE_FROM_ABI constexpr iterator& operator=(_CharT) { return *this; }
- _LIBCPP_HIDE_FROM_ABI constexpr iterator& operator*() { return *this; }
- _LIBCPP_HIDE_FROM_ABI constexpr iterator operator++(int) { return *this; }
- };
-
- _LIBCPP_HIDE_FROM_ABI constexpr __arg_t arg(size_t __id) const {
- if (__id >= __size_)
- __throw_format_error("Argument index out of bounds");
- return __args_[__id];
- }
-
- _LIBCPP_HIDE_FROM_ABI constexpr const __compile_time_handle<_CharT>& __handle(size_t __id) const {
- if (__id >= __size_)
- __throw_format_error("Argument index out of bounds");
- return __handles_[__id];
- }
-
- _LIBCPP_HIDE_FROM_ABI constexpr iterator out() { return {}; }
- _LIBCPP_HIDE_FROM_ABI constexpr void advance_to(iterator) {}
-
-private:
- const __arg_t* __args_;
- const __compile_time_handle<_CharT>* __handles_;
- size_t __size_;
-};
-
-_LIBCPP_HIDE_FROM_ABI
-constexpr void __compile_time_validate_integral(__arg_t __type) {
- switch (__type) {
- case __arg_t::__int:
- case __arg_t::__long_long:
- case __arg_t::__i128:
- case __arg_t::__unsigned:
- case __arg_t::__unsigned_long_long:
- case __arg_t::__u128:
- return;
-
- default:
- __throw_format_error("Argument isn't an integral type");
- }
-}
-
-// _HasPrecision does the formatter have a precision?
-template <class _CharT, class _Tp, bool _HasPrecision = false>
-_LIBCPP_HIDE_FROM_ABI constexpr void
-__compile_time_validate_argument(basic_format_parse_context<_CharT>& __parse_ctx,
- __compile_time_basic_format_context<_CharT>& __ctx) {
- formatter<_Tp, _CharT> __formatter;
- __parse_ctx.advance_to(__formatter.parse(__parse_ctx));
- // [format.string.std]/7
- // ... If the corresponding formatting argument is not of integral type, or
- // its value is negative for precision or non-positive for width, an
- // exception of type format_error is thrown.
- //
- // Validate whether the arguments are integrals.
- if constexpr (requires(formatter<_Tp, _CharT> __f) { __f.__width_needs_substitution(); }) {
- // TODO FMT Remove this when parser v1 has been phased out.
- if (__formatter.__width_needs_substitution())
- __format::__compile_time_validate_integral(__ctx.arg(__formatter.__width));
-
- if constexpr (_HasPrecision)
- if (__formatter.__precision_needs_substitution())
- __format::__compile_time_validate_integral(__ctx.arg(__formatter.__precision));
- } else {
- if (__formatter.__parser_.__width_as_arg_)
- __format::__compile_time_validate_integral(__ctx.arg(__formatter.__parser_.__width_));
-
- if constexpr (_HasPrecision)
- if (__formatter.__parser_.__precision_as_arg_)
- __format::__compile_time_validate_integral(__ctx.arg(__formatter.__parser_.__precision_));
- }
-}
-
-template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __compile_time_visit_format_arg(basic_format_parse_context<_CharT>& __parse_ctx,
- __compile_time_basic_format_context<_CharT>& __ctx,
- __arg_t __type) {
- switch (__type) {
- case __arg_t::__none:
- __throw_format_error("Invalid argument");
- case __arg_t::__boolean:
- return __format::__compile_time_validate_argument<_CharT, bool>(__parse_ctx, __ctx);
- case __arg_t::__char_type:
- return __format::__compile_time_validate_argument<_CharT, _CharT>(__parse_ctx, __ctx);
- case __arg_t::__int:
- return __format::__compile_time_validate_argument<_CharT, int>(__parse_ctx, __ctx);
- case __arg_t::__long_long:
- return __format::__compile_time_validate_argument<_CharT, long long>(__parse_ctx, __ctx);
- case __arg_t::__i128:
-# ifndef _LIBCPP_HAS_NO_INT128
- return __format::__compile_time_validate_argument<_CharT, __int128_t>(__parse_ctx, __ctx);
-# else
- __throw_format_error("Invalid argument");
-# endif
- return;
- case __arg_t::__unsigned:
- return __format::__compile_time_validate_argument<_CharT, unsigned>(__parse_ctx, __ctx);
- case __arg_t::__unsigned_long_long:
- return __format::__compile_time_validate_argument<_CharT, unsigned long long>(__parse_ctx, __ctx);
- case __arg_t::__u128:
-# ifndef _LIBCPP_HAS_NO_INT128
- return __format::__compile_time_validate_argument<_CharT, __uint128_t>(__parse_ctx, __ctx);
-# else
- __throw_format_error("Invalid argument");
-# endif
- return;
- case __arg_t::__float:
- return __format::__compile_time_validate_argument<_CharT, float, true>(__parse_ctx, __ctx);
- case __arg_t::__double:
- return __format::__compile_time_validate_argument<_CharT, double, true>(__parse_ctx, __ctx);
- case __arg_t::__long_double:
- return __format::__compile_time_validate_argument<_CharT, long double, true>(__parse_ctx, __ctx);
- case __arg_t::__const_char_type_ptr:
- return __format::__compile_time_validate_argument<_CharT, const _CharT*, true>(__parse_ctx, __ctx);
- case __arg_t::__string_view:
- return __format::__compile_time_validate_argument<_CharT, basic_string_view<_CharT>, true>(__parse_ctx, __ctx);
- case __arg_t::__ptr:
- return __format::__compile_time_validate_argument<_CharT, const void*>(__parse_ctx, __ctx);
- case __arg_t::__handle:
- __throw_format_error("Handle should use __compile_time_validate_handle_argument");
- }
- __throw_format_error("Invalid argument");
-}
-
-template <class _CharT, class _ParseCtx, class _Ctx>
-_LIBCPP_HIDE_FROM_ABI constexpr const _CharT*
-__handle_replacement_field(const _CharT* __begin, const _CharT* __end,
- _ParseCtx& __parse_ctx, _Ctx& __ctx) {
- __format::__parse_number_result __r =
- __format::__parse_arg_id(__begin, __end, __parse_ctx);
-
- bool __parse = *__r.__ptr == _CharT(':');
- switch (*__r.__ptr) {
- case _CharT(':'):
- // The arg-id has a format-specifier, advance the input to the format-spec.
- __parse_ctx.advance_to(__r.__ptr + 1);
- break;
- case _CharT('}'):
- // The arg-id has no format-specifier.
- __parse_ctx.advance_to(__r.__ptr);
- break;
- default:
- __throw_format_error(
- "The replacement field arg-id should terminate at a ':' or '}'");
- }
-
- if constexpr (same_as<_Ctx, __compile_time_basic_format_context<_CharT>>) {
- __arg_t __type = __ctx.arg(__r.__value);
- if (__type == __arg_t::__handle)
- __ctx.__handle(__r.__value).__parse(__parse_ctx);
- else
- __format::__compile_time_visit_format_arg(__parse_ctx, __ctx, __type);
- } else
- _VSTD::visit_format_arg(
- [&](auto __arg) {
- if constexpr (same_as<decltype(__arg), monostate>)
- __throw_format_error("Argument index out of bounds");
- else if constexpr (same_as<decltype(__arg), typename basic_format_arg<_Ctx>::handle>)
- __arg.format(__parse_ctx, __ctx);
- else {
- formatter<decltype(__arg), _CharT> __formatter;
- if (__parse)
- __parse_ctx.advance_to(__formatter.parse(__parse_ctx));
- __ctx.advance_to(__formatter.format(__arg, __ctx));
- }
- },
- __ctx.arg(__r.__value));
-
- __begin = __parse_ctx.begin();
- if (__begin == __end || *__begin != _CharT('}'))
- __throw_format_error("The replacement field misses a terminating '}'");
-
- return ++__begin;
-}
-
-template <class _ParseCtx, class _Ctx>
-_LIBCPP_HIDE_FROM_ABI constexpr typename _Ctx::iterator
-__vformat_to(_ParseCtx&& __parse_ctx, _Ctx&& __ctx) {
- using _CharT = typename _ParseCtx::char_type;
- static_assert(same_as<typename _Ctx::char_type, _CharT>);
-
- const _CharT* __begin = __parse_ctx.begin();
- const _CharT* __end = __parse_ctx.end();
- typename _Ctx::iterator __out_it = __ctx.out();
- while (__begin != __end) {
- switch (*__begin) {
- case _CharT('{'):
- ++__begin;
- if (__begin == __end)
- __throw_format_error("The format string terminates at a '{'");
-
- if (*__begin != _CharT('{')) [[likely]] {
- __ctx.advance_to(_VSTD::move(__out_it));
- __begin =
- __handle_replacement_field(__begin, __end, __parse_ctx, __ctx);
- __out_it = __ctx.out();
-
- // The output is written and __begin points to the next character. So
- // start the next iteration.
- continue;
- }
- // The string is an escape character.
- break;
-
- case _CharT('}'):
- ++__begin;
- if (__begin == __end || *__begin != _CharT('}'))
- __throw_format_error(
- "The format string contains an invalid escape sequence");
-
- break;
- }
-
- // Copy the character to the output verbatim.
- *__out_it++ = *__begin++;
- }
- return __out_it;
-}
-
-} // namespace __format
-
-template <class _CharT, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS basic_format_string {
- template <class _Tp>
- requires convertible_to<const _Tp&, basic_string_view<_CharT>>
- consteval basic_format_string(const _Tp& __str) : __str_{__str} {
- __format::__vformat_to(basic_format_parse_context<_CharT>{__str_, sizeof...(_Args)},
- _Context{__types_.data(), __handles_.data(), sizeof...(_Args)});
- }
-
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT constexpr basic_string_view<_CharT> get() const noexcept {
- return __str_;
- }
-
-private:
- basic_string_view<_CharT> __str_;
-
- using _Context = __format::__compile_time_basic_format_context<_CharT>;
-
- static constexpr array<__format::__arg_t, sizeof...(_Args)> __types_{
- __format::__determine_arg_t<_Context, remove_cvref_t<_Args>>()...};
-
- // TODO FMT remove this work-around when the AIX ICE has been resolved.
-# if defined(_AIX) && defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER < 1400
- template <class _Tp>
- static constexpr __format::__compile_time_handle<_CharT> __get_handle() {
- __format::__compile_time_handle<_CharT> __handle;
- if (__format::__determine_arg_t<_Context, _Tp>() == __format::__arg_t::__handle)
- __handle.template __enable<_Tp>();
-
- return __handle;
- }
-
- static constexpr array<__format::__compile_time_handle<_CharT>, sizeof...(_Args)> __handles_{
- __get_handle<_Args>()...};
-# else
- static constexpr array<__format::__compile_time_handle<_CharT>, sizeof...(_Args)> __handles_{[] {
- using _Tp = remove_cvref_t<_Args>;
- __format::__compile_time_handle<_CharT> __handle;
- if (__format::__determine_arg_t<_Context, _Tp>() == __format::__arg_t::__handle)
- __handle.template __enable<_Tp>();
-
- return __handle;
- }()...};
-# endif
-};
-
-template <class... _Args>
-using format_string = basic_format_string<char, type_identity_t<_Args>...>;
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <class... _Args>
-using wformat_string = basic_format_string<wchar_t, type_identity_t<_Args>...>;
-#endif
-
-template <class _OutIt, class _CharT, class _FormatOutIt>
-requires(output_iterator<_OutIt, const _CharT&>) _LIBCPP_HIDE_FROM_ABI _OutIt
- __vformat_to(
- _OutIt __out_it, basic_string_view<_CharT> __fmt,
- basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
- if constexpr (same_as<_OutIt, _FormatOutIt>)
- return _VSTD::__format::__vformat_to(
- basic_format_parse_context{__fmt, __args.__size()},
- _VSTD::__format_context_create(_VSTD::move(__out_it), __args));
- else {
- __format::__format_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it)};
- _VSTD::__format::__vformat_to(
- basic_format_parse_context{__fmt, __args.__size()},
- _VSTD::__format_context_create(__buffer.make_output_iterator(),
- __args));
- return _VSTD::move(__buffer).out();
- }
-}
-
-// The function is _LIBCPP_ALWAYS_INLINE since the compiler is bad at inlining
-// https://reviews.llvm.org/D110499#inline-1180704
-// TODO FMT Evaluate whether we want to file a Clang bug report regarding this.
-template <output_iterator<const char&> _OutIt>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
-vformat_to(_OutIt __out_it, string_view __fmt, format_args __args) {
- return _VSTD::__vformat_to(_VSTD::move(__out_it), __fmt, __args);
-}
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <output_iterator<const wchar_t&> _OutIt>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
-vformat_to(_OutIt __out_it, wstring_view __fmt, wformat_args __args) {
- return _VSTD::__vformat_to(_VSTD::move(__out_it), __fmt, __args);
-}
-#endif
-
-template <output_iterator<const char&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
-format_to(_OutIt __out_it, format_string<_Args...> __fmt, _Args&&... __args) {
- return _VSTD::vformat_to(_VSTD::move(__out_it), __fmt.get(),
- _VSTD::make_format_args(__args...));
-}
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <output_iterator<const wchar_t&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
-format_to(_OutIt __out_it, wformat_string<_Args...> __fmt, _Args&&... __args) {
- return _VSTD::vformat_to(_VSTD::move(__out_it), __fmt.get(),
- _VSTD::make_wformat_args(__args...));
-}
-#endif
-
-_LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string
-vformat(string_view __fmt, format_args __args) {
- string __res;
- _VSTD::vformat_to(_VSTD::back_inserter(__res), __fmt, __args);
- return __res;
-}
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring
-vformat(wstring_view __fmt, wformat_args __args) {
- wstring __res;
- _VSTD::vformat_to(_VSTD::back_inserter(__res), __fmt, __args);
- return __res;
-}
-#endif
-
-template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string format(format_string<_Args...> __fmt,
- _Args&&... __args) {
- return _VSTD::vformat(__fmt.get(), _VSTD::make_format_args(__args...));
-}
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring
-format(wformat_string<_Args...> __fmt, _Args&&... __args) {
- return _VSTD::vformat(__fmt.get(), _VSTD::make_wformat_args(__args...));
-}
-#endif
-
-template <class _Context, class _OutIt, class _CharT>
-_LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __vformat_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n,
- basic_string_view<_CharT> __fmt,
- basic_format_args<_Context> __args) {
- __format::__format_to_n_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it), __n};
- _VSTD::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
- _VSTD::__format_context_create(__buffer.make_output_iterator(), __args));
- return _VSTD::move(__buffer).result();
-}
-
-template <output_iterator<const char&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
-format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, format_string<_Args...> __fmt, _Args&&... __args) {
- return _VSTD::__vformat_to_n<format_context>(_VSTD::move(__out_it), __n, __fmt.get(), _VSTD::make_format_args(__args...));
-}
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <output_iterator<const wchar_t&> _OutIt, class... _Args>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
-format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, wformat_string<_Args...> __fmt,
- _Args&&... __args) {
- return _VSTD::__vformat_to_n<wformat_context>(_VSTD::move(__out_it), __n, __fmt.get(), _VSTD::make_wformat_args(__args...));
-}
-#endif
-
-template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI size_t __vformatted_size(basic_string_view<_CharT> __fmt, auto __args) {
- __format::__formatted_size_buffer<_CharT> __buffer;
- _VSTD::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
- _VSTD::__format_context_create(__buffer.make_output_iterator(), __args));
- return _VSTD::move(__buffer).result();
-}
-
-template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t
-formatted_size(format_string<_Args...> __fmt, _Args&&... __args) {
- return _VSTD::__vformatted_size(__fmt.get(), basic_format_args{_VSTD::make_format_args(__args...)});
-}
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t
-formatted_size(wformat_string<_Args...> __fmt, _Args&&... __args) {
- return _VSTD::__vformatted_size(__fmt.get(), basic_format_args{_VSTD::make_wformat_args(__args...)});
-}
-#endif
-
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-
-template <class _OutIt, class _CharT, class _FormatOutIt>
-requires(output_iterator<_OutIt, const _CharT&>) _LIBCPP_HIDE_FROM_ABI _OutIt
- __vformat_to(
- _OutIt __out_it, locale __loc, basic_string_view<_CharT> __fmt,
- basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
- if constexpr (same_as<_OutIt, _FormatOutIt>)
- return _VSTD::__format::__vformat_to(
- basic_format_parse_context{__fmt, __args.__size()},
- _VSTD::__format_context_create(_VSTD::move(__out_it), __args,
- _VSTD::move(__loc)));
- else {
- __format::__format_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it)};
- _VSTD::__format::__vformat_to(
- basic_format_parse_context{__fmt, __args.__size()},
- _VSTD::__format_context_create(__buffer.make_output_iterator(),
- __args, _VSTD::move(__loc)));
- return _VSTD::move(__buffer).out();
- }
-}
-
-template <output_iterator<const char&> _OutIt>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt vformat_to(
- _OutIt __out_it, locale __loc, string_view __fmt, format_args __args) {
- return _VSTD::__vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt,
- __args);
-}
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <output_iterator<const wchar_t&> _OutIt>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt vformat_to(
- _OutIt __out_it, locale __loc, wstring_view __fmt, wformat_args __args) {
- return _VSTD::__vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt,
- __args);
-}
-#endif
-
-template <output_iterator<const char&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
-format_to(_OutIt __out_it, locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
- return _VSTD::vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt.get(),
- _VSTD::make_format_args(__args...));
-}
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <output_iterator<const wchar_t&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
-format_to(_OutIt __out_it, locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
- return _VSTD::vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt.get(),
- _VSTD::make_wformat_args(__args...));
-}
-#endif
-
-_LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string
-vformat(locale __loc, string_view __fmt, format_args __args) {
- string __res;
- _VSTD::vformat_to(_VSTD::back_inserter(__res), _VSTD::move(__loc), __fmt,
- __args);
- return __res;
-}
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring
-vformat(locale __loc, wstring_view __fmt, wformat_args __args) {
- wstring __res;
- _VSTD::vformat_to(_VSTD::back_inserter(__res), _VSTD::move(__loc), __fmt,
- __args);
- return __res;
-}
-#endif
-
-template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string format(locale __loc,
- format_string<_Args...> __fmt,
- _Args&&... __args) {
- return _VSTD::vformat(_VSTD::move(__loc), __fmt.get(),
- _VSTD::make_format_args(__args...));
-}
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring
-format(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
- return _VSTD::vformat(_VSTD::move(__loc), __fmt.get(),
- _VSTD::make_wformat_args(__args...));
-}
-#endif
-
-template <class _Context, class _OutIt, class _CharT>
-_LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __vformat_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n,
- locale __loc, basic_string_view<_CharT> __fmt,
- basic_format_args<_Context> __args) {
- __format::__format_to_n_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it), __n};
- _VSTD::__format::__vformat_to(
- basic_format_parse_context{__fmt, __args.__size()},
- _VSTD::__format_context_create(__buffer.make_output_iterator(), __args, _VSTD::move(__loc)));
- return _VSTD::move(__buffer).result();
-}
-
-template <output_iterator<const char&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
-format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, locale __loc, format_string<_Args...> __fmt,
- _Args&&... __args) {
- return _VSTD::__vformat_to_n<format_context>(_VSTD::move(__out_it), __n, _VSTD::move(__loc), __fmt.get(),
- _VSTD::make_format_args(__args...));
-}
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <output_iterator<const wchar_t&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
-format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, locale __loc, wformat_string<_Args...> __fmt,
- _Args&&... __args) {
- return _VSTD::__vformat_to_n<wformat_context>(_VSTD::move(__out_it), __n, _VSTD::move(__loc), __fmt.get(),
- _VSTD::make_wformat_args(__args...));
-}
-#endif
-
-template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI size_t __vformatted_size(locale __loc, basic_string_view<_CharT> __fmt, auto __args) {
- __format::__formatted_size_buffer<_CharT> __buffer;
- _VSTD::__format::__vformat_to(
- basic_format_parse_context{__fmt, __args.__size()},
- _VSTD::__format_context_create(__buffer.make_output_iterator(), __args, _VSTD::move(__loc)));
- return _VSTD::move(__buffer).result();
-}
-
-template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t
-formatted_size(locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
- return _VSTD::__vformatted_size(_VSTD::move(__loc), __fmt.get(), basic_format_args{_VSTD::make_format_args(__args...)});
-}
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t
-formatted_size(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
- return _VSTD::__vformatted_size(_VSTD::move(__loc), __fmt.get(), basic_format_args{_VSTD::make_wformat_args(__args...)});
-}
-#endif
-
-#endif // _LIBCPP_HAS_NO_LOCALIZATION
-
-#endif //_LIBCPP_STD_VER > 17
-
-_LIBCPP_END_NAMESPACE_STD
-
#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
#endif // _LIBCPP_FORMAT
diff --git a/contrib/libs/cxxsupp/libcxx/include/forward_list b/contrib/libs/cxxsupp/libcxx/include/forward_list
index ee90aaa477..61dde8167d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/forward_list
+++ b/contrib/libs/cxxsupp/libcxx/include/forward_list
@@ -188,19 +188,22 @@ template <class T, class Allocator, class Predicate>
#include <__iterator/iterator_traits.h>
#include <__iterator/move_iterator.h>
#include <__iterator/next.h>
+#include <__memory/addressof.h>
+#include <__memory/allocator.h>
+#include <__memory/allocator_destructor.h>
+#include <__memory/allocator_traits.h>
+#include <__memory/compressed_pair.h>
+#include <__memory/pointer_traits.h>
#include <__memory/swap_allocator.h>
+#include <__memory/unique_ptr.h>
+#include <__memory_resource/polymorphic_allocator.h>
+#include <__type_traits/is_allocator.h>
#include <__utility/forward.h>
+#include <__utility/move.h>
#include <limits>
-#include <memory>
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <algorithm>
-# include <functional>
-# include <iterator>
-#endif
-
// standard-mandated includes
// [iterator.range]
@@ -239,30 +242,23 @@ struct __forward_list_node_value_type<__forward_list_node<_Tp, _VoidPtr> > {
template <class _NodePtr>
struct __forward_node_traits {
- typedef typename remove_cv<
- typename pointer_traits<_NodePtr>::element_type>::type __node;
+ typedef __remove_cv_t<
+ typename pointer_traits<_NodePtr>::element_type> __node;
typedef typename __forward_list_node_value_type<__node>::type __node_value_type;
typedef _NodePtr __node_pointer;
typedef __forward_begin_node<_NodePtr> __begin_node;
- typedef typename __rebind_pointer<_NodePtr, __begin_node>::type
- __begin_node_pointer;
- typedef typename __rebind_pointer<_NodePtr, void>::type __void_pointer;
+ typedef __rebind_pointer_t<_NodePtr, __begin_node> __begin_node_pointer;
+ typedef __rebind_pointer_t<_NodePtr, void> __void_pointer;
#if defined(_LIBCPP_ABI_FORWARD_LIST_REMOVE_NODE_POINTER_UB)
typedef __begin_node_pointer __iter_node_pointer;
#else
- typedef typename conditional<
- is_pointer<__void_pointer>::value,
- __begin_node_pointer,
- __node_pointer
- >::type __iter_node_pointer;
+ typedef __conditional_t<is_pointer<__void_pointer>::value, __begin_node_pointer, __node_pointer>
+ __iter_node_pointer;
#endif
- typedef typename conditional<
- is_same<__iter_node_pointer, __node_pointer>::value,
- __begin_node_pointer,
- __node_pointer
- >::type __non_iter_node_pointer;
+ typedef __conditional_t<is_same<__iter_node_pointer, __node_pointer>::value, __begin_node_pointer, __node_pointer>
+ __non_iter_node_pointer;
_LIBCPP_INLINE_VISIBILITY
static __iter_node_pointer __as_iter_node(__iter_node_pointer __p) {
@@ -278,7 +274,7 @@ template <class _NodePtr>
struct __forward_begin_node
{
typedef _NodePtr pointer;
- typedef typename __rebind_pointer<_NodePtr, __forward_begin_node>::type __begin_node_pointer;
+ typedef __rebind_pointer_t<_NodePtr, __forward_begin_node> __begin_node_pointer;
pointer __next_;
@@ -291,16 +287,11 @@ struct __forward_begin_node
};
template <class _Tp, class _VoidPtr>
-struct _LIBCPP_HIDDEN __begin_node_of
-{
- typedef __forward_begin_node<
- typename __rebind_pointer<_VoidPtr, __forward_list_node<_Tp, _VoidPtr> >::type
- > type;
-};
+using __begin_node_of = __forward_begin_node<__rebind_pointer_t<_VoidPtr, __forward_list_node<_Tp, _VoidPtr> > >;
template <class _Tp, class _VoidPtr>
struct _LIBCPP_STANDALONE_DEBUG __forward_list_node
- : public __begin_node_of<_Tp, _VoidPtr>::type
+ : public __begin_node_of<_Tp, _VoidPtr>
{
typedef _Tp value_type;
@@ -353,7 +344,7 @@ public:
typedef value_type& reference;
typedef typename pointer_traits<__node_pointer>::difference_type
difference_type;
- typedef typename __rebind_pointer<__node_pointer, value_type>::type pointer;
+ typedef __rebind_pointer_t<__node_pointer, value_type> pointer;
_LIBCPP_INLINE_VISIBILITY
__forward_list_iterator() _NOEXCEPT : __ptr_(nullptr) {}
@@ -434,7 +425,7 @@ public:
typedef const value_type& reference;
typedef typename pointer_traits<__node_pointer>::difference_type
difference_type;
- typedef typename __rebind_pointer<__node_pointer, const value_type>::type
+ typedef __rebind_pointer_t<__node_pointer, const value_type>
pointer;
_LIBCPP_INLINE_VISIBILITY
@@ -482,14 +473,12 @@ protected:
typedef typename allocator_traits<allocator_type>::void_pointer void_pointer;
typedef __forward_list_node<value_type, void_pointer> __node;
- typedef typename __begin_node_of<value_type, void_pointer>::type __begin_node;
- typedef typename __rebind_alloc_helper<allocator_traits<allocator_type>, __node>::type __node_allocator;
+ typedef __begin_node_of<value_type, void_pointer> __begin_node;
+ typedef __rebind_alloc<allocator_traits<allocator_type>, __node> __node_allocator;
typedef allocator_traits<__node_allocator> __node_traits;
typedef typename __node_traits::pointer __node_pointer;
- typedef typename __rebind_alloc_helper<
- allocator_traits<allocator_type>, __begin_node
- >::type __begin_node_allocator;
+ typedef __rebind_alloc<allocator_traits<allocator_type>, __begin_node> __begin_node_allocator;
typedef typename allocator_traits<__begin_node_allocator>::pointer
__begin_node_pointer;
@@ -497,6 +486,10 @@ protected:
"internal allocator type must differ from user-specified "
"type; otherwise overload resolution breaks");
+ static_assert(is_same<allocator_type, __rebind_alloc<__node_traits, value_type> >::value,
+ "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
+ "original allocator");
+
__compressed_pair<__begin_node, __node_allocator> __before_begin_;
_LIBCPP_INLINE_VISIBILITY
@@ -852,7 +845,7 @@ public:
__remove_return_type remove(const value_type& __v);
template <class _Predicate> __remove_return_type remove_if(_Predicate __pred);
_LIBCPP_INLINE_VISIBILITY
- __remove_return_type unique() {return unique(__equal_to<value_type>());}
+ __remove_return_type unique() { return unique(__equal_to()); }
template <class _BinaryPredicate> __remove_return_type unique(_BinaryPredicate __binary_pred);
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
@@ -1702,6 +1695,7 @@ forward_list<_Tp, _Alloc>::reverse() _NOEXCEPT
}
template <class _Tp, class _Alloc>
+_LIBCPP_HIDE_FROM_ABI
bool operator==(const forward_list<_Tp, _Alloc>& __x,
const forward_list<_Tp, _Alloc>& __y)
{
@@ -1785,6 +1779,25 @@ inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_END_NAMESPACE_STD
+#if _LIBCPP_STD_VER > 14
+_LIBCPP_BEGIN_NAMESPACE_STD
+namespace pmr {
+template <class _ValueT>
+using forward_list = std::forward_list<_ValueT, polymorphic_allocator<_ValueT>>;
+} // namespace pmr
+_LIBCPP_END_NAMESPACE_STD
+#endif
+
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <algorithm>
+# include <atomic>
+# include <concepts>
+# include <functional>
+# include <iosfwd>
+# include <iterator>
+# include <typeinfo>
+#endif
+
#endif // _LIBCPP_FORWARD_LIST
diff --git a/contrib/libs/cxxsupp/libcxx/include/fstream b/contrib/libs/cxxsupp/libcxx/include/fstream
index ffa75b14eb..62c6f53e9f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/fstream
+++ b/contrib/libs/cxxsupp/libcxx/include/fstream
@@ -192,6 +192,7 @@ typedef basic_fstream<wchar_t> wfstream;
#include <cstring>
#include <istream>
#include <ostream>
+#include <typeinfo>
#include <version>
#if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
@@ -209,6 +210,8 @@ _LIBCPP_PUSH_MACROS
# define _LIBCPP_HAS_NO_OFF_T_FUNCTIONS
#endif
+#if !defined(_LIBCPP_HAS_NO_FSTREAM)
+
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits>
@@ -226,7 +229,7 @@ public:
// 27.9.1.2 Constructors/destructor:
basic_filebuf();
basic_filebuf(basic_filebuf&& __rhs);
- virtual ~basic_filebuf();
+ ~basic_filebuf() override;
// 27.9.1.3 Assign/swap:
_LIBCPP_INLINE_VISIBILITY
@@ -259,16 +262,16 @@ public:
protected:
// 27.9.1.5 Overridden virtual functions:
- virtual int_type underflow();
- virtual int_type pbackfail(int_type __c = traits_type::eof());
- virtual int_type overflow (int_type __c = traits_type::eof());
- virtual basic_streambuf<char_type, traits_type>* setbuf(char_type* __s, streamsize __n);
- virtual pos_type seekoff(off_type __off, ios_base::seekdir __way,
- ios_base::openmode __wch = ios_base::in | ios_base::out);
- virtual pos_type seekpos(pos_type __sp,
- ios_base::openmode __wch = ios_base::in | ios_base::out);
- virtual int sync();
- virtual void imbue(const locale& __loc);
+ int_type underflow() override;
+ int_type pbackfail(int_type __c = traits_type::eof()) override;
+ int_type overflow (int_type __c = traits_type::eof()) override;
+ basic_streambuf<char_type, traits_type>* setbuf(char_type* __s, streamsize __n) override;
+ pos_type seekoff(off_type __off, ios_base::seekdir __way,
+ ios_base::openmode __wch = ios_base::in | ios_base::out) override;
+ pos_type seekpos(pos_type __sp,
+ ios_base::openmode __wch = ios_base::in | ios_base::out) override;
+ int sync() override;
+ void imbue(const locale& __loc) override;
private:
char* __extbuf_;
@@ -750,9 +753,11 @@ basic_filebuf<_CharT, _Traits>::underflow()
}
else
{
- _LIBCPP_ASSERT ( !(__extbufnext_ == NULL && (__extbufend_ != __extbufnext_)), "underflow moving from NULL" );
- if (__extbufend_ != __extbufnext_)
+ if (__extbufend_ != __extbufnext_) {
+ _LIBCPP_ASSERT(__extbufnext_ != nullptr, "underflow moving from nullptr");
+ _LIBCPP_ASSERT(__extbuf_ != nullptr, "underflow moving into nullptr");
_VSTD::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_);
+ }
__extbufnext_ = __extbuf_ + (__extbufend_ - __extbufnext_);
__extbufend_ = __extbuf_ + (__extbuf_ == __extbuf_min_ ? sizeof(__extbuf_min_) : __ebs_);
size_t __nmemb = _VSTD::min(static_cast<size_t>(__ibs_ - __unget_sz),
@@ -1741,6 +1746,17 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_filebuf<char>;
_LIBCPP_END_NAMESPACE_STD
+#endif // _LIBCPP_HAS_NO_FSTREAM
+
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <atomic>
+# include <concepts>
+# include <iosfwd>
+# include <limits>
+# include <new>
+# include <stdexcept>
+#endif
+
#endif // _LIBCPP_FSTREAM
diff --git a/contrib/libs/cxxsupp/libcxx/include/functional b/contrib/libs/cxxsupp/libcxx/include/functional
index de02059f64..8589d3a9d6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/functional
+++ b/contrib/libs/cxxsupp/libcxx/include/functional
@@ -531,20 +531,20 @@ POLICY: For non-variadic implementations, the number of arguments is limited
#include <__functional/unary_negate.h>
#include <__functional/unwrap_ref.h>
#include <__utility/forward.h>
-#include <concepts>
#include <exception>
-#include <memory>
-#include <tuple>
+#include <memory> // TODO: find out why removing this breaks the modules build
#include <type_traits>
#include <typeinfo>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <utility>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <tuple>
+# include <utility>
+#endif
+
#endif // _LIBCPP_FUNCTIONAL
diff --git a/contrib/libs/cxxsupp/libcxx/include/future b/contrib/libs/cxxsupp/libcxx/include/future
index cedab3608a..e317e8d636 100644
--- a/contrib/libs/cxxsupp/libcxx/include/future
+++ b/contrib/libs/cxxsupp/libcxx/include/future
@@ -367,21 +367,18 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
#include <__chrono/time_point.h>
#include <__config>
#include <__memory/allocator_arg_t.h>
+#include <__memory/allocator_destructor.h>
#include <__memory/uses_allocator.h>
#include <__utility/auto_cast.h>
#include <__utility/forward.h>
#include <__utility/move.h>
#include <exception>
-#include <memory>
#include <mutex>
+#include <new>
#include <system_error>
#include <thread>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <chrono>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
@@ -518,7 +515,7 @@ public:
const error_code& code() const _NOEXCEPT {return __ec_;}
future_error(const future_error&) _NOEXCEPT = default;
- virtual ~future_error() _NOEXCEPT;
+ ~future_error() _NOEXCEPT override;
};
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
@@ -544,7 +541,7 @@ protected:
mutable condition_variable __cv_;
unsigned __state_;
- virtual void __on_zero_shared() _NOEXCEPT;
+ void __on_zero_shared() _NOEXCEPT override;
void __sub_wait(unique_lock<mutex>& __lk);
public:
enum
@@ -631,7 +628,7 @@ class _LIBCPP_AVAILABILITY_FUTURE _LIBCPP_HIDDEN __assoc_state
protected:
_Up __value_;
- virtual void __on_zero_shared() _NOEXCEPT;
+ void __on_zero_shared() _NOEXCEPT override;
public:
template <class _Arg>
@@ -641,7 +638,7 @@ public:
void set_value_at_thread_exit(_Arg&& __arg);
_Rp move();
- typename add_lvalue_reference<_Rp>::type copy();
+ __add_lvalue_reference_t<_Rp> copy();
};
template <class _Rp>
@@ -692,7 +689,7 @@ __assoc_state<_Rp>::move()
}
template <class _Rp>
-typename add_lvalue_reference<_Rp>::type
+__add_lvalue_reference_t<_Rp>
__assoc_state<_Rp>::copy()
{
unique_lock<mutex> __lk(this->__mut_);
@@ -711,7 +708,7 @@ class _LIBCPP_AVAILABILITY_FUTURE __assoc_state<_Rp&>
protected:
_Up __value_;
- virtual void __on_zero_shared() _NOEXCEPT;
+ void __on_zero_shared() _NOEXCEPT override;
public:
void set_value(_Rp& __arg);
@@ -823,7 +820,7 @@ class _LIBCPP_AVAILABILITY_FUTURE __assoc_sub_state_alloc
typedef __assoc_sub_state base;
_Alloc __alloc_;
- virtual void __on_zero_shared() _NOEXCEPT;
+ void __on_zero_shared() _NOEXCEPT override;
public:
_LIBCPP_INLINE_VISIBILITY
explicit __assoc_sub_state_alloc(const _Alloc& __a)
@@ -895,7 +892,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
explicit __deferred_assoc_state(_Fp&& __f);
- virtual void __execute();
+ void __execute() override;
};
template <class _Fp>
@@ -982,12 +979,12 @@ class _LIBCPP_AVAILABILITY_FUTURE __async_assoc_state<void, _Fp>
_Fp __func_;
- virtual void __on_zero_shared() _NOEXCEPT;
+ void __on_zero_shared() _NOEXCEPT override;
public:
_LIBCPP_INLINE_VISIBILITY
explicit __async_assoc_state(_Fp&& __f);
- virtual void __execute();
+ void __execute() override;
};
template <class _Fp>
@@ -1754,7 +1751,7 @@ template <class _Fp>
__packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(_Fp&& __f)
: __f_(nullptr)
{
- typedef typename remove_reference<typename decay<_Fp>::type>::type _FR;
+ typedef __libcpp_remove_reference_t<typename decay<_Fp>::type> _FR;
typedef __packaged_task_func<_FR, allocator<_FR>, _Rp(_ArgTypes...)> _FF;
if (sizeof(_FF) <= sizeof(__buf_))
{
@@ -1778,7 +1775,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(
allocator_arg_t, const _Alloc& __a0, _Fp&& __f)
: __f_(nullptr)
{
- typedef typename remove_reference<typename decay<_Fp>::type>::type _FR;
+ typedef __libcpp_remove_reference_t<typename decay<_Fp>::type> _FR;
typedef __packaged_task_func<_FR, _Alloc, _Rp(_ArgTypes...)> _FF;
if (sizeof(_FF) <= sizeof(__buf_))
{
@@ -1891,11 +1888,11 @@ public:
_LIBCPP_INLINE_VISIBILITY
packaged_task() _NOEXCEPT : __p_(nullptr) {}
template <class _Fp,
- class = __enable_if_t<!is_same<__uncvref_t<_Fp>, packaged_task>::value> >
+ class = __enable_if_t<!is_same<__remove_cvref_t<_Fp>, packaged_task>::value> >
_LIBCPP_INLINE_VISIBILITY
explicit packaged_task(_Fp&& __f) : __f_(_VSTD::forward<_Fp>(__f)) {}
template <class _Fp, class _Allocator,
- class = __enable_if_t<!is_same<__uncvref_t<_Fp>, packaged_task>::value> >
+ class = __enable_if_t<!is_same<__remove_cvref_t<_Fp>, packaged_task>::value> >
_LIBCPP_INLINE_VISIBILITY
packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f)
: __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)),
@@ -2006,11 +2003,11 @@ public:
_LIBCPP_INLINE_VISIBILITY
packaged_task() _NOEXCEPT : __p_(nullptr) {}
template <class _Fp,
- class = __enable_if_t<!is_same<__uncvref_t<_Fp>, packaged_task>::value> >
+ class = __enable_if_t<!is_same<__remove_cvref_t<_Fp>, packaged_task>::value> >
_LIBCPP_INLINE_VISIBILITY
explicit packaged_task(_Fp&& __f) : __f_(_VSTD::forward<_Fp>(__f)) {}
template <class _Fp, class _Allocator,
- class = __enable_if_t<!is_same<__uncvref_t<_Fp>, packaged_task>::value> >
+ class = __enable_if_t<!is_same<__remove_cvref_t<_Fp>, packaged_task>::value> >
_LIBCPP_INLINE_VISIBILITY
packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f)
: __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)),
@@ -2174,7 +2171,7 @@ inline _LIBCPP_INLINE_VISIBILITY bool __does_policy_contain(launch __policy, lau
{ return (int(__policy) & int(__value)) != 0; }
template <class _Fp, class... _Args>
-_LIBCPP_NODISCARD_AFTER_CXX17
+_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
future<typename __invoke_of<typename decay<_Fp>::type, typename decay<_Args>::type...>::type>
async(launch __policy, _Fp&& __f, _Args&&... __args)
{
@@ -2436,4 +2433,8 @@ future<void>::share() _NOEXCEPT
_LIBCPP_END_NAMESPACE_STD
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
+# include <chrono>
+#endif
+
#endif // _LIBCPP_FUTURE
diff --git a/contrib/libs/cxxsupp/libcxx/include/initializer_list b/contrib/libs/cxxsupp/libcxx/include/initializer_list
index 02a8ec57fa..d975722144 100644
--- a/contrib/libs/cxxsupp/libcxx/include/initializer_list
+++ b/contrib/libs/cxxsupp/libcxx/include/initializer_list
@@ -62,7 +62,7 @@ class _LIBCPP_TEMPLATE_VIS initializer_list
size_t __size_;
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
initializer_list(const _Ep* __b, size_t __s) _NOEXCEPT
: __begin_(__b),
__size_(__s)
@@ -77,25 +77,25 @@ public:
typedef const _Ep* const_iterator;
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {}
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
size_t size() const _NOEXCEPT {return __size_;}
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Ep* begin() const _NOEXCEPT {return __begin_;}
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Ep* end() const _NOEXCEPT {return __begin_ + __size_;}
};
template<class _Ep>
inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_CONSTEXPR_SINCE_CXX14
const _Ep*
begin(initializer_list<_Ep> __il) _NOEXCEPT
{
@@ -104,7 +104,7 @@ begin(initializer_list<_Ep> __il) _NOEXCEPT
template<class _Ep>
inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_CONSTEXPR_SINCE_CXX14
const _Ep*
end(initializer_list<_Ep> __il) _NOEXCEPT
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/inttypes.h b/contrib/libs/cxxsupp/libcxx/include/inttypes.h
index e0fd71f9b6..b755526b84 100644
--- a/contrib/libs/cxxsupp/libcxx/include/inttypes.h
+++ b/contrib/libs/cxxsupp/libcxx/include/inttypes.h
@@ -248,7 +248,9 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int
# define __STDC_FORMAT_MACROS
#endif
-#include_next <inttypes.h>
+#if __has_include_next(<inttypes.h>)
+# include_next <inttypes.h>
+#endif
#ifdef __cplusplus
diff --git a/contrib/libs/cxxsupp/libcxx/include/iomanip b/contrib/libs/cxxsupp/libcxx/include/iomanip
index ed8334519a..76229fcaa2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/iomanip
+++ b/contrib/libs/cxxsupp/libcxx/include/iomanip
@@ -278,7 +278,7 @@ setw(int __n)
template <class _MoneyT> class __iom_t7;
template <class _CharT, class _Traits, class _MoneyT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_MoneyT>& __x);
template <class _MoneyT>
@@ -298,7 +298,7 @@ public:
};
template <class _CharT, class _Traits, class _MoneyT>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_MoneyT>& __x)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -338,7 +338,7 @@ get_money(_MoneyT& __mon, bool __intl = false)
template <class _MoneyT> class __iom_t8;
template <class _CharT, class _Traits, class _MoneyT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x);
template <class _MoneyT>
@@ -358,7 +358,7 @@ public:
};
template <class _CharT, class _Traits, class _MoneyT>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -397,7 +397,7 @@ put_money(const _MoneyT& __mon, bool __intl = false)
template <class _CharT> class __iom_t9;
template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t9<_CharT>& __x);
template <class _CharT>
@@ -417,7 +417,7 @@ public:
};
template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t9<_CharT>& __x)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -458,7 +458,7 @@ get_time(tm* __tm, const _CharT* __fmt)
template <class _CharT> class __iom_t10;
template <class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x);
template <class _CharT>
@@ -478,7 +478,7 @@ public:
};
template <class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
diff --git a/contrib/libs/cxxsupp/libcxx/include/ios b/contrib/libs/cxxsupp/libcxx/include/ios
index 7140e00b40..e67b7d2b77 100644
--- a/contrib/libs/cxxsupp/libcxx/include/ios
+++ b/contrib/libs/cxxsupp/libcxx/include/ios
@@ -224,6 +224,8 @@ storage-class-specifier const error_category& iostream_category() noexcept;
#include <version>
// standard-mandated includes
+
+// [ios.syn]
#include <iosfwd>
#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
@@ -441,7 +443,7 @@ public:
explicit failure(const string& __msg, const error_code& __ec = io_errc::stream);
explicit failure(const char* __msg, const error_code& __ec = io_errc::stream);
failure(const failure&) _NOEXCEPT = default;
- virtual ~failure() _NOEXCEPT;
+ ~failure() _NOEXCEPT override;
};
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
@@ -641,7 +643,7 @@ public:
// 27.5.4.1 Constructor/destructor:
_LIBCPP_INLINE_VISIBILITY
explicit basic_ios(basic_streambuf<char_type,traits_type>* __sb);
- virtual ~basic_ios();
+ ~basic_ios() override;
// 27.5.4.2 Members:
_LIBCPP_INLINE_VISIBILITY
@@ -842,7 +844,7 @@ basic_ios<_CharT, _Traits>::set_rdbuf(basic_streambuf<char_type, traits_type>* _
ios_base::set_rdbuf(__sb);
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
boolalpha(ios_base& __str)
{
@@ -850,7 +852,7 @@ boolalpha(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noboolalpha(ios_base& __str)
{
@@ -858,7 +860,7 @@ noboolalpha(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
showbase(ios_base& __str)
{
@@ -866,7 +868,7 @@ showbase(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noshowbase(ios_base& __str)
{
@@ -874,7 +876,7 @@ noshowbase(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
showpoint(ios_base& __str)
{
@@ -882,7 +884,7 @@ showpoint(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noshowpoint(ios_base& __str)
{
@@ -890,7 +892,7 @@ noshowpoint(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
showpos(ios_base& __str)
{
@@ -898,7 +900,7 @@ showpos(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noshowpos(ios_base& __str)
{
@@ -906,7 +908,7 @@ noshowpos(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
skipws(ios_base& __str)
{
@@ -914,7 +916,7 @@ skipws(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noskipws(ios_base& __str)
{
@@ -922,7 +924,7 @@ noskipws(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
uppercase(ios_base& __str)
{
@@ -930,7 +932,7 @@ uppercase(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
nouppercase(ios_base& __str)
{
@@ -938,7 +940,7 @@ nouppercase(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
unitbuf(ios_base& __str)
{
@@ -946,7 +948,7 @@ unitbuf(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
nounitbuf(ios_base& __str)
{
@@ -954,7 +956,7 @@ nounitbuf(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
internal(ios_base& __str)
{
@@ -962,7 +964,7 @@ internal(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
left(ios_base& __str)
{
@@ -970,7 +972,7 @@ left(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
right(ios_base& __str)
{
@@ -978,7 +980,7 @@ right(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
dec(ios_base& __str)
{
@@ -986,7 +988,7 @@ dec(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
hex(ios_base& __str)
{
@@ -994,7 +996,7 @@ hex(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
oct(ios_base& __str)
{
@@ -1002,7 +1004,7 @@ oct(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
fixed(ios_base& __str)
{
@@ -1010,7 +1012,7 @@ fixed(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
scientific(ios_base& __str)
{
@@ -1018,7 +1020,7 @@ scientific(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
hexfloat(ios_base& __str)
{
@@ -1026,7 +1028,7 @@ hexfloat(ios_base& __str)
return __str;
}
-inline
+_LIBCPP_HIDE_FROM_ABI inline
ios_base&
defaultfloat(ios_base& __str)
{
@@ -1036,4 +1038,17 @@ defaultfloat(ios_base& __str)
_LIBCPP_END_NAMESPACE_STD
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <cstddef>
+# include <cstdlib>
+# include <cstring>
+# include <initializer_list>
+# include <limits>
+# include <new>
+# include <stdexcept>
+# include <type_traits>
+# include <typeinfo>
+#endif
+
#endif // _LIBCPP_IOS
diff --git a/contrib/libs/cxxsupp/libcxx/include/iosfwd b/contrib/libs/cxxsupp/libcxx/include/iosfwd
index f57f58c1fc..7948606e64 100644
--- a/contrib/libs/cxxsupp/libcxx/include/iosfwd
+++ b/contrib/libs/cxxsupp/libcxx/include/iosfwd
@@ -96,6 +96,7 @@ using u32streampos = fpos<char_traits<char32_t>::state_type>;
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+#include <__fwd/string.h>
#include <__mbstate_t.h>
#include <version>
@@ -107,19 +108,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
class _LIBCPP_TYPE_VIS ios_base;
-template<class _CharT> struct _LIBCPP_TEMPLATE_VIS char_traits;
-template<> struct char_traits<char>;
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
-template<> struct char_traits<char8_t>;
-#endif
-template<> struct char_traits<char16_t>;
-template<> struct char_traits<char32_t>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template<> struct char_traits<wchar_t>;
-#endif
-
-template<class _Tp> class _LIBCPP_TEMPLATE_VIS allocator;
-
template <class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_ios;
@@ -242,19 +230,6 @@ typedef long int streamoff; // for char_traits in <string>
typedef long long streamoff; // for char_traits in <string>
#endif
-template <class _CharT, // for <stdexcept>
- class _Traits = char_traits<_CharT>,
- class _Allocator = allocator<_CharT> >
- class _LIBCPP_TEMPLATE_VIS basic_string;
-typedef basic_string<char, char_traits<char>, allocator<char> > string;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
-#endif
-typedef basic_string<char16_t, char_traits<char16_t>, allocator<char16_t> > u16string;
-
-template <class _CharT, class _Traits, class _Allocator>
- class _LIBCPP_PREFERRED_NAME(string) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstring)) basic_string;
-
// Include other forward declarations here
template <class _Tp, class _Alloc = allocator<_Tp> >
class _LIBCPP_TEMPLATE_VIS vector;
diff --git a/contrib/libs/cxxsupp/libcxx/include/iostream b/contrib/libs/cxxsupp/libcxx/include/iostream
index 13d4ac3cad..d679d9932d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/iostream
+++ b/contrib/libs/cxxsupp/libcxx/include/iostream
@@ -38,6 +38,8 @@ extern wostream wclog;
#include <version>
// standard-mandated includes
+
+// [iostream.syn]
#include <ios>
#include <istream>
#include <ostream>
diff --git a/contrib/libs/cxxsupp/libcxx/include/istream b/contrib/libs/cxxsupp/libcxx/include/istream
index 7af5dfa474..1c9adcc0c6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/istream
+++ b/contrib/libs/cxxsupp/libcxx/include/istream
@@ -192,7 +192,7 @@ public:
inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
explicit basic_istream(basic_streambuf<char_type, traits_type>* __sb) : __gc_(0)
{ this->init(__sb); }
- virtual ~basic_istream();
+ ~basic_istream() override;
protected:
inline _LIBCPP_INLINE_VISIBILITY
basic_istream(basic_istream&& __rhs);
@@ -633,7 +633,7 @@ operator>>(basic_istream<char, _Traits>& __is, signed char* __s)
#endif // _LIBCPP_STD_VER > 17
template<class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c)
{
ios_base::iostate __state = ios_base::goodbit;
@@ -1329,7 +1329,7 @@ basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir)
}
template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
ws(basic_istream<_CharT, _Traits>& __is)
{
ios_base::iostate __state = ios_base::goodbit;
@@ -1408,7 +1408,7 @@ public:
: basic_istream<_CharT, _Traits>(__sb)
{}
- virtual ~basic_iostream();
+ ~basic_iostream() override;
protected:
inline _LIBCPP_INLINE_VISIBILITY
basic_iostream(basic_iostream&& __rhs);
@@ -1442,7 +1442,7 @@ basic_iostream<_CharT, _Traits>::~basic_iostream()
}
template<class _CharT, class _Traits, class _Allocator>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Allocator>& __str)
{
@@ -1498,7 +1498,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
}
template<class _CharT, class _Traits, class _Allocator>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm)
{
@@ -1578,7 +1578,7 @@ getline(basic_istream<_CharT, _Traits>&& __is,
}
template <class _CharT, class _Traits, size_t _Size>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
{
ios_base::iostate __state = ios_base::goodbit;
@@ -1637,6 +1637,10 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_iostream<char>;
_LIBCPP_END_NAMESPACE_STD
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+#endif
+
_LIBCPP_POP_MACROS
#endif // _LIBCPP_ISTREAM
diff --git a/contrib/libs/cxxsupp/libcxx/include/iterator b/contrib/libs/cxxsupp/libcxx/include/iterator
index 225ae81536..679b3da317 100644
--- a/contrib/libs/cxxsupp/libcxx/include/iterator
+++ b/contrib/libs/cxxsupp/libcxx/include/iterator
@@ -717,22 +717,26 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
#include <__iterator/wrap_iter.h>
#include <__memory/addressof.h>
#include <__memory/pointer_traits.h>
-#include <compare>
-#include <concepts> // Mandated by the Standard.
#include <cstddef>
#include <initializer_list>
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+// standard-mandated includes
+
+// [iterator.synopsis]
+#include <compare>
+#include <concepts>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <exception>
# include <new>
# include <typeinfo>
# include <utility>
#endif
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-# pragma GCC system_header
-#endif
-
#endif // _LIBCPP_ITERATOR
diff --git a/contrib/libs/cxxsupp/libcxx/include/latch b/contrib/libs/cxxsupp/libcxx/include/latch
index 85936750b4..ff17f8453e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/latch
+++ b/contrib/libs/cxxsupp/libcxx/include/latch
@@ -64,7 +64,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
class latch
{
- __atomic_base<ptrdiff_t> __a;
+ __atomic_base<ptrdiff_t> __a_;
public:
static constexpr ptrdiff_t max() noexcept {
@@ -72,7 +72,7 @@ public:
}
inline _LIBCPP_INLINE_VISIBILITY
- constexpr explicit latch(ptrdiff_t __expected) : __a(__expected) { }
+ constexpr explicit latch(ptrdiff_t __expected) : __a_(__expected) { }
~latch() = default;
latch(const latch&) = delete;
@@ -81,19 +81,19 @@ public:
inline _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void count_down(ptrdiff_t __update = 1)
{
- auto const __old = __a.fetch_sub(__update, memory_order_release);
+ auto const __old = __a_.fetch_sub(__update, memory_order_release);
if(__old == __update)
- __a.notify_all();
+ __a_.notify_all();
}
inline _LIBCPP_INLINE_VISIBILITY
bool try_wait() const noexcept
{
- return 0 == __a.load(memory_order_acquire);
+ return 0 == __a_.load(memory_order_acquire);
}
inline _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void wait() const
{
- __cxx_atomic_wait(&__a.__a_, [&]() -> bool {
+ __cxx_atomic_wait(&__a_.__a_, [&]() -> bool {
return try_wait();
});
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/limits b/contrib/libs/cxxsupp/libcxx/include/limits
index 1fa3a8228f..ee8249fa3e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/limits
+++ b/contrib/libs/cxxsupp/libcxx/include/limits
@@ -106,10 +106,6 @@ template<> class numeric_limits<cv long double>;
#include <__config>
#include <type_traits>
-#if defined(_LIBCPP_COMPILER_MSVC)
-#include "__support/win32/limits_msvc_win32.h"
-#endif // _LIBCPP_MSVCRT
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
@@ -432,7 +428,7 @@ protected:
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;}
-#if (defined(__ppc__) || defined(__ppc64__))
+#if defined(__powerpc__) && defined(__LONG_DOUBLE_IBM128__)
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
#else
static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
@@ -451,9 +447,9 @@ protected:
template <class _Tp>
class _LIBCPP_TEMPLATE_VIS numeric_limits
- : private __libcpp_numeric_limits<typename remove_cv<_Tp>::type>
+ : private __libcpp_numeric_limits<__remove_cv_t<_Tp> >
{
- typedef __libcpp_numeric_limits<typename remove_cv<_Tp>::type> __base;
+ typedef __libcpp_numeric_limits<__remove_cv_t<_Tp> > __base;
typedef typename __base::type type;
public:
static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
diff --git a/contrib/libs/cxxsupp/libcxx/include/limits.h b/contrib/libs/cxxsupp/libcxx/include/limits.h
index 3e1e85a8a0..537a4b1439 100644
--- a/contrib/libs/cxxsupp/libcxx/include/limits.h
+++ b/contrib/libs/cxxsupp/libcxx/include/limits.h
@@ -43,13 +43,13 @@ Macros:
# pragma GCC system_header
#endif
-#ifndef __GNUC__
-#include_next <limits.h>
-#else
+#ifdef _LIBCPP_COMPILER_GCC
+
// GCC header limits.h recursively includes itself through another header called
// syslimits.h for some reason. This setup breaks down if we directly
-// #include_next GCC's limits.h (reasons not entirely clear to me). Therefore,
-// we manually re-create the necessary include sequence below:
+// #include_next GCC's limits.h (reasons not entirely clear to me).
+// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107795 for more details.
+// Therefore, we manually re-create the necessary include sequence below:
// Get the system limits.h defines (force recurse into the next level)
#define _GCC_LIMITS_H_
@@ -59,6 +59,13 @@ Macros:
// Get the ISO C defines
#undef _GCC_LIMITS_H_
#include_next <limits.h>
-#endif // __GNUC__
+
+#else
+
+# if __has_include_next(<limits.h>)
+# include_next <limits.h>
+# endif
+
+#endif // _LIBCPP_COMPILER_GCC
#endif // _LIBCPP_LIMITS_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/list b/contrib/libs/cxxsupp/libcxx/include/list
index 5fcbd67c67..a0c732739c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/list
+++ b/contrib/libs/cxxsupp/libcxx/include/list
@@ -194,21 +194,24 @@ template <class T, class Allocator, class Predicate>
#include <__iterator/next.h>
#include <__iterator/prev.h>
#include <__iterator/reverse_iterator.h>
+#include <__memory/addressof.h>
+#include <__memory/allocator.h>
+#include <__memory/allocator_destructor.h>
+#include <__memory/allocator_traits.h>
+#include <__memory/compressed_pair.h>
+#include <__memory/pointer_traits.h>
#include <__memory/swap_allocator.h>
+#include <__memory/unique_ptr.h>
+#include <__memory_resource/polymorphic_allocator.h>
+#include <__type_traits/is_allocator.h>
#include <__utility/forward.h>
#include <__utility/move.h>
#include <__utility/swap.h>
+#include <cstring>
#include <limits>
-#include <memory>
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <algorithm>
-# include <functional>
-# include <iterator>
-#endif
-
// standard-mandated includes
// [iterator.range]
@@ -237,26 +240,19 @@ template <class _Tp, class _VoidPtr> struct __list_node_base;
template <class _Tp, class _VoidPtr>
struct __list_node_pointer_traits {
- typedef typename __rebind_pointer<_VoidPtr, __list_node<_Tp, _VoidPtr> >::type
+ typedef __rebind_pointer_t<_VoidPtr, __list_node<_Tp, _VoidPtr> >
__node_pointer;
- typedef typename __rebind_pointer<_VoidPtr, __list_node_base<_Tp, _VoidPtr> >::type
+ typedef __rebind_pointer_t<_VoidPtr, __list_node_base<_Tp, _VoidPtr> >
__base_pointer;
#if defined(_LIBCPP_ABI_LIST_REMOVE_NODE_POINTER_UB)
typedef __base_pointer __link_pointer;
#else
- typedef typename conditional<
- is_pointer<_VoidPtr>::value,
- __base_pointer,
- __node_pointer
- >::type __link_pointer;
+ typedef __conditional_t<is_pointer<_VoidPtr>::value, __base_pointer, __node_pointer> __link_pointer;
#endif
- typedef typename conditional<
- is_same<__link_pointer, __node_pointer>::value,
- __base_pointer,
- __node_pointer
- >::type __non_link_pointer;
+ typedef __conditional_t<is_same<__link_pointer, __node_pointer>::value, __base_pointer, __node_pointer>
+ __non_link_pointer;
static _LIBCPP_INLINE_VISIBILITY
__link_pointer __unsafe_link_pointer_cast(__link_pointer __p) {
@@ -340,7 +336,7 @@ public:
typedef bidirectional_iterator_tag iterator_category;
typedef _Tp value_type;
typedef value_type& reference;
- typedef typename __rebind_pointer<_VoidPtr, value_type>::type pointer;
+ typedef __rebind_pointer_t<_VoidPtr, value_type> pointer;
typedef typename pointer_traits<pointer>::difference_type difference_type;
_LIBCPP_INLINE_VISIBILITY
@@ -448,7 +444,7 @@ public:
typedef bidirectional_iterator_tag iterator_category;
typedef _Tp value_type;
typedef const value_type& reference;
- typedef typename __rebind_pointer<_VoidPtr, const value_type>::type pointer;
+ typedef __rebind_pointer_t<_VoidPtr, const value_type> pointer;
typedef typename pointer_traits<pointer>::difference_type difference_type;
_LIBCPP_INLINE_VISIBILITY
@@ -555,7 +551,7 @@ protected:
typedef __list_const_iterator<value_type, __void_pointer> const_iterator;
typedef __list_node_base<value_type, __void_pointer> __node_base;
typedef __list_node<value_type, __void_pointer> __node;
- typedef typename __rebind_alloc_helper<__alloc_traits, __node>::type __node_allocator;
+ typedef __rebind_alloc<__alloc_traits, __node> __node_allocator;
typedef allocator_traits<__node_allocator> __node_alloc_traits;
typedef typename __node_alloc_traits::pointer __node_pointer;
typedef typename __node_alloc_traits::pointer __node_const_pointer;
@@ -566,7 +562,7 @@ protected:
typedef typename __alloc_traits::const_pointer const_pointer;
typedef typename __alloc_traits::difference_type difference_type;
- typedef typename __rebind_alloc_helper<__alloc_traits, __node_base>::type __node_base_allocator;
+ typedef __rebind_alloc<__alloc_traits, __node_base> __node_base_allocator;
typedef typename allocator_traits<__node_base_allocator>::pointer __node_base_pointer;
static_assert((!is_same<allocator_type, __node_allocator>::value),
"internal allocator type must differ from user-specified "
@@ -845,6 +841,10 @@ public:
typedef void __remove_return_type;
#endif
+ static_assert(is_same<allocator_type, __rebind_alloc<allocator_traits<allocator_type>, value_type> >::value,
+ "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
+ "original allocator");
+
_LIBCPP_INLINE_VISIBILITY
list()
_NOEXCEPT_(is_nothrow_default_constructible<__node_allocator>::value)
@@ -1063,7 +1063,7 @@ public:
__remove_return_type remove(const value_type& __x);
template <class _Pred> __remove_return_type remove_if(_Pred __pred);
_LIBCPP_INLINE_VISIBILITY
- __remove_return_type unique() { return unique(__equal_to<value_type>()); }
+ __remove_return_type unique() { return unique(__equal_to()); }
template <class _BinaryPred>
__remove_return_type unique(_BinaryPred __binary_pred);
_LIBCPP_INLINE_VISIBILITY
@@ -2362,6 +2362,25 @@ inline constexpr bool __format::__enable_insertable<std::list<wchar_t>> = true;
_LIBCPP_END_NAMESPACE_STD
+#if _LIBCPP_STD_VER > 14
+_LIBCPP_BEGIN_NAMESPACE_STD
+namespace pmr {
+template <class _ValueT>
+using list = std::list<_ValueT, polymorphic_allocator<_ValueT>>;
+} // namespace pmr
+_LIBCPP_END_NAMESPACE_STD
+#endif
+
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <algorithm>
+# include <atomic>
+# include <concepts>
+# include <functional>
+# include <iosfwd>
+# include <iterator>
+# include <typeinfo>
+#endif
+
#endif // _LIBCPP_LIST
diff --git a/contrib/libs/cxxsupp/libcxx/include/locale b/contrib/libs/cxxsupp/libcxx/include/locale
index 274ef4f73e..2c0df7f726 100644
--- a/contrib/libs/cxxsupp/libcxx/include/locale
+++ b/contrib/libs/cxxsupp/libcxx/include/locale
@@ -201,20 +201,16 @@ template <class charT> class messages_byname;
#include <__iterator/istreambuf_iterator.h>
#include <__iterator/ostreambuf_iterator.h>
#include <__locale>
-#include <cstdarg> // TODO: Remove this include
+#include <__memory/unique_ptr.h>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <ios>
#include <limits>
-#include <memory>
+#include <new>
#include <streambuf>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <iterator>
-#endif
-
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
// Most unix variants have catopen. These are the specific ones that don't.
# if !defined(__BIONIC__) && !defined(_NEWLIB_VERSION) && !defined(__EMSCRIPTEN__)
@@ -269,7 +265,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// If the input is "a", the first keyword matches and eofbit is set.
// If the input is "abc", no match is found and "ab" are consumed.
template <class _InputIterator, class _ForwardIterator, class _Ctype>
-_LIBCPP_HIDDEN
+_LIBCPP_HIDE_FROM_ABI
_ForwardIterator
__scan_keyword(_InputIterator& __b, _InputIterator __e,
_ForwardIterator __kb, _ForwardIterator __ke,
@@ -557,7 +553,7 @@ __num_get<_CharT>::__stage2_float_loop(_CharT __ct, bool& __in_units, char& __ex
char __x = __src[__f];
if (__x == '-' || __x == '+')
{
- if (__a_end == __a || (__a_end[-1] & 0x5F) == (__exp & 0x7F))
+ if (__a_end == __a || (std::toupper(__a_end[-1]) == std::toupper(__exp)))
{
*__a_end++ = __x;
return 0;
@@ -566,9 +562,9 @@ __num_get<_CharT>::__stage2_float_loop(_CharT __ct, bool& __in_units, char& __ex
}
if (__x == 'x' || __x == 'X')
__exp = 'P';
- else if ((__x & 0x5F) == __exp)
+ else if (std::toupper(__x) == __exp)
{
- __exp |= (char) 0x80;
+ __exp = std::tolower(__exp);
if (__in_units)
{
__in_units = false;
@@ -681,8 +677,7 @@ public:
static locale::id id;
protected:
- _LIBCPP_INLINE_VISIBILITY
- ~num_get() {}
+ _LIBCPP_HIDE_FROM_ABI ~num_get() override {}
template <class _Fp>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
@@ -751,17 +746,17 @@ locale::id
num_get<_CharT, _InputIterator>::id;
template <class _Tp>
-_LIBCPP_HIDDEN _Tp
+_LIBCPP_HIDE_FROM_ABI _Tp
__num_get_signed_integral(const char* __a, const char* __a_end,
ios_base::iostate& __err, int __base)
{
if (__a != __a_end)
{
- typename remove_reference<decltype(errno)>::type __save_errno = errno;
+ __libcpp_remove_reference_t<decltype(errno)> __save_errno = errno;
errno = 0;
char *__p2;
long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
- typename remove_reference<decltype(errno)>::type __current_errno = errno;
+ __libcpp_remove_reference_t<decltype(errno)> __current_errno = errno;
if (__current_errno == 0)
errno = __save_errno;
if (__p2 != __a_end)
@@ -786,7 +781,7 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
}
template <class _Tp>
-_LIBCPP_HIDDEN _Tp
+_LIBCPP_HIDE_FROM_ABI _Tp
__num_get_unsigned_integral(const char* __a, const char* __a_end,
ios_base::iostate& __err, int __base)
{
@@ -797,11 +792,11 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
__err = ios_base::failbit;
return 0;
}
- typename remove_reference<decltype(errno)>::type __save_errno = errno;
+ __libcpp_remove_reference_t<decltype(errno)> __save_errno = errno;
errno = 0;
char *__p2;
unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
- typename remove_reference<decltype(errno)>::type __current_errno = errno;
+ __libcpp_remove_reference_t<decltype(errno)> __current_errno = errno;
if (__current_errno == 0)
errno = __save_errno;
if (__p2 != __a_end)
@@ -845,17 +840,17 @@ long double __do_strtod<long double>(const char* __a, char** __p2) {
}
template <class _Tp>
-_LIBCPP_HIDDEN
+_LIBCPP_HIDE_FROM_ABI
_Tp
__num_get_float(const char* __a, const char* __a_end, ios_base::iostate& __err)
{
if (__a != __a_end)
{
- typename remove_reference<decltype(errno)>::type __save_errno = errno;
+ __libcpp_remove_reference_t<decltype(errno)> __save_errno = errno;
errno = 0;
char *__p2;
_Tp __ld = __do_strtod<_Tp>(__a, &__p2);
- typename remove_reference<decltype(errno)>::type __current_errno = errno;
+ __libcpp_remove_reference_t<decltype(errno)> __current_errno = errno;
if (__current_errno == 0)
errno = __save_errno;
if (__p2 != __a_end)
@@ -1352,8 +1347,7 @@ public:
static locale::id id;
protected:
- _LIBCPP_INLINE_VISIBILITY
- ~num_put() {}
+ _LIBCPP_HIDE_FROM_ABI ~num_put() override {}
virtual iter_type do_put(iter_type __s, ios_base& __iob, char_type __fl,
bool __v) const;
@@ -1390,7 +1384,7 @@ locale::id
num_put<_CharT, _OutputIterator>::id;
template <class _CharT, class _OutputIterator>
-_LIBCPP_HIDDEN
+_LIBCPP_HIDE_FROM_ABI
_OutputIterator
__pad_and_output(_OutputIterator __s,
const _CharT* __ob, const _CharT* __op, const _CharT* __oe,
@@ -1413,7 +1407,7 @@ __pad_and_output(_OutputIterator __s,
}
template <class _CharT, class _Traits>
-_LIBCPP_HIDDEN
+_LIBCPP_HIDE_FROM_ABI
ostreambuf_iterator<_CharT, _Traits>
__pad_and_output(ostreambuf_iterator<_CharT, _Traits> __s,
const _CharT* __ob, const _CharT* __op, const _CharT* __oe,
@@ -1652,7 +1646,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_put<wchar_t>;
#endif
template <class _CharT, class _InputIterator>
-_LIBCPP_HIDDEN
+_LIBCPP_HIDE_FROM_ABI
int
__get_up_to_n_digits(_InputIterator& __b, _InputIterator __e,
ios_base::iostate& __err, const ctype<_CharT>& __ct, int __n)
@@ -1798,8 +1792,7 @@ public:
static locale::id id;
protected:
- _LIBCPP_INLINE_VISIBILITY
- ~time_get() {}
+ _LIBCPP_HIDE_FROM_ABI ~time_get() override {}
virtual dateorder do_date_order() const;
virtual iter_type do_get_time(iter_type __b, iter_type __e, ios_base& __iob,
@@ -2392,7 +2385,9 @@ extern template _LIBCPP_FUNC_VIS __time_get_storage<_CharT>::string_type __time_
/**/
_LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(char)
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
_LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(wchar_t)
+#endif
#undef _LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION
template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
@@ -2416,26 +2411,25 @@ public:
__time_get_storage<_CharT>(__nm) {}
protected:
- _LIBCPP_INLINE_VISIBILITY
- ~time_get_byname() {}
+ _LIBCPP_HIDE_FROM_ABI ~time_get_byname() override {}
_LIBCPP_INLINE_VISIBILITY
- virtual dateorder do_date_order() const {return this->__do_date_order();}
+ dateorder do_date_order() const override {return this->__do_date_order();}
private:
_LIBCPP_INLINE_VISIBILITY
- virtual const string_type* __weeks() const {return this->__weeks_;}
+ const string_type* __weeks() const override {return this->__weeks_;}
_LIBCPP_INLINE_VISIBILITY
- virtual const string_type* __months() const {return this->__months_;}
+ const string_type* __months() const override {return this->__months_;}
_LIBCPP_INLINE_VISIBILITY
- virtual const string_type* __am_pm() const {return this->__am_pm_;}
+ const string_type* __am_pm() const override {return this->__am_pm_;}
_LIBCPP_INLINE_VISIBILITY
- virtual const string_type& __c() const {return this->__c_;}
+ const string_type& __c() const override {return this->__c_;}
_LIBCPP_INLINE_VISIBILITY
- virtual const string_type& __r() const {return this->__r_;}
+ const string_type& __r() const override {return this->__r_;}
_LIBCPP_INLINE_VISIBILITY
- virtual const string_type& __x() const {return this->__x_;}
+ const string_type& __x() const override {return this->__x_;}
_LIBCPP_INLINE_VISIBILITY
- virtual const string_type& __X() const {return this->__X_;}
+ const string_type& __X() const override {return this->__X_;}
};
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<char>;
@@ -2453,8 +2447,10 @@ protected:
~__time_put();
void __do_put(char* __nb, char*& __ne, const tm* __tm,
char __fmt, char __mod) const;
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
void __do_put(wchar_t* __wb, wchar_t*& __we, const tm* __tm,
char __fmt, char __mod) const;
+#endif
};
template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
@@ -2483,8 +2479,7 @@ public:
static locale::id id;
protected:
- _LIBCPP_INLINE_VISIBILITY
- ~time_put() {}
+ _LIBCPP_HIDE_FROM_ABI ~time_put() override {}
virtual iter_type do_put(iter_type __s, ios_base&, char_type, const tm* __tm,
char __fmt, char __mod) const;
@@ -2575,8 +2570,7 @@ protected:
#if defined(_MSC_VER) && defined(__clang__)
~time_put_byname() {}
#else
- _LIBCPP_INLINE_VISIBILITY
- ~time_put_byname() {}
+ _LIBCPP_HIDE_FROM_ABI ~time_put_byname() override {}
#endif
};
@@ -2625,8 +2619,7 @@ public:
static const bool intl = _International;
protected:
- _LIBCPP_INLINE_VISIBILITY
- ~moneypunct() {}
+ _LIBCPP_HIDE_FROM_ABI ~moneypunct() override {}
virtual char_type do_decimal_point() const {return numeric_limits<char_type>::max();}
virtual char_type do_thousands_sep() const {return numeric_limits<char_type>::max();}
@@ -2676,18 +2669,17 @@ public:
: moneypunct<_CharT, _International>(__refs) {init(__nm.c_str());}
protected:
- _LIBCPP_INLINE_VISIBILITY
- ~moneypunct_byname() {}
-
- virtual char_type do_decimal_point() const {return __decimal_point_;}
- virtual char_type do_thousands_sep() const {return __thousands_sep_;}
- virtual string do_grouping() const {return __grouping_;}
- virtual string_type do_curr_symbol() const {return __curr_symbol_;}
- virtual string_type do_positive_sign() const {return __positive_sign_;}
- virtual string_type do_negative_sign() const {return __negative_sign_;}
- virtual int do_frac_digits() const {return __frac_digits_;}
- virtual pattern do_pos_format() const {return __pos_format_;}
- virtual pattern do_neg_format() const {return __neg_format_;}
+ _LIBCPP_HIDE_FROM_ABI ~moneypunct_byname() override {}
+
+ char_type do_decimal_point() const override {return __decimal_point_;}
+ char_type do_thousands_sep() const override {return __thousands_sep_;}
+ string do_grouping() const override {return __grouping_;}
+ string_type do_curr_symbol() const override {return __curr_symbol_;}
+ string_type do_positive_sign() const override {return __positive_sign_;}
+ string_type do_negative_sign() const override {return __negative_sign_;}
+ int do_frac_digits() const override {return __frac_digits_;}
+ pattern do_pos_format() const override {return __pos_format_;}
+ pattern do_neg_format() const override {return __neg_format_;}
private:
char_type __decimal_point_;
@@ -2805,9 +2797,7 @@ public:
static locale::id id;
protected:
-
- _LIBCPP_INLINE_VISIBILITY
- ~money_get() {}
+ _LIBCPP_HIDE_FROM_ABI ~money_get() override {}
virtual iter_type do_get(iter_type __b, iter_type __e, bool __intl,
ios_base& __iob, ios_base::iostate& __err,
@@ -2832,7 +2822,7 @@ money_get<_CharT, _InputIterator>::id;
_LIBCPP_FUNC_VIS void __do_nothing(void*);
template <class _Tp>
-_LIBCPP_HIDDEN
+_LIBCPP_HIDE_FROM_ABI
void
__double_or_nothing(unique_ptr<_Tp, void(*)(void*)>& __b, _Tp*& __n, _Tp*& __e)
{
@@ -3351,8 +3341,7 @@ public:
static locale::id id;
protected:
- _LIBCPP_INLINE_VISIBILITY
- ~money_put() {}
+ _LIBCPP_HIDE_FROM_ABI ~money_put() override {}
virtual iter_type do_put(iter_type __s, bool __intl, ios_base& __iob,
char_type __fl, long double __units) const;
@@ -3520,8 +3509,7 @@ public:
static locale::id id;
protected:
- _LIBCPP_INLINE_VISIBILITY
- ~messages() {}
+ _LIBCPP_HIDE_FROM_ABI ~messages() override {}
virtual catalog do_open(const basic_string<char>&, const locale&) const;
virtual string_type do_get(catalog, int __set, int __msgid,
@@ -3610,8 +3598,7 @@ public:
: messages<_CharT>(__refs) {}
protected:
- _LIBCPP_INLINE_VISIBILITY
- ~messages_byname() {}
+ _LIBCPP_HIDE_FROM_ABI ~messages_byname() override {}
};
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages_byname<char>;
@@ -4030,9 +4017,11 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
}
else
{
- _LIBCPP_ASSERT(!(__extbufnext_ == NULL && (__extbufend_ != __extbufnext_)), "underflow moving from NULL" );
- if (__extbufend_ != __extbufnext_)
+ if (__extbufend_ != __extbufnext_) {
+ _LIBCPP_ASSERT(__extbufnext_ != nullptr, "underflow moving from nullptr");
+ _LIBCPP_ASSERT(__extbuf_ != nullptr, "underflow moving into nullptr");
_VSTD::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_);
+ }
__extbufnext_ = __extbuf_ + (__extbufend_ - __extbufnext_);
__extbufend_ = __extbuf_ + (__extbuf_ == __extbuf_min_ ? sizeof(__extbuf_min_) : __ebs_);
streamsize __nmemb = _VSTD::min(static_cast<streamsize>(this->egptr() - this->eback() - __unget_sz),
@@ -4373,4 +4362,13 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <atomic>
+# include <concepts>
+# include <cstdarg>
+# include <iterator>
+# include <stdexcept>
+# include <typeinfo>
+#endif
+
#endif // _LIBCPP_LOCALE
diff --git a/contrib/libs/cxxsupp/libcxx/include/locale.h b/contrib/libs/cxxsupp/libcxx/include/locale.h
index 17c0a705a0..3fb812035a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/locale.h
+++ b/contrib/libs/cxxsupp/libcxx/include/locale.h
@@ -43,6 +43,8 @@ Functions:
# pragma GCC system_header
#endif
-#include_next <locale.h>
+#if __has_include_next(<locale.h>)
+# include_next <locale.h>
+#endif
#endif // _LIBCPP_LOCALE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/map b/contrib/libs/cxxsupp/libcxx/include/map
index d017763837..ee46647d28 100644
--- a/contrib/libs/cxxsupp/libcxx/include/map
+++ b/contrib/libs/cxxsupp/libcxx/include/map
@@ -538,20 +538,18 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred); // C++20
#include <__iterator/erase_if_container.h>
#include <__iterator/iterator_traits.h>
#include <__iterator/reverse_iterator.h>
+#include <__memory/allocator.h>
+#include <__memory_resource/polymorphic_allocator.h>
#include <__node_handle>
#include <__tree>
+#include <__type_traits/is_allocator.h>
#include <__utility/forward.h>
+#include <__utility/piecewise_construct.h>
#include <__utility/swap.h>
-#include <memory>
+#include <tuple>
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <functional>
-# include <iterator>
-# include <utility>
-#endif
-
// standard-mandated includes
// [iterator.range]
@@ -619,46 +617,46 @@ public:
template <class _Key, class _CP, class _Compare>
class __map_value_compare<_Key, _CP, _Compare, false>
{
- _Compare comp;
+ _Compare __comp_;
public:
_LIBCPP_INLINE_VISIBILITY
__map_value_compare()
_NOEXCEPT_(is_nothrow_default_constructible<_Compare>::value)
- : comp() {}
+ : __comp_() {}
_LIBCPP_INLINE_VISIBILITY
__map_value_compare(_Compare __c)
_NOEXCEPT_(is_nothrow_copy_constructible<_Compare>::value)
- : comp(__c) {}
+ : __comp_(__c) {}
_LIBCPP_INLINE_VISIBILITY
- const _Compare& key_comp() const _NOEXCEPT {return comp;}
+ const _Compare& key_comp() const _NOEXCEPT {return __comp_;}
_LIBCPP_INLINE_VISIBILITY
bool operator()(const _CP& __x, const _CP& __y) const
- {return comp(__x.__get_value().first, __y.__get_value().first);}
+ {return __comp_(__x.__get_value().first, __y.__get_value().first);}
_LIBCPP_INLINE_VISIBILITY
bool operator()(const _CP& __x, const _Key& __y) const
- {return comp(__x.__get_value().first, __y);}
+ {return __comp_(__x.__get_value().first, __y);}
_LIBCPP_INLINE_VISIBILITY
bool operator()(const _Key& __x, const _CP& __y) const
- {return comp(__x, __y.__get_value().first);}
+ {return __comp_(__x, __y.__get_value().first);}
void swap(__map_value_compare& __y)
_NOEXCEPT_(__is_nothrow_swappable<_Compare>::value)
{
using _VSTD::swap;
- swap(comp, __y.comp);
+ swap(__comp_, __y.__comp_);
}
#if _LIBCPP_STD_VER > 11
template <typename _K2>
_LIBCPP_INLINE_VISIBILITY
bool operator()(const _K2& __x, const _CP& __y) const
- {return comp(__x, __y.__get_value().first);}
+ {return __comp_(__x, __y.__get_value().first);}
template <typename _K2>
_LIBCPP_INLINE_VISIBILITY
bool operator()(const _CP& __x, const _K2& __y) const
- {return comp(__x.__get_value().first, __y);}
+ {return __comp_(__x.__get_value().first, __y);}
#endif
};
@@ -738,16 +736,16 @@ struct _LIBCPP_STANDALONE_DEBUG __value_type
typedef pair<key_type&&, mapped_type&&> __nc_rref_pair_type;
private:
- value_type __cc;
+ value_type __cc_;
public:
_LIBCPP_INLINE_VISIBILITY
value_type& __get_value()
{
#if _LIBCPP_STD_VER > 14
- return *_VSTD::launder(_VSTD::addressof(__cc));
+ return *_VSTD::launder(_VSTD::addressof(__cc_));
#else
- return __cc;
+ return __cc_;
#endif
}
@@ -755,9 +753,9 @@ public:
const value_type& __get_value() const
{
#if _LIBCPP_STD_VER > 14
- return *_VSTD::launder(_VSTD::addressof(__cc));
+ return *_VSTD::launder(_VSTD::addressof(__cc_));
#else
- return __cc;
+ return __cc_;
#endif
}
@@ -818,13 +816,13 @@ struct __value_type
typedef pair<const key_type, mapped_type> value_type;
private:
- value_type __cc;
+ value_type __cc_;
public:
_LIBCPP_INLINE_VISIBILITY
- value_type& __get_value() { return __cc; }
+ value_type& __get_value() { return __cc_; }
_LIBCPP_INLINE_VISIBILITY
- const value_type& __get_value() const { return __cc; }
+ const value_type& __get_value() const { return __cc_; }
private:
__value_type();
@@ -1001,12 +999,15 @@ private:
typedef _VSTD::__value_type<key_type, mapped_type> __value_type;
typedef __map_value_compare<key_type, __value_type, key_compare> __vc;
- typedef typename __rebind_alloc_helper<allocator_traits<allocator_type>,
- __value_type>::type __allocator_type;
+ typedef __rebind_alloc<allocator_traits<allocator_type>, __value_type> __allocator_type;
typedef __tree<__value_type, __vc, __allocator_type> __base;
typedef typename __base::__node_traits __node_traits;
typedef allocator_traits<allocator_type> __alloc_traits;
+ static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
+ "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
+ "original allocator");
+
__base __tree_;
public:
@@ -1778,12 +1779,15 @@ private:
typedef _VSTD::__value_type<key_type, mapped_type> __value_type;
typedef __map_value_compare<key_type, __value_type, key_compare> __vc;
- typedef typename __rebind_alloc_helper<allocator_traits<allocator_type>,
- __value_type>::type __allocator_type;
+ typedef __rebind_alloc<allocator_traits<allocator_type>, __value_type> __allocator_type;
typedef __tree<__value_type, __vc, __allocator_type> __base;
typedef typename __base::__node_traits __node_traits;
typedef allocator_traits<allocator_type> __alloc_traits;
+ static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
+ "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
+ "original allocator");
+
__base __tree_;
public:
@@ -2335,4 +2339,23 @@ inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_END_NAMESPACE_STD
+#if _LIBCPP_STD_VER > 14
+_LIBCPP_BEGIN_NAMESPACE_STD
+namespace pmr {
+template <class _KeyT, class _ValueT, class _CompareT = std::less<_KeyT>>
+using map = std::map<_KeyT, _ValueT, _CompareT, polymorphic_allocator<std::pair<const _KeyT, _ValueT>>>;
+
+template <class _KeyT, class _ValueT, class _CompareT = std::less<_KeyT>>
+using multimap = std::multimap<_KeyT, _ValueT, _CompareT, polymorphic_allocator<std::pair<const _KeyT, _ValueT>>>;
+} // namespace pmr
+_LIBCPP_END_NAMESPACE_STD
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <functional>
+# include <iterator>
+# include <utility>
+#endif
+
#endif // _LIBCPP_MAP
diff --git a/contrib/libs/cxxsupp/libcxx/include/math.h b/contrib/libs/cxxsupp/libcxx/include/math.h
index 3c16fbdc4e..f2d4eaedf8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/math.h
+++ b/contrib/libs/cxxsupp/libcxx/include/math.h
@@ -297,7 +297,9 @@ long double truncl(long double x);
# pragma GCC system_header
#endif
-#include_next <math.h>
+# if __has_include_next(<math.h>)
+# include_next <math.h>
+# endif
#ifdef __cplusplus
@@ -310,474 +312,217 @@ extern "C++" {
#include <stdlib.h>
#include <type_traits>
-// signbit
-#ifdef signbit
+# ifdef fpclassify
+# undef fpclassify
+# endif
-template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
-bool
-__libcpp_signbit(_A1 __lcpp_x) _NOEXCEPT
-{
-#if __has_builtin(__builtin_signbit)
- return __builtin_signbit(__lcpp_x);
-#else
- return signbit(__lcpp_x);
-#endif
-}
+# ifdef signbit
+# undef signbit
+# endif
-#undef signbit
+# ifdef isfinite
+# undef isfinite
+# endif
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
-signbit(_A1 __lcpp_x) _NOEXCEPT
-{
- return __libcpp_signbit((typename std::__promote<_A1>::type)__lcpp_x);
-}
+# ifdef isinf
+# undef isinf
+# endif
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<
- std::is_integral<_A1>::value && std::is_signed<_A1>::value, bool>::type
-signbit(_A1 __lcpp_x) _NOEXCEPT
-{ return __lcpp_x < 0; }
+# if defined(isnan) && !defined(_LIBCPP_MSVCRT)
+# undef isnan
+# endif
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<
- std::is_integral<_A1>::value && !std::is_signed<_A1>::value, bool>::type
-signbit(_A1) _NOEXCEPT
-{ return false; }
-
-#elif defined(_LIBCPP_MSVCRT)
-
-template <typename _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
-signbit(_A1 __lcpp_x) _NOEXCEPT
-{
- return ::signbit(static_cast<typename std::__promote<_A1>::type>(__lcpp_x));
-}
+# ifdef isnormal
+# undef isnormal
+# endif
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<
- std::is_integral<_A1>::value && std::is_signed<_A1>::value, bool>::type
-signbit(_A1 __lcpp_x) _NOEXCEPT
-{ return __lcpp_x < 0; }
+# ifdef isgreater
+# undef isgreater
+# endif
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<
- std::is_integral<_A1>::value && !std::is_signed<_A1>::value, bool>::type
-signbit(_A1) _NOEXCEPT
-{ return false; }
+# ifdef isgreaterequal
+# undef isgreaterequal
+# endif
-#endif // signbit
+# ifdef isless
+# undef isless
+# endif
-// fpclassify
+# ifdef islessequal
+# undef islessequal
+# endif
-#ifdef fpclassify
+# ifdef islessgreater
+# undef islessgreater
+# endif
-template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
-int
-__libcpp_fpclassify(_A1 __lcpp_x) _NOEXCEPT
-{
-#if __has_builtin(__builtin_fpclassify)
- return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL,
- FP_ZERO, __lcpp_x);
-#else
- return fpclassify(__lcpp_x);
-#endif
-}
+# ifdef isunordered
+# undef isunordered
+# endif
-#undef fpclassify
+// signbit
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_floating_point<_A1>::value, int>::type
-fpclassify(_A1 __lcpp_x) _NOEXCEPT
-{
- return __libcpp_fpclassify((typename std::__promote<_A1>::type)__lcpp_x);
+template <class _A1, std::__enable_if_t<std::is_floating_point<_A1>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool signbit(_A1 __x) _NOEXCEPT {
+ return __builtin_signbit(__x);
}
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_integral<_A1>::value, int>::type
-fpclassify(_A1 __lcpp_x) _NOEXCEPT
-{ return __lcpp_x == 0 ? FP_ZERO : FP_NORMAL; }
+template <class _A1, std::__enable_if_t<std::is_integral<_A1>::value && std::is_signed<_A1>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool signbit(_A1 __x) _NOEXCEPT {
+ return __x < 0;
+}
-#elif defined(_LIBCPP_MSVCRT)
+template <class _A1, std::__enable_if_t<std::is_integral<_A1>::value && !std::is_signed<_A1>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool signbit(_A1) _NOEXCEPT {
+ return false;
+}
-template <typename _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
-fpclassify(_A1 __lcpp_x) _NOEXCEPT
-{
- return ::fpclassify(static_cast<typename std::__promote<_A1>::type>(__lcpp_x));
+// fpclassify
+
+template <class _A1, std::__enable_if_t<std::is_floating_point<_A1>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI int fpclassify(_A1 __x) _NOEXCEPT {
+ return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
}
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_integral<_A1>::value, int>::type
-fpclassify(_A1 __lcpp_x) _NOEXCEPT
-{ return __lcpp_x == 0 ? FP_ZERO : FP_NORMAL; }
+template <class _A1, std::__enable_if_t<std::is_integral<_A1>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI int fpclassify(_A1 __x) _NOEXCEPT {
+ return __x == 0 ? FP_ZERO : FP_NORMAL;
+}
-#endif // fpclassify
+// The MSVC runtime already provides these functions as templates
+#ifndef _LIBCPP_MSVCRT
// isfinite
-#ifdef isfinite
-
-template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
-bool
-__libcpp_isfinite(_A1 __lcpp_x) _NOEXCEPT
-{
-#if __has_builtin(__builtin_isfinite)
- return __builtin_isfinite(__lcpp_x);
-#else
- return isfinite(__lcpp_x);
-#endif
+template <class _A1,
+ std::__enable_if_t<std::is_arithmetic<_A1>::value && std::numeric_limits<_A1>::has_infinity, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool isfinite(_A1 __x) _NOEXCEPT {
+ return __builtin_isfinite((typename std::__promote<_A1>::type)__x);
}
-#undef isfinite
-
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<
- std::is_arithmetic<_A1>::value && std::numeric_limits<_A1>::has_infinity,
- bool>::type
-isfinite(_A1 __lcpp_x) _NOEXCEPT
-{
- return __libcpp_isfinite((typename std::__promote<_A1>::type)__lcpp_x);
+template <class _A1,
+ std::__enable_if_t<std::is_arithmetic<_A1>::value && !std::numeric_limits<_A1>::has_infinity, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool isfinite(_A1) _NOEXCEPT {
+ return true;
}
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<
- std::is_arithmetic<_A1>::value && !std::numeric_limits<_A1>::has_infinity,
- bool>::type
-isfinite(_A1) _NOEXCEPT
-{ return true; }
-
-#endif // isfinite
-
// isinf
-#ifdef isinf
-
-template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
-bool
-__libcpp_isinf(_A1 __lcpp_x) _NOEXCEPT
-{
-#if __has_builtin(__builtin_isinf)
- return __builtin_isinf(__lcpp_x);
-#else
- return isinf(__lcpp_x);
-#endif
+template <class _A1,
+ std::__enable_if_t<std::is_arithmetic<_A1>::value && std::numeric_limits<_A1>::has_infinity, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool isinf(_A1 __x) _NOEXCEPT {
+ return __builtin_isinf((typename std::__promote<_A1>::type)__x);
}
-#undef isinf
-
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<
- std::is_arithmetic<_A1>::value && std::numeric_limits<_A1>::has_infinity,
- bool>::type
-isinf(_A1 __lcpp_x) _NOEXCEPT
-{
- return __libcpp_isinf((typename std::__promote<_A1>::type)__lcpp_x);
+inline _LIBCPP_HIDE_FROM_ABI
+ typename std::enable_if< std::is_arithmetic<_A1>::value && !std::numeric_limits<_A1>::has_infinity, bool>::type
+ isinf(_A1) _NOEXCEPT {
+ return false;
}
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<
- std::is_arithmetic<_A1>::value && !std::numeric_limits<_A1>::has_infinity,
- bool>::type
-isinf(_A1) _NOEXCEPT
-{ return false; }
-
#if defined(_LIBCPP_PREFERRED_OVERLOAD) && !defined(__CUDACC__)
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-isinf(float __lcpp_x) _NOEXCEPT { return __libcpp_isinf(__lcpp_x); }
-
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-bool
-isinf(double __lcpp_x) _NOEXCEPT { return __libcpp_isinf(__lcpp_x); }
+inline _LIBCPP_HIDE_FROM_ABI bool isinf(float __x) _NOEXCEPT { return __builtin_isinf(__x); }
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-isinf(long double __lcpp_x) _NOEXCEPT { return __libcpp_isinf(__lcpp_x); }
-#endif
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD bool isinf(double __x) _NOEXCEPT { return __builtin_isinf(__x); }
-#endif // isinf
+inline _LIBCPP_HIDE_FROM_ABI bool isinf(long double __x) _NOEXCEPT { return __builtin_isinf(__x); }
+# endif
// isnan
-#ifdef isnan
-
-template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
-bool
-__libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT
-{
-#if __has_builtin(__builtin_isnan)
- return __builtin_isnan(__lcpp_x);
-#else
- return isnan(__lcpp_x);
-#endif
+template <class _A1, std::__enable_if_t<std::is_floating_point<_A1>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool isnan(_A1 __x) _NOEXCEPT {
+ return __builtin_isnan(__x);
}
-#undef isnan
-
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
-isnan(_A1 __lcpp_x) _NOEXCEPT
-{
- return __libcpp_isnan((typename std::__promote<_A1>::type)__lcpp_x);
+template <class _A1, std::__enable_if_t<std::is_integral<_A1>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool isnan(_A1) _NOEXCEPT {
+ return false;
}
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_integral<_A1>::value, bool>::type
-isnan(_A1) _NOEXCEPT
-{ return false; }
-
#if defined(_LIBCPP_PREFERRED_OVERLOAD) && !defined(__CUDACC__)
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-isnan(float __lcpp_x) _NOEXCEPT { return __libcpp_isnan(__lcpp_x); }
+inline _LIBCPP_HIDE_FROM_ABI bool isnan(float __x) _NOEXCEPT { return __builtin_isnan(__x); }
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-bool
-isnan(double __lcpp_x) _NOEXCEPT { return __libcpp_isnan(__lcpp_x); }
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD bool isnan(double __x) _NOEXCEPT { return __builtin_isnan(__x); }
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-isnan(long double __lcpp_x) _NOEXCEPT { return __libcpp_isnan(__lcpp_x); }
-#endif
-
-#endif // isnan
+inline _LIBCPP_HIDE_FROM_ABI bool isnan(long double __x) _NOEXCEPT { return __builtin_isnan(__x); }
+# endif
// isnormal
-#ifdef isnormal
-
-template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
-bool
-__libcpp_isnormal(_A1 __lcpp_x) _NOEXCEPT
-{
-#if __has_builtin(__builtin_isnormal)
- return __builtin_isnormal(__lcpp_x);
-#else
- return isnormal(__lcpp_x);
-#endif
+template <class _A1, std::__enable_if_t<std::is_floating_point<_A1>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool isnormal(_A1 __x) _NOEXCEPT {
+ return __builtin_isnormal(__x);
}
-#undef isnormal
-
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
-isnormal(_A1 __lcpp_x) _NOEXCEPT
-{
- return __libcpp_isnormal((typename std::__promote<_A1>::type)__lcpp_x);
+template <class _A1, std::__enable_if_t<std::is_integral<_A1>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool isnormal(_A1 __x) _NOEXCEPT {
+ return __x != 0;
}
-template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if<std::is_integral<_A1>::value, bool>::type
-isnormal(_A1 __lcpp_x) _NOEXCEPT
-{ return __lcpp_x != 0; }
-
-#endif // isnormal
-
// isgreater
-#ifdef isgreater
-
-template <class _A1, class _A2>
-_LIBCPP_INLINE_VISIBILITY
-bool
-__libcpp_isgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
-{
- return isgreater(__lcpp_x, __lcpp_y);
-}
-
-#undef isgreater
-
-template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if
-<
- std::is_arithmetic<_A1>::value &&
- std::is_arithmetic<_A2>::value,
- bool
->::type
-isgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
-{
- typedef typename std::__promote<_A1, _A2>::type type;
- return __libcpp_isgreater((type)__lcpp_x, (type)__lcpp_y);
+template <class _A1,
+ class _A2,
+ std::__enable_if_t<std::is_arithmetic<_A1>::value && std::is_arithmetic<_A2>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool isgreater(_A1 __x, _A2 __y) _NOEXCEPT {
+ typedef typename std::__promote<_A1, _A2>::type type;
+ return __builtin_isgreater((type)__x, (type)__y);
}
-#endif // isgreater
-
// isgreaterequal
-#ifdef isgreaterequal
-
-template <class _A1, class _A2>
-_LIBCPP_INLINE_VISIBILITY
-bool
-__libcpp_isgreaterequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
-{
- return isgreaterequal(__lcpp_x, __lcpp_y);
-}
-
-#undef isgreaterequal
-
-template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if
-<
- std::is_arithmetic<_A1>::value &&
- std::is_arithmetic<_A2>::value,
- bool
->::type
-isgreaterequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
-{
- typedef typename std::__promote<_A1, _A2>::type type;
- return __libcpp_isgreaterequal((type)__lcpp_x, (type)__lcpp_y);
+template <class _A1,
+ class _A2,
+ std::__enable_if_t<std::is_arithmetic<_A1>::value && std::is_arithmetic<_A2>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool isgreaterequal(_A1 __x, _A2 __y) _NOEXCEPT {
+ typedef typename std::__promote<_A1, _A2>::type type;
+ return __builtin_isgreaterequal((type)__x, (type)__y);
}
-#endif // isgreaterequal
-
// isless
-#ifdef isless
-
-template <class _A1, class _A2>
-_LIBCPP_INLINE_VISIBILITY
-bool
-__libcpp_isless(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
-{
- return isless(__lcpp_x, __lcpp_y);
+template <class _A1,
+ class _A2,
+ std::__enable_if_t<std::is_arithmetic<_A1>::value && std::is_arithmetic<_A2>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool isless(_A1 __x, _A2 __y) _NOEXCEPT {
+ typedef typename std::__promote<_A1, _A2>::type type;
+ return __builtin_isless((type)__x, (type)__y);
}
-#undef isless
-
-template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if
-<
- std::is_arithmetic<_A1>::value &&
- std::is_arithmetic<_A2>::value,
- bool
->::type
-isless(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
-{
- typedef typename std::__promote<_A1, _A2>::type type;
- return __libcpp_isless((type)__lcpp_x, (type)__lcpp_y);
-}
-
-#endif // isless
-
// islessequal
-#ifdef islessequal
-
-template <class _A1, class _A2>
-_LIBCPP_INLINE_VISIBILITY
-bool
-__libcpp_islessequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
-{
- return islessequal(__lcpp_x, __lcpp_y);
-}
-
-#undef islessequal
-
-template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if
-<
- std::is_arithmetic<_A1>::value &&
- std::is_arithmetic<_A2>::value,
- bool
->::type
-islessequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
-{
- typedef typename std::__promote<_A1, _A2>::type type;
- return __libcpp_islessequal((type)__lcpp_x, (type)__lcpp_y);
+template <class _A1,
+ class _A2,
+ std::__enable_if_t<std::is_arithmetic<_A1>::value && std::is_arithmetic<_A2>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool islessequal(_A1 __x, _A2 __y) _NOEXCEPT {
+ typedef typename std::__promote<_A1, _A2>::type type;
+ return __builtin_islessequal((type)__x, (type)__y);
}
-#endif // islessequal
-
// islessgreater
-#ifdef islessgreater
-
-template <class _A1, class _A2>
-_LIBCPP_INLINE_VISIBILITY
-bool
-__libcpp_islessgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
-{
- return islessgreater(__lcpp_x, __lcpp_y);
+template <class _A1,
+ class _A2,
+ std::__enable_if_t<std::is_arithmetic<_A1>::value && std::is_arithmetic<_A2>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool islessgreater(_A1 __x, _A2 __y) _NOEXCEPT {
+ typedef typename std::__promote<_A1, _A2>::type type;
+ return __builtin_islessgreater((type)__x, (type)__y);
}
-#undef islessgreater
-
-template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if
-<
- std::is_arithmetic<_A1>::value &&
- std::is_arithmetic<_A2>::value,
- bool
->::type
-islessgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
-{
- typedef typename std::__promote<_A1, _A2>::type type;
- return __libcpp_islessgreater((type)__lcpp_x, (type)__lcpp_y);
-}
-
-#endif // islessgreater
-
// isunordered
-#ifdef isunordered
-
-template <class _A1, class _A2>
-_LIBCPP_INLINE_VISIBILITY
-bool
-__libcpp_isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
-{
- return isunordered(__lcpp_x, __lcpp_y);
-}
-
-#undef isunordered
-
-template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
-typename std::enable_if
-<
- std::is_arithmetic<_A1>::value &&
- std::is_arithmetic<_A2>::value,
- bool
->::type
-isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
-{
- typedef typename std::__promote<_A1, _A2>::type type;
- return __libcpp_isunordered((type)__lcpp_x, (type)__lcpp_y);
+template <class _A1,
+ class _A2,
+ std::__enable_if_t<std::is_arithmetic<_A1>::value && std::is_arithmetic<_A2>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI bool isunordered(_A1 __x, _A2 __y) _NOEXCEPT {
+ typedef typename std::__promote<_A1, _A2>::type type;
+ return __builtin_isunordered((type)__x, (type)__y);
}
-#endif // isunordered
+#endif // _LIBCPP_MSVCRT
// abs
//
@@ -790,494 +535,462 @@ isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
// acos
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float acos(float __lcpp_x) _NOEXCEPT {return ::acosf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return ::acosl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float acos(float __x) _NOEXCEPT {return __builtin_acosf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double acos(long double __x) _NOEXCEPT {return __builtin_acosl(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-acos(_A1 __lcpp_x) _NOEXCEPT {return ::acos((double)__lcpp_x);}
+acos(_A1 __x) _NOEXCEPT {return __builtin_acos((double)__x);}
// asin
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float asin(float __lcpp_x) _NOEXCEPT {return ::asinf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double asin(long double __lcpp_x) _NOEXCEPT {return ::asinl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float asin(float __x) _NOEXCEPT {return __builtin_asinf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double asin(long double __x) _NOEXCEPT {return __builtin_asinl(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-asin(_A1 __lcpp_x) _NOEXCEPT {return ::asin((double)__lcpp_x);}
+asin(_A1 __x) _NOEXCEPT {return __builtin_asin((double)__x);}
// atan
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float atan(float __lcpp_x) _NOEXCEPT {return ::atanf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double atan(long double __lcpp_x) _NOEXCEPT {return ::atanl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float atan(float __x) _NOEXCEPT {return __builtin_atanf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double atan(long double __x) _NOEXCEPT {return __builtin_atanl(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-atan(_A1 __lcpp_x) _NOEXCEPT {return ::atan((double)__lcpp_x);}
+atan(_A1 __x) _NOEXCEPT {return __builtin_atan((double)__x);}
// atan2
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float atan2(float __lcpp_y, float __lcpp_x) _NOEXCEPT {return ::atan2f(__lcpp_y, __lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double atan2(long double __lcpp_y, long double __lcpp_x) _NOEXCEPT {return ::atan2l(__lcpp_y, __lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float atan2(float __y, float __x) _NOEXCEPT {return __builtin_atan2f(__y, __x);}
+inline _LIBCPP_HIDE_FROM_ABI long double atan2(long double __y, long double __x) _NOEXCEPT {return __builtin_atan2l(__y, __x);}
# endif
template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
std::__promote<_A1, _A2>
>::type
-atan2(_A1 __lcpp_y, _A2 __lcpp_x) _NOEXCEPT
+atan2(_A1 __y, _A2 __x) _NOEXCEPT
{
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::_IsSame<_A1, __result_type>::value &&
std::_IsSame<_A2, __result_type>::value)), "");
- return ::atan2((__result_type)__lcpp_y, (__result_type)__lcpp_x);
+ return ::atan2((__result_type)__y, (__result_type)__x);
}
// ceil
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float ceil(float __lcpp_x) _NOEXCEPT {return ::ceilf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double ceil(long double __lcpp_x) _NOEXCEPT {return ::ceill(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float ceil(float __x) _NOEXCEPT {return __builtin_ceilf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double ceil(long double __x) _NOEXCEPT {return __builtin_ceill(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-ceil(_A1 __lcpp_x) _NOEXCEPT {return ::ceil((double)__lcpp_x);}
+ceil(_A1 __x) _NOEXCEPT {return __builtin_ceil((double)__x);}
// cos
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float cos(float __lcpp_x) _NOEXCEPT {return ::cosf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double cos(long double __lcpp_x) _NOEXCEPT {return ::cosl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float cos(float __x) _NOEXCEPT {return __builtin_cosf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double cos(long double __x) _NOEXCEPT {return __builtin_cosl(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-cos(_A1 __lcpp_x) _NOEXCEPT {return ::cos((double)__lcpp_x);}
+cos(_A1 __x) _NOEXCEPT {return __builtin_cos((double)__x);}
// cosh
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float cosh(float __lcpp_x) _NOEXCEPT {return ::coshf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double cosh(long double __lcpp_x) _NOEXCEPT {return ::coshl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float cosh(float __x) _NOEXCEPT {return __builtin_coshf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double cosh(long double __x) _NOEXCEPT {return __builtin_coshl(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-cosh(_A1 __lcpp_x) _NOEXCEPT {return ::cosh((double)__lcpp_x);}
+cosh(_A1 __x) _NOEXCEPT {return __builtin_cosh((double)__x);}
// exp
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float exp(float __lcpp_x) _NOEXCEPT {return ::expf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double exp(long double __lcpp_x) _NOEXCEPT {return ::expl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float exp(float __x) _NOEXCEPT {return __builtin_expf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double exp(long double __x) _NOEXCEPT {return __builtin_expl(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-exp(_A1 __lcpp_x) _NOEXCEPT {return ::exp((double)__lcpp_x);}
+exp(_A1 __x) _NOEXCEPT {return __builtin_exp((double)__x);}
// fabs
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float fabs(float __lcpp_x) _NOEXCEPT {return ::fabsf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double fabs(long double __lcpp_x) _NOEXCEPT {return ::fabsl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float fabs(float __x) _NOEXCEPT {return __builtin_fabsf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double fabs(long double __x) _NOEXCEPT {return __builtin_fabsl(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-fabs(_A1 __lcpp_x) _NOEXCEPT {return ::fabs((double)__lcpp_x);}
+fabs(_A1 __x) _NOEXCEPT {return __builtin_fabs((double)__x);}
// floor
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float floor(float __lcpp_x) _NOEXCEPT {return ::floorf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double floor(long double __lcpp_x) _NOEXCEPT {return ::floorl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float floor(float __x) _NOEXCEPT {return __builtin_floorf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double floor(long double __x) _NOEXCEPT {return __builtin_floorl(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-floor(_A1 __lcpp_x) _NOEXCEPT {return ::floor((double)__lcpp_x);}
+floor(_A1 __x) _NOEXCEPT {return __builtin_floor((double)__x);}
// fmod
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float fmod(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::fmodf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double fmod(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fmodl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_HIDE_FROM_ABI float fmod(float __x, float __y) _NOEXCEPT {return __builtin_fmodf(__x, __y);}
+inline _LIBCPP_HIDE_FROM_ABI long double fmod(long double __x, long double __y) _NOEXCEPT {return __builtin_fmodl(__x, __y);}
# endif
template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
std::__promote<_A1, _A2>
>::type
-fmod(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
+fmod(_A1 __x, _A2 __y) _NOEXCEPT
{
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::_IsSame<_A1, __result_type>::value &&
std::_IsSame<_A2, __result_type>::value)), "");
- return ::fmod((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::fmod((__result_type)__x, (__result_type)__y);
}
// frexp
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float frexp(float __lcpp_x, int* __lcpp_e) _NOEXCEPT {return ::frexpf(__lcpp_x, __lcpp_e);}
-inline _LIBCPP_INLINE_VISIBILITY long double frexp(long double __lcpp_x, int* __lcpp_e) _NOEXCEPT {return ::frexpl(__lcpp_x, __lcpp_e);}
+inline _LIBCPP_HIDE_FROM_ABI float frexp(float __x, int* __e) _NOEXCEPT {return __builtin_frexpf(__x, __e);}
+inline _LIBCPP_HIDE_FROM_ABI long double frexp(long double __x, int* __e) _NOEXCEPT {return __builtin_frexpl(__x, __e);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-frexp(_A1 __lcpp_x, int* __lcpp_e) _NOEXCEPT {return ::frexp((double)__lcpp_x, __lcpp_e);}
+frexp(_A1 __x, int* __e) _NOEXCEPT {return __builtin_frexp((double)__x, __e);}
// ldexp
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float ldexp(float __lcpp_x, int __lcpp_e) _NOEXCEPT {return ::ldexpf(__lcpp_x, __lcpp_e);}
-inline _LIBCPP_INLINE_VISIBILITY long double ldexp(long double __lcpp_x, int __lcpp_e) _NOEXCEPT {return ::ldexpl(__lcpp_x, __lcpp_e);}
+inline _LIBCPP_HIDE_FROM_ABI float ldexp(float __x, int __e) _NOEXCEPT {return __builtin_ldexpf(__x, __e);}
+inline _LIBCPP_HIDE_FROM_ABI long double ldexp(long double __x, int __e) _NOEXCEPT {return __builtin_ldexpl(__x, __e);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-ldexp(_A1 __lcpp_x, int __lcpp_e) _NOEXCEPT {return ::ldexp((double)__lcpp_x, __lcpp_e);}
+ldexp(_A1 __x, int __e) _NOEXCEPT {return __builtin_ldexp((double)__x, __e);}
// log
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float log(float __lcpp_x) _NOEXCEPT {return ::logf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double log(long double __lcpp_x) _NOEXCEPT {return ::logl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float log(float __x) _NOEXCEPT {return __builtin_logf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double log(long double __x) _NOEXCEPT {return __builtin_logl(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-log(_A1 __lcpp_x) _NOEXCEPT {return ::log((double)__lcpp_x);}
+log(_A1 __x) _NOEXCEPT {return __builtin_log((double)__x);}
// log10
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float log10(float __lcpp_x) _NOEXCEPT {return ::log10f(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double log10(long double __lcpp_x) _NOEXCEPT {return ::log10l(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float log10(float __x) _NOEXCEPT {return __builtin_log10f(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double log10(long double __x) _NOEXCEPT {return __builtin_log10l(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-log10(_A1 __lcpp_x) _NOEXCEPT {return ::log10((double)__lcpp_x);}
+log10(_A1 __x) _NOEXCEPT {return __builtin_log10((double)__x);}
// modf
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float modf(float __lcpp_x, float* __lcpp_y) _NOEXCEPT {return ::modff(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double modf(long double __lcpp_x, long double* __lcpp_y) _NOEXCEPT {return ::modfl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_HIDE_FROM_ABI float modf(float __x, float* __y) _NOEXCEPT {return __builtin_modff(__x, __y);}
+inline _LIBCPP_HIDE_FROM_ABI long double modf(long double __x, long double* __y) _NOEXCEPT {return __builtin_modfl(__x, __y);}
# endif
// pow
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float pow(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::powf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double pow(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::powl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_HIDE_FROM_ABI float pow(float __x, float __y) _NOEXCEPT {return __builtin_powf(__x, __y);}
+inline _LIBCPP_HIDE_FROM_ABI long double pow(long double __x, long double __y) _NOEXCEPT {return __builtin_powl(__x, __y);}
# endif
template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
std::__promote<_A1, _A2>
>::type
-pow(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
+pow(_A1 __x, _A2 __y) _NOEXCEPT
{
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::_IsSame<_A1, __result_type>::value &&
std::_IsSame<_A2, __result_type>::value)), "");
- return ::pow((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::pow((__result_type)__x, (__result_type)__y);
}
// sin
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float sin(float __lcpp_x) _NOEXCEPT {return ::sinf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double sin(long double __lcpp_x) _NOEXCEPT {return ::sinl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float sin(float __x) _NOEXCEPT {return __builtin_sinf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double sin(long double __x) _NOEXCEPT {return __builtin_sinl(__x);}
#endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-sin(_A1 __lcpp_x) _NOEXCEPT {return ::sin((double)__lcpp_x);}
+sin(_A1 __x) _NOEXCEPT {return __builtin_sin((double)__x);}
// sinh
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float sinh(float __lcpp_x) _NOEXCEPT {return ::sinhf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double sinh(long double __lcpp_x) _NOEXCEPT {return ::sinhl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float sinh(float __x) _NOEXCEPT {return __builtin_sinhf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double sinh(long double __x) _NOEXCEPT {return __builtin_sinhl(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-sinh(_A1 __lcpp_x) _NOEXCEPT {return ::sinh((double)__lcpp_x);}
+sinh(_A1 __x) _NOEXCEPT {return __builtin_sinh((double)__x);}
// sqrt
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float sqrt(float __lcpp_x) _NOEXCEPT {return ::sqrtf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double __lcpp_x) _NOEXCEPT {return ::sqrtl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float sqrt(float __x) _NOEXCEPT {return __builtin_sqrtf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double sqrt(long double __x) _NOEXCEPT {return __builtin_sqrtl(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-sqrt(_A1 __lcpp_x) _NOEXCEPT {return ::sqrt((double)__lcpp_x);}
+sqrt(_A1 __x) _NOEXCEPT {return __builtin_sqrt((double)__x);}
// tan
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float tan(float __lcpp_x) _NOEXCEPT {return ::tanf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double tan(long double __lcpp_x) _NOEXCEPT {return ::tanl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float tan(float __x) _NOEXCEPT {return __builtin_tanf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double tan(long double __x) _NOEXCEPT {return __builtin_tanl(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-tan(_A1 __lcpp_x) _NOEXCEPT {return ::tan((double)__lcpp_x);}
+tan(_A1 __x) _NOEXCEPT {return __builtin_tan((double)__x);}
// tanh
# if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float tanh(float __lcpp_x) _NOEXCEPT {return ::tanhf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double tanh(long double __lcpp_x) _NOEXCEPT {return ::tanhl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float tanh(float __x) _NOEXCEPT {return __builtin_tanhf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double tanh(long double __x) _NOEXCEPT {return __builtin_tanhl(__x);}
# endif
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-tanh(_A1 __lcpp_x) _NOEXCEPT {return ::tanh((double)__lcpp_x);}
+tanh(_A1 __x) _NOEXCEPT {return __builtin_tanh((double)__x);}
// acosh
-inline _LIBCPP_INLINE_VISIBILITY float acosh(float __lcpp_x) _NOEXCEPT {return ::acoshf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double acosh(long double __lcpp_x) _NOEXCEPT {return ::acoshl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float acosh(float __x) _NOEXCEPT {return __builtin_acoshf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double acosh(long double __x) _NOEXCEPT {return __builtin_acoshl(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-acosh(_A1 __lcpp_x) _NOEXCEPT {return ::acosh((double)__lcpp_x);}
+acosh(_A1 __x) _NOEXCEPT {return __builtin_acosh((double)__x);}
// asinh
-inline _LIBCPP_INLINE_VISIBILITY float asinh(float __lcpp_x) _NOEXCEPT {return ::asinhf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double asinh(long double __lcpp_x) _NOEXCEPT {return ::asinhl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float asinh(float __x) _NOEXCEPT {return __builtin_asinhf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double asinh(long double __x) _NOEXCEPT {return __builtin_asinhl(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-asinh(_A1 __lcpp_x) _NOEXCEPT {return ::asinh((double)__lcpp_x);}
+asinh(_A1 __x) _NOEXCEPT {return __builtin_asinh((double)__x);}
// atanh
-inline _LIBCPP_INLINE_VISIBILITY float atanh(float __lcpp_x) _NOEXCEPT {return ::atanhf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double atanh(long double __lcpp_x) _NOEXCEPT {return ::atanhl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float atanh(float __x) _NOEXCEPT {return __builtin_atanhf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double atanh(long double __x) _NOEXCEPT {return __builtin_atanhl(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-atanh(_A1 __lcpp_x) _NOEXCEPT {return ::atanh((double)__lcpp_x);}
+atanh(_A1 __x) _NOEXCEPT {return __builtin_atanh((double)__x);}
// cbrt
-inline _LIBCPP_INLINE_VISIBILITY float cbrt(float __lcpp_x) _NOEXCEPT {return ::cbrtf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double cbrt(long double __lcpp_x) _NOEXCEPT {return ::cbrtl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float cbrt(float __x) _NOEXCEPT {return __builtin_cbrtf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double cbrt(long double __x) _NOEXCEPT {return __builtin_cbrtl(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-cbrt(_A1 __lcpp_x) _NOEXCEPT {return ::cbrt((double)__lcpp_x);}
+cbrt(_A1 __x) _NOEXCEPT {return __builtin_cbrt((double)__x);}
// copysign
-#if __has_builtin(__builtin_copysignf)
_LIBCPP_CONSTEXPR
-#endif
-inline _LIBCPP_INLINE_VISIBILITY float __libcpp_copysign(float __lcpp_x, float __lcpp_y) _NOEXCEPT {
-#if __has_builtin(__builtin_copysignf)
- return __builtin_copysignf(__lcpp_x, __lcpp_y);
-#else
- return ::copysignf(__lcpp_x, __lcpp_y);
-#endif
+inline _LIBCPP_HIDE_FROM_ABI float __libcpp_copysign(float __x, float __y) _NOEXCEPT {
+ return __builtin_copysignf(__x, __y);
}
-#if __has_builtin(__builtin_copysign)
_LIBCPP_CONSTEXPR
-#endif
-inline _LIBCPP_INLINE_VISIBILITY double __libcpp_copysign(double __lcpp_x, double __lcpp_y) _NOEXCEPT {
-#if __has_builtin(__builtin_copysign)
- return __builtin_copysign(__lcpp_x, __lcpp_y);
-#else
- return ::copysign(__lcpp_x, __lcpp_y);
-#endif
+inline _LIBCPP_HIDE_FROM_ABI double __libcpp_copysign(double __x, double __y) _NOEXCEPT {
+ return __builtin_copysign(__x, __y);
}
-#if __has_builtin(__builtin_copysignl)
_LIBCPP_CONSTEXPR
-#endif
-inline _LIBCPP_INLINE_VISIBILITY long double __libcpp_copysign(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {
-#if __has_builtin(__builtin_copysignl)
- return __builtin_copysignl(__lcpp_x, __lcpp_y);
-#else
- return ::copysignl(__lcpp_x, __lcpp_y);
-#endif
+inline _LIBCPP_HIDE_FROM_ABI long double __libcpp_copysign(long double __x, long double __y) _NOEXCEPT {
+ return __builtin_copysignl(__x, __y);
}
template <class _A1, class _A2>
-#if __has_builtin(__builtin_copysign)
_LIBCPP_CONSTEXPR
-#endif
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
std::__promote<_A1, _A2>
>::type
-__libcpp_copysign(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT {
+__libcpp_copysign(_A1 __x, _A2 __y) _NOEXCEPT {
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::_IsSame<_A1, __result_type>::value &&
std::_IsSame<_A2, __result_type>::value)), "");
-#if __has_builtin(__builtin_copysign)
- return __builtin_copysign((__result_type)__lcpp_x, (__result_type)__lcpp_y);
-#else
- return ::copysign((__result_type)__lcpp_x, (__result_type)__lcpp_y);
-#endif
+ return __builtin_copysign((__result_type)__x, (__result_type)__y);
}
-inline _LIBCPP_INLINE_VISIBILITY float copysign(float __lcpp_x, float __lcpp_y) _NOEXCEPT {
- return ::__libcpp_copysign(__lcpp_x, __lcpp_y);
+inline _LIBCPP_HIDE_FROM_ABI float copysign(float __x, float __y) _NOEXCEPT {
+ return ::__libcpp_copysign(__x, __y);
}
-inline _LIBCPP_INLINE_VISIBILITY long double copysign(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {
- return ::__libcpp_copysign(__lcpp_x, __lcpp_y);
+inline _LIBCPP_HIDE_FROM_ABI long double copysign(long double __x, long double __y) _NOEXCEPT {
+ return ::__libcpp_copysign(__x, __y);
}
template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
std::__promote<_A1, _A2>
>::type
- copysign(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT {
- return ::__libcpp_copysign(__lcpp_x, __lcpp_y);
+ copysign(_A1 __x, _A2 __y) _NOEXCEPT {
+ return ::__libcpp_copysign(__x, __y);
}
// erf
-inline _LIBCPP_INLINE_VISIBILITY float erf(float __lcpp_x) _NOEXCEPT {return ::erff(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double erf(long double __lcpp_x) _NOEXCEPT {return ::erfl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float erf(float __x) _NOEXCEPT {return __builtin_erff(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double erf(long double __x) _NOEXCEPT {return __builtin_erfl(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-erf(_A1 __lcpp_x) _NOEXCEPT {return ::erf((double)__lcpp_x);}
+erf(_A1 __x) _NOEXCEPT {return __builtin_erf((double)__x);}
// erfc
-inline _LIBCPP_INLINE_VISIBILITY float erfc(float __lcpp_x) _NOEXCEPT {return ::erfcf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double erfc(long double __lcpp_x) _NOEXCEPT {return ::erfcl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float erfc(float __x) _NOEXCEPT {return __builtin_erfcf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double erfc(long double __x) _NOEXCEPT {return __builtin_erfcl(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-erfc(_A1 __lcpp_x) _NOEXCEPT {return ::erfc((double)__lcpp_x);}
+erfc(_A1 __x) _NOEXCEPT {return __builtin_erfc((double)__x);}
// exp2
-inline _LIBCPP_INLINE_VISIBILITY float exp2(float __lcpp_x) _NOEXCEPT {return ::exp2f(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double exp2(long double __lcpp_x) _NOEXCEPT {return ::exp2l(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float exp2(float __x) _NOEXCEPT {return __builtin_exp2f(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double exp2(long double __x) _NOEXCEPT {return __builtin_exp2l(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-exp2(_A1 __lcpp_x) _NOEXCEPT {return ::exp2((double)__lcpp_x);}
+exp2(_A1 __x) _NOEXCEPT {return __builtin_exp2((double)__x);}
// expm1
-inline _LIBCPP_INLINE_VISIBILITY float expm1(float __lcpp_x) _NOEXCEPT {return ::expm1f(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double expm1(long double __lcpp_x) _NOEXCEPT {return ::expm1l(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float expm1(float __x) _NOEXCEPT {return __builtin_expm1f(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double expm1(long double __x) _NOEXCEPT {return __builtin_expm1l(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-expm1(_A1 __lcpp_x) _NOEXCEPT {return ::expm1((double)__lcpp_x);}
+expm1(_A1 __x) _NOEXCEPT {return __builtin_expm1((double)__x);}
// fdim
-inline _LIBCPP_INLINE_VISIBILITY float fdim(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::fdimf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double fdim(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fdiml(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_HIDE_FROM_ABI float fdim(float __x, float __y) _NOEXCEPT {return __builtin_fdimf(__x, __y);}
+inline _LIBCPP_HIDE_FROM_ABI long double fdim(long double __x, long double __y) _NOEXCEPT {return __builtin_fdiml(__x, __y);}
template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
std::__promote<_A1, _A2>
>::type
-fdim(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
+fdim(_A1 __x, _A2 __y) _NOEXCEPT
{
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::_IsSame<_A1, __result_type>::value &&
std::_IsSame<_A2, __result_type>::value)), "");
- return ::fdim((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::fdim((__result_type)__x, (__result_type)__y);
}
// fma
-inline _LIBCPP_INLINE_VISIBILITY float fma(float __lcpp_x, float __lcpp_y, float __lcpp_z) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI float fma(float __x, float __y, float __z) _NOEXCEPT
{
-#if __has_builtin(__builtin_fmaf)
- return __builtin_fmaf(__lcpp_x, __lcpp_y, __lcpp_z);
-#else
- return ::fmaf(__lcpp_x, __lcpp_y, __lcpp_z);
-#endif
+ return __builtin_fmaf(__x, __y, __z);
}
-inline _LIBCPP_INLINE_VISIBILITY long double fma(long double __lcpp_x, long double __lcpp_y, long double __lcpp_z) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI long double fma(long double __x, long double __y, long double __z) _NOEXCEPT
{
-#if __has_builtin(__builtin_fmal)
- return __builtin_fmal(__lcpp_x, __lcpp_y, __lcpp_z);
-#else
- return ::fmal(__lcpp_x, __lcpp_y, __lcpp_z);
-#endif
+ return __builtin_fmal(__x, __y, __z);
}
template <class _A1, class _A2, class _A3>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
@@ -1285,462 +998,374 @@ typename std::__enable_if_t
std::is_arithmetic<_A3>::value,
std::__promote<_A1, _A2, _A3>
>::type
-fma(_A1 __lcpp_x, _A2 __lcpp_y, _A3 __lcpp_z) _NOEXCEPT
+fma(_A1 __x, _A2 __y, _A3 __z) _NOEXCEPT
{
typedef typename std::__promote<_A1, _A2, _A3>::type __result_type;
static_assert((!(std::_IsSame<_A1, __result_type>::value &&
std::_IsSame<_A2, __result_type>::value &&
std::_IsSame<_A3, __result_type>::value)), "");
-#if __has_builtin(__builtin_fma)
- return __builtin_fma((__result_type)__lcpp_x, (__result_type)__lcpp_y, (__result_type)__lcpp_z);
-#else
- return ::fma((__result_type)__lcpp_x, (__result_type)__lcpp_y, (__result_type)__lcpp_z);
-#endif
+ return __builtin_fma((__result_type)__x, (__result_type)__y, (__result_type)__z);
}
// fmax
-inline _LIBCPP_INLINE_VISIBILITY float fmax(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::fmaxf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fmaxl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_HIDE_FROM_ABI float fmax(float __x, float __y) _NOEXCEPT {return __builtin_fmaxf(__x, __y);}
+inline _LIBCPP_HIDE_FROM_ABI long double fmax(long double __x, long double __y) _NOEXCEPT {return __builtin_fmaxl(__x, __y);}
template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
std::__promote<_A1, _A2>
>::type
-fmax(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
+fmax(_A1 __x, _A2 __y) _NOEXCEPT
{
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::_IsSame<_A1, __result_type>::value &&
std::_IsSame<_A2, __result_type>::value)), "");
- return ::fmax((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::fmax((__result_type)__x, (__result_type)__y);
}
// fmin
-inline _LIBCPP_INLINE_VISIBILITY float fmin(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::fminf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double fmin(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fminl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_HIDE_FROM_ABI float fmin(float __x, float __y) _NOEXCEPT {return __builtin_fminf(__x, __y);}
+inline _LIBCPP_HIDE_FROM_ABI long double fmin(long double __x, long double __y) _NOEXCEPT {return __builtin_fminl(__x, __y);}
template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
std::__promote<_A1, _A2>
>::type
-fmin(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
+fmin(_A1 __x, _A2 __y) _NOEXCEPT
{
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::_IsSame<_A1, __result_type>::value &&
std::_IsSame<_A2, __result_type>::value)), "");
- return ::fmin((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::fmin((__result_type)__x, (__result_type)__y);
}
// hypot
-inline _LIBCPP_INLINE_VISIBILITY float hypot(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::hypotf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double hypot(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::hypotl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_HIDE_FROM_ABI float hypot(float __x, float __y) _NOEXCEPT {return __builtin_hypotf(__x, __y);}
+inline _LIBCPP_HIDE_FROM_ABI long double hypot(long double __x, long double __y) _NOEXCEPT {return __builtin_hypotl(__x, __y);}
template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
std::__promote<_A1, _A2>
>::type
-hypot(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
+hypot(_A1 __x, _A2 __y) _NOEXCEPT
{
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::_IsSame<_A1, __result_type>::value &&
std::_IsSame<_A2, __result_type>::value)), "");
- return ::hypot((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::hypot((__result_type)__x, (__result_type)__y);
}
// ilogb
-inline _LIBCPP_INLINE_VISIBILITY int ilogb(float __lcpp_x) _NOEXCEPT {return ::ilogbf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY int ilogb(long double __lcpp_x) _NOEXCEPT {return ::ilogbl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI int ilogb(float __x) _NOEXCEPT {return __builtin_ilogbf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI int ilogb(long double __x) _NOEXCEPT {return __builtin_ilogbl(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, int>::type
-ilogb(_A1 __lcpp_x) _NOEXCEPT {return ::ilogb((double)__lcpp_x);}
+ilogb(_A1 __x) _NOEXCEPT {return __builtin_ilogb((double)__x);}
// lgamma
-inline _LIBCPP_INLINE_VISIBILITY float lgamma(float __lcpp_x) _NOEXCEPT {return ::lgammaf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double lgamma(long double __lcpp_x) _NOEXCEPT {return ::lgammal(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float lgamma(float __x) _NOEXCEPT {return __builtin_lgammaf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double lgamma(long double __x) _NOEXCEPT {return __builtin_lgammal(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-lgamma(_A1 __lcpp_x) _NOEXCEPT {return ::lgamma((double)__lcpp_x);}
+lgamma(_A1 __x) _NOEXCEPT {return __builtin_lgamma((double)__x);}
// llrint
-inline _LIBCPP_INLINE_VISIBILITY long long llrint(float __lcpp_x) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI long long llrint(float __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_llrintf)
- return __builtin_llrintf(__lcpp_x);
-#else
- return ::llrintf(__lcpp_x);
-#endif
+ return __builtin_llrintf(__x);
}
-inline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __lcpp_x) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI long long llrint(long double __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_llrintl)
- return __builtin_llrintl(__lcpp_x);
-#else
- return ::llrintl(__lcpp_x);
-#endif
+ return __builtin_llrintl(__x);
}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, long long>::type
-llrint(_A1 __lcpp_x) _NOEXCEPT
+llrint(_A1 __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_llrint)
- return __builtin_llrint((double)__lcpp_x);
-#else
- return ::llrint((double)__lcpp_x);
-#endif
+ return __builtin_llrint((double)__x);
}
// llround
-inline _LIBCPP_INLINE_VISIBILITY long long llround(float __lcpp_x) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI long long llround(float __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_llroundf)
- return __builtin_llroundf(__lcpp_x);
-#else
- return ::llroundf(__lcpp_x);
-#endif
+ return __builtin_llroundf(__x);
}
-inline _LIBCPP_INLINE_VISIBILITY long long llround(long double __lcpp_x) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI long long llround(long double __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_llroundl)
- return __builtin_llroundl(__lcpp_x);
-#else
- return ::llroundl(__lcpp_x);
-#endif
+ return __builtin_llroundl(__x);
}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, long long>::type
-llround(_A1 __lcpp_x) _NOEXCEPT
+llround(_A1 __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_llround)
- return __builtin_llround((double)__lcpp_x);
-#else
- return ::llround((double)__lcpp_x);
-#endif
+ return __builtin_llround((double)__x);
}
// log1p
-inline _LIBCPP_INLINE_VISIBILITY float log1p(float __lcpp_x) _NOEXCEPT {return ::log1pf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double log1p(long double __lcpp_x) _NOEXCEPT {return ::log1pl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float log1p(float __x) _NOEXCEPT {return __builtin_log1pf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double log1p(long double __x) _NOEXCEPT {return __builtin_log1pl(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-log1p(_A1 __lcpp_x) _NOEXCEPT {return ::log1p((double)__lcpp_x);}
+log1p(_A1 __x) _NOEXCEPT {return __builtin_log1p((double)__x);}
// log2
-inline _LIBCPP_INLINE_VISIBILITY float log2(float __lcpp_x) _NOEXCEPT {return ::log2f(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEPT {return ::log2l(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float log2(float __x) _NOEXCEPT {return __builtin_log2f(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double log2(long double __x) _NOEXCEPT {return __builtin_log2l(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-log2(_A1 __lcpp_x) _NOEXCEPT {return ::log2((double)__lcpp_x);}
+log2(_A1 __x) _NOEXCEPT {return __builtin_log2((double)__x);}
// logb
-inline _LIBCPP_INLINE_VISIBILITY float logb(float __lcpp_x) _NOEXCEPT {return ::logbf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double logb(long double __lcpp_x) _NOEXCEPT {return ::logbl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float logb(float __x) _NOEXCEPT {return __builtin_logbf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double logb(long double __x) _NOEXCEPT {return __builtin_logbl(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-logb(_A1 __lcpp_x) _NOEXCEPT {return ::logb((double)__lcpp_x);}
+logb(_A1 __x) _NOEXCEPT {return __builtin_logb((double)__x);}
// lrint
-inline _LIBCPP_INLINE_VISIBILITY long lrint(float __lcpp_x) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI long lrint(float __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_lrintf)
- return __builtin_lrintf(__lcpp_x);
-#else
- return ::lrintf(__lcpp_x);
-#endif
+ return __builtin_lrintf(__x);
}
-inline _LIBCPP_INLINE_VISIBILITY long lrint(long double __lcpp_x) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI long lrint(long double __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_lrintl)
- return __builtin_lrintl(__lcpp_x);
-#else
- return ::lrintl(__lcpp_x);
-#endif
+ return __builtin_lrintl(__x);
}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, long>::type
-lrint(_A1 __lcpp_x) _NOEXCEPT
+lrint(_A1 __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_lrint)
- return __builtin_lrint((double)__lcpp_x);
-#else
- return ::lrint((double)__lcpp_x);
-#endif
+ return __builtin_lrint((double)__x);
}
// lround
-inline _LIBCPP_INLINE_VISIBILITY long lround(float __lcpp_x) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI long lround(float __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_lroundf)
- return __builtin_lroundf(__lcpp_x);
-#else
- return ::lroundf(__lcpp_x);
-#endif
+ return __builtin_lroundf(__x);
}
-inline _LIBCPP_INLINE_VISIBILITY long lround(long double __lcpp_x) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI long lround(long double __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_lroundl)
- return __builtin_lroundl(__lcpp_x);
-#else
- return ::lroundl(__lcpp_x);
-#endif
+ return __builtin_lroundl(__x);
}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, long>::type
-lround(_A1 __lcpp_x) _NOEXCEPT
+lround(_A1 __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_lround)
- return __builtin_lround((double)__lcpp_x);
-#else
- return ::lround((double)__lcpp_x);
-#endif
+ return __builtin_lround((double)__x);
}
// nan
// nearbyint
-inline _LIBCPP_INLINE_VISIBILITY float nearbyint(float __lcpp_x) _NOEXCEPT {return ::nearbyintf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double nearbyint(long double __lcpp_x) _NOEXCEPT {return ::nearbyintl(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float nearbyint(float __x) _NOEXCEPT {return __builtin_nearbyintf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double nearbyint(long double __x) _NOEXCEPT {return __builtin_nearbyintl(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-nearbyint(_A1 __lcpp_x) _NOEXCEPT {return ::nearbyint((double)__lcpp_x);}
+nearbyint(_A1 __x) _NOEXCEPT {return __builtin_nearbyint((double)__x);}
// nextafter
-inline _LIBCPP_INLINE_VISIBILITY float nextafter(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::nextafterf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double nextafter(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nextafterl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_HIDE_FROM_ABI float nextafter(float __x, float __y) _NOEXCEPT {return __builtin_nextafterf(__x, __y);}
+inline _LIBCPP_HIDE_FROM_ABI long double nextafter(long double __x, long double __y) _NOEXCEPT {return __builtin_nextafterl(__x, __y);}
template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
std::__promote<_A1, _A2>
>::type
-nextafter(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
+nextafter(_A1 __x, _A2 __y) _NOEXCEPT
{
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::_IsSame<_A1, __result_type>::value &&
std::_IsSame<_A2, __result_type>::value)), "");
- return ::nextafter((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::nextafter((__result_type)__x, (__result_type)__y);
}
// nexttoward
-inline _LIBCPP_INLINE_VISIBILITY float nexttoward(float __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nexttowardf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double nexttoward(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nexttowardl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_HIDE_FROM_ABI float nexttoward(float __x, long double __y) _NOEXCEPT {return __builtin_nexttowardf(__x, __y);}
+inline _LIBCPP_HIDE_FROM_ABI long double nexttoward(long double __x, long double __y) _NOEXCEPT {return __builtin_nexttowardl(__x, __y);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-nexttoward(_A1 __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nexttoward((double)__lcpp_x, __lcpp_y);}
+nexttoward(_A1 __x, long double __y) _NOEXCEPT {return __builtin_nexttoward((double)__x, __y);}
// remainder
-inline _LIBCPP_INLINE_VISIBILITY float remainder(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::remainderf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double remainder(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::remainderl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_HIDE_FROM_ABI float remainder(float __x, float __y) _NOEXCEPT {return __builtin_remainderf(__x, __y);}
+inline _LIBCPP_HIDE_FROM_ABI long double remainder(long double __x, long double __y) _NOEXCEPT {return __builtin_remainderl(__x, __y);}
template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
std::__promote<_A1, _A2>
>::type
-remainder(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
+remainder(_A1 __x, _A2 __y) _NOEXCEPT
{
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::_IsSame<_A1, __result_type>::value &&
std::_IsSame<_A2, __result_type>::value)), "");
- return ::remainder((__result_type)__lcpp_x, (__result_type)__lcpp_y);
+ return ::remainder((__result_type)__x, (__result_type)__y);
}
// remquo
-inline _LIBCPP_INLINE_VISIBILITY float remquo(float __lcpp_x, float __lcpp_y, int* __lcpp_z) _NOEXCEPT {return ::remquof(__lcpp_x, __lcpp_y, __lcpp_z);}
-inline _LIBCPP_INLINE_VISIBILITY long double remquo(long double __lcpp_x, long double __lcpp_y, int* __lcpp_z) _NOEXCEPT {return ::remquol(__lcpp_x, __lcpp_y, __lcpp_z);}
+inline _LIBCPP_HIDE_FROM_ABI float remquo(float __x, float __y, int* __z) _NOEXCEPT {return __builtin_remquof(__x, __y, __z);}
+inline _LIBCPP_HIDE_FROM_ABI long double remquo(long double __x, long double __y, int* __z) _NOEXCEPT {return __builtin_remquol(__x, __y, __z);}
template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::__enable_if_t
<
std::is_arithmetic<_A1>::value &&
std::is_arithmetic<_A2>::value,
std::__promote<_A1, _A2>
>::type
-remquo(_A1 __lcpp_x, _A2 __lcpp_y, int* __lcpp_z) _NOEXCEPT
+remquo(_A1 __x, _A2 __y, int* __z) _NOEXCEPT
{
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::_IsSame<_A1, __result_type>::value &&
std::_IsSame<_A2, __result_type>::value)), "");
- return ::remquo((__result_type)__lcpp_x, (__result_type)__lcpp_y, __lcpp_z);
+ return ::remquo((__result_type)__x, (__result_type)__y, __z);
}
// rint
-inline _LIBCPP_INLINE_VISIBILITY float rint(float __lcpp_x) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI float rint(float __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_rintf)
- return __builtin_rintf(__lcpp_x);
-#else
- return ::rintf(__lcpp_x);
-#endif
+ return __builtin_rintf(__x);
}
-inline _LIBCPP_INLINE_VISIBILITY long double rint(long double __lcpp_x) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI long double rint(long double __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_rintl)
- return __builtin_rintl(__lcpp_x);
-#else
- return ::rintl(__lcpp_x);
-#endif
+ return __builtin_rintl(__x);
}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-rint(_A1 __lcpp_x) _NOEXCEPT
+rint(_A1 __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_rint)
- return __builtin_rint((double)__lcpp_x);
-#else
- return ::rint((double)__lcpp_x);
-#endif
+ return __builtin_rint((double)__x);
}
// round
-inline _LIBCPP_INLINE_VISIBILITY float round(float __lcpp_x) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI float round(float __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_roundf)
- return __builtin_roundf(__lcpp_x);
-#else
- return ::roundf(__lcpp_x);
-#endif
+ return __builtin_roundf(__x);
}
-inline _LIBCPP_INLINE_VISIBILITY long double round(long double __lcpp_x) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI long double round(long double __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_roundl)
- return __builtin_roundl(__lcpp_x);
-#else
- return ::roundl(__lcpp_x);
-#endif
+ return __builtin_roundl(__x);
}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-round(_A1 __lcpp_x) _NOEXCEPT
+round(_A1 __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_round)
- return __builtin_round((double)__lcpp_x);
-#else
- return ::round((double)__lcpp_x);
-#endif
+ return __builtin_round((double)__x);
}
// scalbln
-inline _LIBCPP_INLINE_VISIBILITY float scalbln(float __lcpp_x, long __lcpp_y) _NOEXCEPT {return ::scalblnf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double scalbln(long double __lcpp_x, long __lcpp_y) _NOEXCEPT {return ::scalblnl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_HIDE_FROM_ABI float scalbln(float __x, long __y) _NOEXCEPT {return __builtin_scalblnf(__x, __y);}
+inline _LIBCPP_HIDE_FROM_ABI long double scalbln(long double __x, long __y) _NOEXCEPT {return __builtin_scalblnl(__x, __y);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-scalbln(_A1 __lcpp_x, long __lcpp_y) _NOEXCEPT {return ::scalbln((double)__lcpp_x, __lcpp_y);}
+scalbln(_A1 __x, long __y) _NOEXCEPT {return __builtin_scalbln((double)__x, __y);}
// scalbn
-inline _LIBCPP_INLINE_VISIBILITY float scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbnf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbnl(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_HIDE_FROM_ABI float scalbn(float __x, int __y) _NOEXCEPT {return __builtin_scalbnf(__x, __y);}
+inline _LIBCPP_HIDE_FROM_ABI long double scalbn(long double __x, int __y) _NOEXCEPT {return __builtin_scalbnl(__x, __y);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-scalbn(_A1 __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbn((double)__lcpp_x, __lcpp_y);}
+scalbn(_A1 __x, int __y) _NOEXCEPT {return __builtin_scalbn((double)__x, __y);}
// tgamma
-inline _LIBCPP_INLINE_VISIBILITY float tgamma(float __lcpp_x) _NOEXCEPT {return ::tgammaf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double tgamma(long double __lcpp_x) _NOEXCEPT {return ::tgammal(__lcpp_x);}
+inline _LIBCPP_HIDE_FROM_ABI float tgamma(float __x) _NOEXCEPT {return __builtin_tgammaf(__x);}
+inline _LIBCPP_HIDE_FROM_ABI long double tgamma(long double __x) _NOEXCEPT {return __builtin_tgammal(__x);}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-tgamma(_A1 __lcpp_x) _NOEXCEPT {return ::tgamma((double)__lcpp_x);}
+tgamma(_A1 __x) _NOEXCEPT {return __builtin_tgamma((double)__x);}
// trunc
-inline _LIBCPP_INLINE_VISIBILITY float trunc(float __lcpp_x) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI float trunc(float __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_truncf)
- return __builtin_truncf(__lcpp_x);
-#else
- return ::truncf(__lcpp_x);
-#endif
+ return __builtin_truncf(__x);
}
-inline _LIBCPP_INLINE_VISIBILITY long double trunc(long double __lcpp_x) _NOEXCEPT
+inline _LIBCPP_HIDE_FROM_ABI long double trunc(long double __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_truncl)
- return __builtin_truncl(__lcpp_x);
-#else
- return ::truncl(__lcpp_x);
-#endif
+ return __builtin_truncl(__x);
}
template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
typename std::enable_if<std::is_integral<_A1>::value, double>::type
-trunc(_A1 __lcpp_x) _NOEXCEPT
+trunc(_A1 __x) _NOEXCEPT
{
-#if __has_builtin(__builtin_trunc)
- return __builtin_trunc((double)__lcpp_x);
-#else
- return ::trunc((double)__lcpp_x);
-#endif
+ return __builtin_trunc((double)__x);
}
} // extern "C++"
diff --git a/contrib/libs/cxxsupp/libcxx/include/memory b/contrib/libs/cxxsupp/libcxx/include/memory
index 1a042461f2..11a8823fce 100644
--- a/contrib/libs/cxxsupp/libcxx/include/memory
+++ b/contrib/libs/cxxsupp/libcxx/include/memory
@@ -406,16 +406,17 @@ template <class T>
struct default_delete
{
constexpr default_delete() noexcept = default;
- template <class U> default_delete(const default_delete<U>&) noexcept;
+ template <class U> constexpr default_delete(const default_delete<U>&) noexcept; // constexpr since C++23
- void operator()(T*) const noexcept;
+ constexpr void operator()(T*) const noexcept; // constexpr since C++23
};
template <class T>
struct default_delete<T[]>
{
constexpr default_delete() noexcept = default;
- void operator()(T*) const noexcept;
+ template <class U> constexpr default_delete(const default_delete <U[]>&) noexcept; // constexpr since C++23
+ constexpr void operator()(T*) const noexcept; // constexpr since C++23
template <class U> void operator()(U*) const = delete;
};
@@ -429,36 +430,37 @@ public:
// constructors
constexpr unique_ptr() noexcept;
- explicit unique_ptr(pointer p) noexcept;
- unique_ptr(pointer p, see below d1) noexcept;
- unique_ptr(pointer p, see below d2) noexcept;
- unique_ptr(unique_ptr&& u) noexcept;
- unique_ptr(nullptr_t) noexcept : unique_ptr() { }
+ constexpr explicit unique_ptr(pointer p) noexcept; // constexpr since C++23
+ constexpr unique_ptr(pointer p, see below d1) noexcept; // constexpr since C++23
+ constexpr unique_ptr(pointer p, see below d2) noexcept; // constexpr since C++23
+ constexpr unique_ptr(unique_ptr&& u) noexcept; // constexpr since C++23
+ constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { }
template <class U, class E>
- unique_ptr(unique_ptr<U, E>&& u) noexcept;
+ constexpr unique_ptr(unique_ptr<U, E>&& u) noexcept; // constexpr since C++23
template <class U>
- unique_ptr(auto_ptr<U>&& u) noexcept; // removed in C++17
+ unique_ptr(auto_ptr<U>&& u) noexcept; // removed in C++17
// destructor
- ~unique_ptr();
+ constexpr ~unique_ptr(); // constexpr since C++23
// assignment
- unique_ptr& operator=(unique_ptr&& u) noexcept;
- template <class U, class E> unique_ptr& operator=(unique_ptr<U, E>&& u) noexcept;
- unique_ptr& operator=(nullptr_t) noexcept;
+ constexpr unique_ptr& operator=(unique_ptr&& u) noexcept; // constexpr since C++23
+ template <class U, class E>
+ constexpr unique_ptr& operator=(unique_ptr<U, E>&& u) noexcept; // constexpr since C++23
+ constexpr unique_ptr& operator=(nullptr_t) noexcept; // constexpr since C++23
// observers
- typename add_lvalue_reference<T>::type operator*() const;
- pointer operator->() const noexcept;
- pointer get() const noexcept;
- deleter_type& get_deleter() noexcept;
- const deleter_type& get_deleter() const noexcept;
- explicit operator bool() const noexcept;
+ typename constexpr add_lvalue_reference<T>::type operator*() const; // constexpr since C++23
+ constexpr pointer operator->() const noexcept; // constexpr since C++23
+ constexpr pointer get() const noexcept; // constexpr since C++23
+ constexpr deleter_type& get_deleter() noexcept; // constexpr since C++23
+ constexpr const deleter_type& get_deleter() const noexcept; // constexpr since C++23
+ constexpr explicit operator bool() const noexcept; // constexpr since C++23
// modifiers
- pointer release() noexcept;
- void reset(pointer p = pointer()) noexcept;
- void swap(unique_ptr& u) noexcept;
+ constexpr pointer release() noexcept; // constexpr since C++23
+ constexpr void reset(pointer p = pointer()) noexcept; // constexpr since C++23
+ constexpr void swap(unique_ptr& u) noexcept; // constexpr since C++23
};
template <class T, class D>
@@ -471,41 +473,45 @@ public:
// constructors
constexpr unique_ptr() noexcept;
- explicit unique_ptr(pointer p) noexcept;
- unique_ptr(pointer p, see below d) noexcept;
- unique_ptr(pointer p, see below d) noexcept;
- unique_ptr(unique_ptr&& u) noexcept;
- unique_ptr(nullptr_t) noexcept : unique_ptr() { }
+ constexpr explicit unique_ptr(pointer p) noexcept; // constexpr since C++23
+ constexpr unique_ptr(pointer p, see below d) noexcept; // constexpr since C++23
+ constexpr unique_ptr(pointer p, see below d) noexcept; // constexpr since C++23
+ constexpr unique_ptr(unique_ptr&& u) noexcept; // constexpr since C++23
+ template <class U, class E>
+ constexpr unique_ptr(unique_ptr <U, E>&& u) noexcept; // constexpr since C++23
+ constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { }
// destructor
- ~unique_ptr();
+ constexpr ~unique_ptr(); // constexpr since C++23
// assignment
- unique_ptr& operator=(unique_ptr&& u) noexcept;
- unique_ptr& operator=(nullptr_t) noexcept;
+ constexpr unique_ptr& operator=(unique_ptr&& u) noexcept; // constexpr since C++23
+ template <class U, class E>
+ constexpr unique_ptr& operator=(unique_ptr <U, E>&& u) noexcept; // constexpr since C++23
+ constexpr unique_ptr& operator=(nullptr_t) noexcept; // constexpr since C++23
// observers
- T& operator[](size_t i) const;
- pointer get() const noexcept;
- deleter_type& get_deleter() noexcept;
- const deleter_type& get_deleter() const noexcept;
- explicit operator bool() const noexcept;
+ constexpr T& operator[](size_t i) const; // constexpr since C++23
+ constexpr pointer get() const noexcept; // constexpr since C++23
+ constexpr deleter_type& get_deleter() noexcept; // constexpr since C++23
+ constexpr const deleter_type& get_deleter() const noexcept; // constexpr since C++23
+ constexpr explicit operator bool() const noexcept; // constexpr since C++23
// modifiers
- pointer release() noexcept;
- void reset(pointer p = pointer()) noexcept;
- void reset(nullptr_t) noexcept;
+ constexpr pointer release() noexcept; // constexpr since C++23
+ constexpr void reset(pointer p = pointer()) noexcept; // constexpr since C++23
+ constexpr void reset(nullptr_t) noexcept; // constexpr since C++23
template <class U> void reset(U) = delete;
- void swap(unique_ptr& u) noexcept;
+ constexpr void swap(unique_ptr& u) noexcept; // constexpr since C++23
};
template <class T, class D>
- void swap(unique_ptr<T, D>& x, unique_ptr<T, D>& y) noexcept;
+ constexpr void swap(unique_ptr<T, D>& x, unique_ptr<T, D>& y) noexcept; // constexpr since C++23
template <class T1, class D1, class T2, class D2>
- bool operator==(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
+ constexpr bool operator==(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y); // constexpr since C++23
template <class T1, class D1, class T2, class D2>
- bool operator!=(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
+ bool operator!=(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y); // removed in C++20
template <class T1, class D1, class T2, class D2>
bool operator<(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
template <class T1, class D1, class T2, class D2>
@@ -514,32 +520,42 @@ template <class T1, class D1, class T2, class D2>
bool operator>(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
template <class T1, class D1, class T2, class D2>
bool operator>=(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
+template<class T1, class D1, class T2, class D2>
+ requires three_way_comparable_with<typename unique_ptr<T1, D1>::pointer,
+ typename unique_ptr<T2, D2>::pointer>
+ compare_three_way_result_t<typename unique_ptr<T1, D1>::pointer,
+ typename unique_ptr<T2, D2>::pointer>
+ operator<=>(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y); // C++20
template <class T, class D>
- bool operator==(const unique_ptr<T, D>& x, nullptr_t) noexcept;
+ constexpr bool operator==(const unique_ptr<T, D>& x, nullptr_t) noexcept; // constexpr since C++23
template <class T, class D>
- bool operator==(nullptr_t, const unique_ptr<T, D>& y) noexcept;
+ bool operator==(nullptr_t, const unique_ptr<T, D>& y) noexcept; // removed in C++20
template <class T, class D>
- bool operator!=(const unique_ptr<T, D>& x, nullptr_t) noexcept;
+ bool operator!=(const unique_ptr<T, D>& x, nullptr_t) noexcept; // removed in C++20
template <class T, class D>
- bool operator!=(nullptr_t, const unique_ptr<T, D>& y) noexcept;
+ bool operator!=(nullptr_t, const unique_ptr<T, D>& y) noexcept; // removed in C++20
template <class T, class D>
- bool operator<(const unique_ptr<T, D>& x, nullptr_t);
+ constexpr bool operator<(const unique_ptr<T, D>& x, nullptr_t); // constexpr since C++23
template <class T, class D>
- bool operator<(nullptr_t, const unique_ptr<T, D>& y);
+ constexpr bool operator<(nullptr_t, const unique_ptr<T, D>& y); // constexpr since C++23
template <class T, class D>
- bool operator<=(const unique_ptr<T, D>& x, nullptr_t);
+ constexpr bool operator<=(const unique_ptr<T, D>& x, nullptr_t); // constexpr since C++23
template <class T, class D>
- bool operator<=(nullptr_t, const unique_ptr<T, D>& y);
+ constexpr bool operator<=(nullptr_t, const unique_ptr<T, D>& y); // constexpr since C++23
template <class T, class D>
- bool operator>(const unique_ptr<T, D>& x, nullptr_t);
+ constexpr bool operator>(const unique_ptr<T, D>& x, nullptr_t); // constexpr since C++23
template <class T, class D>
- bool operator>(nullptr_t, const unique_ptr<T, D>& y);
+ constexpr bool operator>(nullptr_t, const unique_ptr<T, D>& y); // constexpr since C++23
template <class T, class D>
- bool operator>=(const unique_ptr<T, D>& x, nullptr_t);
+ constexpr bool operator>=(const unique_ptr<T, D>& x, nullptr_t); // constexpr since C++23
template <class T, class D>
- bool operator>=(nullptr_t, const unique_ptr<T, D>& y);
+ constexpr bool operator>=(nullptr_t, const unique_ptr<T, D>& y); // constexpr since C++23
+template<class T, class D>
+ requires three_way_comparable<typename unique_ptr<T, D>::pointer>
+ compare_three_way_result_t<typename unique_ptr<T, D>::pointer>
+ constexpr operator<=>(const unique_ptr<T, D>& x, nullptr_t); // C++20, constexpr since C++23
class bad_weak_ptr
: public std::exception
@@ -547,8 +563,10 @@ class bad_weak_ptr
bad_weak_ptr() noexcept;
};
-template<class T, class... Args> unique_ptr<T> make_unique(Args&&... args); // C++14
-template<class T> unique_ptr<T> make_unique(size_t n); // C++14
+template<class T, class... Args>
+constexpr unique_ptr<T> make_unique(Args&&... args); // C++14, constexpr since C++23
+template<class T>
+constexpr unique_ptr<T> make_unique(size_t n); // C++14, constexpr since C++23
template<class T, class... Args> unspecified make_unique(Args&&...) = delete; // C++14, T == U[N]
template<class E, class T, class Y, class D>
@@ -617,40 +635,44 @@ shared_ptr(unique_ptr<T, D>) -> shared_ptr<T>;
template<class T, class U>
bool operator==(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
template<class T, class U>
- bool operator!=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
+ bool operator!=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept; // removed in C++20
+template<class T, class U>
+ bool operator<(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept; // removed in C++20
template<class T, class U>
- bool operator<(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
+ bool operator>(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept; // removed in C++20
template<class T, class U>
- bool operator>(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
+ bool operator<=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept; // removed in C++20
template<class T, class U>
- bool operator<=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
+ bool operator>=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept; // removed in C++20
template<class T, class U>
- bool operator>=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
+ strong_ordering operator<=>(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept; // C++20
template <class T>
bool operator==(const shared_ptr<T>& x, nullptr_t) noexcept;
template <class T>
- bool operator==(nullptr_t, const shared_ptr<T>& y) noexcept;
+ bool operator==(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
template <class T>
- bool operator!=(const shared_ptr<T>& x, nullptr_t) noexcept;
+ bool operator!=(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
template <class T>
- bool operator!=(nullptr_t, const shared_ptr<T>& y) noexcept;
+ bool operator!=(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
template <class T>
- bool operator<(const shared_ptr<T>& x, nullptr_t) noexcept;
+ bool operator<(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
template <class T>
-bool operator<(nullptr_t, const shared_ptr<T>& y) noexcept;
+ bool operator<(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
template <class T>
- bool operator<=(const shared_ptr<T>& x, nullptr_t) noexcept;
+ bool operator<=(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
template <class T>
- bool operator<=(nullptr_t, const shared_ptr<T>& y) noexcept;
+ bool operator<=(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
template <class T>
- bool operator>(const shared_ptr<T>& x, nullptr_t) noexcept;
+ bool operator>(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
template <class T>
- bool operator>(nullptr_t, const shared_ptr<T>& y) noexcept;
+ bool operator>(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
template <class T>
- bool operator>=(const shared_ptr<T>& x, nullptr_t) noexcept;
+ bool operator>=(const shared_ptr<T>& x, nullptr_t) noexcept; // removed in C++20
template <class T>
- bool operator>=(nullptr_t, const shared_ptr<T>& y) noexcept;
+ bool operator>=(nullptr_t, const shared_ptr<T>& y) noexcept; // removed in C++20
+template<class T>
+ strong_ordering operator<=>(shared_ptr<T> const& x, nullptr_t) noexcept; // C++20
// shared_ptr specialized algorithms:
template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b) noexcept;
@@ -838,11 +860,10 @@ template<size_t N, class T>
*/
-#include <__algorithm/copy.h>
-#include <__algorithm/move.h>
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
#include <__memory/addressof.h>
+#include <__memory/align.h>
#include <__memory/allocate_at_least.h>
#include <__memory/allocation_guard.h>
#include <__memory/allocator.h>
@@ -862,172 +883,35 @@ template<size_t N, class T>
#include <__memory/uninitialized_algorithms.h>
#include <__memory/unique_ptr.h>
#include <__memory/uses_allocator.h>
-#include <cstddef>
-#include <cstdint>
-#include <cstring>
-#include <iosfwd>
-#include <new>
-#include <stdexcept>
-#include <tuple>
-#include <type_traits>
-#include <typeinfo>
+#include <__memory/uses_allocator_construction.h>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <iterator>
-# include <utility>
-#endif
-
// standard-mandated includes
+
+// [memory.syn]
#include <compare>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-struct __destruct_n
-{
-private:
- size_t __size_;
-
- template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY void __process(_Tp* __p, false_type) _NOEXCEPT
- {for (size_t __i = 0; __i < __size_; ++__i, ++__p) __p->~_Tp();}
-
- template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY void __process(_Tp*, true_type) _NOEXCEPT
- {}
-
- _LIBCPP_INLINE_VISIBILITY void __incr(false_type) _NOEXCEPT
- {++__size_;}
- _LIBCPP_INLINE_VISIBILITY void __incr(true_type) _NOEXCEPT
- {}
-
- _LIBCPP_INLINE_VISIBILITY void __set(size_t __s, false_type) _NOEXCEPT
- {__size_ = __s;}
- _LIBCPP_INLINE_VISIBILITY void __set(size_t, true_type) _NOEXCEPT
- {}
-public:
- _LIBCPP_INLINE_VISIBILITY explicit __destruct_n(size_t __s) _NOEXCEPT
- : __size_(__s) {}
-
- template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY void __incr() _NOEXCEPT
- {__incr(integral_constant<bool, is_trivially_destructible<_Tp>::value>());}
-
- template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY void __set(size_t __s, _Tp*) _NOEXCEPT
- {__set(__s, integral_constant<bool, is_trivially_destructible<_Tp>::value>());}
-
- template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __p) _NOEXCEPT
- {__process(__p, integral_constant<bool, is_trivially_destructible<_Tp>::value>());}
-};
-
-_LIBCPP_FUNC_VIS void* align(size_t __align, size_t __sz, void*& __ptr, size_t& __space);
-
-template <typename _Alloc, typename _Traits=allocator_traits<_Alloc> >
-struct __noexcept_move_assign_container : public integral_constant<bool,
- _Traits::propagate_on_container_move_assignment::value
-#if _LIBCPP_STD_VER > 14
- || _Traits::is_always_equal::value
-#else
- && is_nothrow_move_assignable<_Alloc>::value
-#endif
- > {};
-
-
-template <class _Tp, class _Alloc>
-struct __temp_value {
- typedef allocator_traits<_Alloc> _Traits;
-
-#ifdef _LIBCPP_CXX03_LANG
- typename aligned_storage<sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)>::type __v;
-#else
- union { _Tp __v; };
-#endif
- _Alloc &__a;
-
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp *__addr() {
-#ifdef _LIBCPP_CXX03_LANG
- return reinterpret_cast<_Tp*>(std::addressof(__v));
-#else
- return std::addressof(__v);
-#endif
- }
-
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp & get() { return *__addr(); }
-
- template<class... _Args>
- _LIBCPP_NO_CFI
- _LIBCPP_CONSTEXPR_AFTER_CXX17 __temp_value(_Alloc &__alloc, _Args&& ... __args) : __a(__alloc) {
- _Traits::construct(__a, __addr(), std::forward<_Args>(__args)...);
- }
-
- _LIBCPP_CONSTEXPR_AFTER_CXX17 ~__temp_value() { _Traits::destroy(__a, __addr()); }
-};
-
-template<typename _Alloc, typename = void, typename = void>
-struct __is_allocator : false_type {};
-
-template<typename _Alloc>
-struct __is_allocator<_Alloc,
- typename __void_t<typename _Alloc::value_type>::type,
- typename __void_t<decltype(declval<_Alloc&>().allocate(size_t(0)))>::type
- >
- : true_type {};
-
-// __builtin_new_allocator -- A non-templated helper for allocating and
-// deallocating memory using __builtin_operator_new and
-// __builtin_operator_delete. It should be used in preference to
-// `std::allocator<T>` to avoid additional instantiations.
-struct __builtin_new_allocator {
- struct __builtin_new_deleter {
- typedef void* pointer_type;
-
- _LIBCPP_CONSTEXPR explicit __builtin_new_deleter(size_t __size, size_t __align)
- : __size_(__size), __align_(__align) {}
-
- void operator()(void* __p) const _NOEXCEPT {
- _VSTD::__libcpp_deallocate(__p, __size_, __align_);
- }
-
- private:
- size_t __size_;
- size_t __align_;
- };
-
- typedef unique_ptr<void, __builtin_new_deleter> __holder_t;
-
- static __holder_t __allocate_bytes(size_t __s, size_t __align) {
- return __holder_t(_VSTD::__libcpp_allocate(__s, __align),
- __builtin_new_deleter(__s, __align));
- }
-
- static void __deallocate_bytes(void* __p, size_t __s,
- size_t __align) _NOEXCEPT {
- _VSTD::__libcpp_deallocate(__p, __s, __align);
- }
-
- template <class _Tp>
- _LIBCPP_NODEBUG _LIBCPP_ALWAYS_INLINE
- static __holder_t __allocate_type(size_t __n) {
- return __allocate_bytes(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
- }
-
- template <class _Tp>
- _LIBCPP_NODEBUG _LIBCPP_ALWAYS_INLINE
- static void __deallocate_type(void* __p, size_t __n) _NOEXCEPT {
- __deallocate_bytes(__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
- }
-};
-
-_LIBCPP_END_NAMESPACE_STD
-
#if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
#error # include <__pstl_memory>
#endif
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <cstddef>
+# include <cstdint>
+# include <cstring>
+# include <iosfwd>
+# include <iterator>
+# include <new>
+# include <stdexcept>
+# include <tuple>
+# include <type_traits>
+# include <typeinfo>
+# include <utility>
+#endif
+
#endif // _LIBCPP_MEMORY
diff --git a/contrib/libs/cxxsupp/libcxx/include/memory_resource b/contrib/libs/cxxsupp/libcxx/include/memory_resource
new file mode 100644
index 0000000000..4b39343369
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/memory_resource
@@ -0,0 +1,65 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP_MEMORY_RESOURCE
+#define _LIBCPP_MEMORY_RESOURCE
+
+/**
+ memory_resource synopsis
+
+// C++17
+
+namespace std::pmr {
+
+ class memory_resource;
+
+ bool operator==(const memory_resource& a,
+ const memory_resource& b) noexcept;
+ bool operator!=(const memory_resource& a,
+ const memory_resource& b) noexcept;
+
+ template <class Tp> class polymorphic_allocator;
+
+ template <class T1, class T2>
+ bool operator==(const polymorphic_allocator<T1>& a,
+ const polymorphic_allocator<T2>& b) noexcept;
+ template <class T1, class T2>
+ bool operator!=(const polymorphic_allocator<T1>& a,
+ const polymorphic_allocator<T2>& b) noexcept;
+
+ // Global memory resources
+ memory_resource* set_default_resource(memory_resource* r) noexcept;
+ memory_resource* get_default_resource() noexcept;
+ memory_resource* new_delete_resource() noexcept;
+ memory_resource* null_memory_resource() noexcept;
+
+ // Pool resource classes
+ struct pool_options;
+ class synchronized_pool_resource;
+ class unsynchronized_pool_resource;
+ class monotonic_buffer_resource;
+
+} // namespace std::pmr
+
+ */
+
+#include <__config>
+#include <__memory_resource/memory_resource.h>
+#include <__memory_resource/monotonic_buffer_resource.h>
+#include <__memory_resource/polymorphic_allocator.h>
+#include <__memory_resource/pool_options.h>
+#include <__memory_resource/synchronized_pool_resource.h>
+#include <__memory_resource/unsynchronized_pool_resource.h>
+#include <version>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#endif /* _LIBCPP_MEMORY_RESOURCE */
diff --git a/contrib/libs/cxxsupp/libcxx/include/mutex b/contrib/libs/cxxsupp/libcxx/include/mutex
index d207c2664b..92695ee8a0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/mutex
+++ b/contrib/libs/cxxsupp/libcxx/include/mutex
@@ -188,20 +188,16 @@ template<class Callable, class ...Args>
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+#include <__memory/shared_ptr.h>
#include <__mutex_base>
#include <__threading_support>
#include <__utility/forward.h>
#include <cstdint>
-#include <memory>
#ifndef _LIBCPP_CXX03_LANG
# include <tuple>
#endif
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <functional>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_CXX03_LANG)
#include <atomic>
#endif
@@ -333,7 +329,7 @@ recursive_timed_mutex::try_lock_until(const chrono::time_point<_Clock, _Duration
}
template <class _L0, class _L1>
-int
+_LIBCPP_HIDE_FROM_ABI int
try_lock(_L0& __l0, _L1& __l1)
{
unique_lock<_L0> __u0(__l0, try_to_lock);
@@ -353,7 +349,7 @@ try_lock(_L0& __l0, _L1& __l1)
#ifndef _LIBCPP_CXX03_LANG
template <class _L0, class _L1, class _L2, class... _L3>
-int
+_LIBCPP_HIDE_FROM_ABI int
try_lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3)
{
int __r = 0;
@@ -372,7 +368,7 @@ try_lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3)
#endif // _LIBCPP_CXX03_LANG
template <class _L0, class _L1>
-void
+_LIBCPP_HIDE_FROM_ABI void
lock(_L0& __l0, _L1& __l1)
{
while (true)
@@ -550,6 +546,7 @@ private:
_MutexTuple __t_;
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(scoped_lock);
#endif // _LIBCPP_STD_VER > 14
#endif // !_LIBCPP_HAS_NO_THREADS
@@ -731,4 +728,9 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <functional>
+#endif
+
#endif // _LIBCPP_MUTEX
diff --git a/contrib/libs/cxxsupp/libcxx/include/new b/contrib/libs/cxxsupp/libcxx/include/new
index ed95caed1c..825034c44c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/new
+++ b/contrib/libs/cxxsupp/libcxx/include/new
@@ -129,8 +129,8 @@ class _LIBCPP_EXCEPTION_ABI bad_alloc
{
public:
bad_alloc() _NOEXCEPT;
- virtual ~bad_alloc() _NOEXCEPT;
- virtual const char* what() const _NOEXCEPT;
+ ~bad_alloc() _NOEXCEPT override;
+ const char* what() const _NOEXCEPT override;
};
class _LIBCPP_EXCEPTION_ABI bad_array_new_length
@@ -138,15 +138,33 @@ class _LIBCPP_EXCEPTION_ABI bad_array_new_length
{
public:
bad_array_new_length() _NOEXCEPT;
- virtual ~bad_array_new_length() _NOEXCEPT;
- virtual const char* what() const _NOEXCEPT;
+ ~bad_array_new_length() _NOEXCEPT override;
+ const char* what() const _NOEXCEPT override;
};
typedef void (*new_handler)();
_LIBCPP_FUNC_VIS new_handler set_new_handler(new_handler) _NOEXCEPT;
_LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT;
-#endif // !_LIBCPP_ABI_VCRUNTIME
+#elif defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS == 0 // !_LIBCPP_ABI_VCRUNTIME
+
+// When _HAS_EXCEPTIONS == 0, these complete definitions are needed,
+// since they would normally be provided in vcruntime_exception.h
+class bad_alloc : public exception {
+public:
+ bad_alloc() noexcept : exception("bad allocation") {}
+
+private:
+ friend class bad_array_new_length;
+
+ bad_alloc(char const* const __message) noexcept : exception(__message) {}
+};
+
+class bad_array_new_length : public bad_alloc {
+public:
+ bad_array_new_length() noexcept : bad_alloc("bad array new length") {}
+};
+#endif // defined(_LIBCPP_ABI_VCRUNTIME) && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS == 0
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_bad_alloc(); // not in C++ spec
@@ -347,7 +365,7 @@ _LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR _Tp* __launder(_Tp* __p) _NOEXCEPT
{
static_assert (!(is_function<_Tp>::value), "can't launder functions" );
- static_assert (!(is_same<void, typename remove_cv<_Tp>::type>::value), "can't launder cv-void" );
+ static_assert (!(is_same<void, __remove_cv_t<_Tp> >::value), "can't launder cv-void" );
return __builtin_launder(__p);
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/numeric b/contrib/libs/cxxsupp/libcxx/include/numeric
index 90022de73a..e427695f1c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/numeric
+++ b/contrib/libs/cxxsupp/libcxx/include/numeric
@@ -163,11 +163,6 @@ template<class T>
#include <__numeric/transform_inclusive_scan.h>
#include <__numeric/transform_reduce.h>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <functional>
-# include <iterator>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
@@ -176,4 +171,10 @@ template<class T>
#error # include <__pstl_numeric>
#endif
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <functional>
+# include <iterator>
+#endif
+
#endif // _LIBCPP_NUMERIC
diff --git a/contrib/libs/cxxsupp/libcxx/include/optional b/contrib/libs/cxxsupp/libcxx/include/optional
index 39b9f25db5..41c003cdb6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/optional
+++ b/contrib/libs/cxxsupp/libcxx/include/optional
@@ -87,8 +87,8 @@ namespace std {
// 23.6.3.1, constructors
constexpr optional() noexcept;
constexpr optional(nullopt_t) noexcept;
- optional(const optional &);
- optional(optional &&) noexcept(see below);
+ constexpr optional(const optional &);
+ constexpr optional(optional &&) noexcept(see below);
template <class... Args> constexpr explicit optional(in_place_t, Args &&...);
template <class U, class... Args>
constexpr explicit optional(in_place_t, initializer_list<U>, Args &&...);
@@ -104,8 +104,8 @@ namespace std {
// 23.6.3.3, assignment
optional &operator=(nullopt_t) noexcept; // constexpr in C++20
- optional &operator=(const optional &); // constexpr in C++20
- optional &operator=(optional &&) noexcept(see below); // constexpr in C++20
+ constexpr optional &operator=(const optional &);
+ constexpr optional &operator=(optional &&) noexcept(see below);
template <class U = T> optional &operator=(U &&); // constexpr in C++20
template <class U> optional &operator=(const optional<U> &); // constexpr in C++20
template <class U> optional &operator=(optional<U> &&); // constexpr in C++20
@@ -166,7 +166,7 @@ template<class T>
#include <__functional/invoke.h>
#include <__functional/unary_function.h>
#include <__memory/construct_at.h>
-#include <__tuple>
+#include <__tuple/sfinae_helpers.h>
#include <__utility/forward.h>
#include <__utility/in_place.h>
#include <__utility/move.h>
@@ -177,22 +177,9 @@ template<class T>
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <atomic>
-# include <chrono>
-# include <climits>
-# include <concepts>
-# include <ctime>
-# include <iterator>
-# include <memory>
-# include <ratio>
-# include <tuple>
-# include <typeinfo>
-# include <utility>
-# include <variant>
-#endif
-
// standard-mandated includes
+
+// [optional.syn]
#include <compare>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -207,8 +194,8 @@ class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optiona
{
public:
// Get the key function ~bad_optional_access() into the dylib
- virtual ~bad_optional_access() _NOEXCEPT;
- virtual const char* what() const _NOEXCEPT;
+ ~bad_optional_access() _NOEXCEPT override;
+ const char* what() const _NOEXCEPT override;
};
} // namespace std
@@ -255,7 +242,7 @@ struct __optional_destruct_base<_Tp, false>
bool __engaged_;
_LIBCPP_INLINE_VISIBILITY
- /* _LIBCPP_CONSTEXPR_AFTER_CXX17 */ ~__optional_destruct_base()
+ ~__optional_destruct_base()
{
if (__engaged_)
__val_.~value_type();
@@ -280,7 +267,7 @@ struct __optional_destruct_base<_Tp, false>
#endif
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void reset() noexcept
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void reset() noexcept
{
if (__engaged_)
{
@@ -322,7 +309,7 @@ struct __optional_destruct_base<_Tp, true>
#endif
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void reset() noexcept
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void reset() noexcept
{
if (__engaged_)
{
@@ -367,7 +354,7 @@ struct __optional_storage_base : __optional_destruct_base<_Tp>
template <class... _Args>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct(_Args&&... __args)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __construct(_Args&&... __args)
{
_LIBCPP_ASSERT(!has_value(), "__construct called for engaged __optional_storage");
#if _LIBCPP_STD_VER > 17
@@ -380,7 +367,7 @@ struct __optional_storage_base : __optional_destruct_base<_Tp>
template <class _That>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_from(_That&& __opt)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __construct_from(_That&& __opt)
{
if (__opt.has_value())
__construct(_VSTD::forward<_That>(__opt).__get());
@@ -388,7 +375,7 @@ struct __optional_storage_base : __optional_destruct_base<_Tp>
template <class _That>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __assign_from(_That&& __opt)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __assign_from(_That&& __opt)
{
if (this->__engaged_ == __opt.has_value())
{
@@ -417,14 +404,14 @@ struct __optional_storage_base<_Tp, true>
template <class _Up>
static constexpr bool __can_bind_reference() {
- using _RawUp = typename remove_reference<_Up>::type;
+ using _RawUp = __libcpp_remove_reference_t<_Up>;
using _UpPtr = _RawUp*;
- using _RawTp = typename remove_reference<_Tp>::type;
+ using _RawTp = __libcpp_remove_reference_t<_Tp>;
using _TpPtr = _RawTp*;
using _CheckLValueArg = integral_constant<bool,
(is_lvalue_reference<_Up>::value && is_convertible<_UpPtr, _TpPtr>::value)
|| is_same<_RawUp, reference_wrapper<_RawTp>>::value
- || is_same<_RawUp, reference_wrapper<typename remove_const<_RawTp>::type>>::value
+ || is_same<_RawUp, reference_wrapper<__remove_const_t<_RawTp>>>::value
>;
return (is_lvalue_reference<_Tp>::value && _CheckLValueArg::value)
|| (is_rvalue_reference<_Tp>::value && !is_lvalue_reference<_Up>::value &&
@@ -446,7 +433,7 @@ struct __optional_storage_base<_Tp, true>
}
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void reset() noexcept { __value_ = nullptr; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void reset() noexcept { __value_ = nullptr; }
_LIBCPP_INLINE_VISIBILITY
constexpr bool has_value() const noexcept
@@ -462,7 +449,7 @@ struct __optional_storage_base<_Tp, true>
template <class _UArg>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct(_UArg&& __val)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __construct(_UArg&& __val)
{
_LIBCPP_ASSERT(!has_value(), "__construct called for engaged __optional_storage");
static_assert(__can_bind_reference<_UArg>(),
@@ -473,7 +460,7 @@ struct __optional_storage_base<_Tp, true>
template <class _That>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_from(_That&& __opt)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __construct_from(_That&& __opt)
{
if (__opt.has_value())
__construct(_VSTD::forward<_That>(__opt).__get());
@@ -481,7 +468,7 @@ struct __optional_storage_base<_Tp, true>
template <class _That>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __assign_from(_That&& __opt)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __assign_from(_That&& __opt)
{
if (has_value() == __opt.has_value())
{
@@ -513,7 +500,7 @@ struct __optional_copy_base<_Tp, false> : __optional_storage_base<_Tp>
__optional_copy_base() = default;
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 __optional_copy_base(const __optional_copy_base& __opt)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 __optional_copy_base(const __optional_copy_base& __opt)
{
this->__construct_from(__opt);
}
@@ -544,7 +531,7 @@ struct __optional_move_base<_Tp, false> : __optional_copy_base<_Tp>
__optional_move_base(const __optional_move_base&) = default;
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 __optional_move_base(__optional_move_base&& __opt)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 __optional_move_base(__optional_move_base&& __opt)
noexcept(is_nothrow_move_constructible_v<value_type>)
{
this->__construct_from(_VSTD::move(__opt));
@@ -578,7 +565,7 @@ struct __optional_copy_assign_base<_Tp, false> : __optional_move_base<_Tp>
__optional_copy_assign_base(__optional_copy_assign_base&&) = default;
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 __optional_copy_assign_base& operator=(const __optional_copy_assign_base& __opt)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 __optional_copy_assign_base& operator=(const __optional_copy_assign_base& __opt)
{
this->__assign_from(__opt);
return *this;
@@ -613,7 +600,7 @@ struct __optional_move_assign_base<_Tp, false> : __optional_copy_assign_base<_Tp
__optional_move_assign_base& operator=(const __optional_move_assign_base&) = default;
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 __optional_move_assign_base& operator=(__optional_move_assign_base&& __opt)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 __optional_move_assign_base& operator=(__optional_move_assign_base&& __opt)
noexcept(is_nothrow_move_assignable_v<value_type> &&
is_nothrow_move_constructible_v<value_type>)
{
@@ -652,9 +639,9 @@ public:
private:
// Disable the reference extension using this static assert.
- static_assert(!is_same_v<__uncvref_t<value_type>, in_place_t>,
+ static_assert(!is_same_v<__remove_cvref_t<value_type>, in_place_t>,
"instantiation of optional with in_place_t is ill-formed");
- static_assert(!is_same_v<__uncvref_t<value_type>, nullopt_t>,
+ static_assert(!is_same_v<__remove_cvref_t<value_type>, nullopt_t>,
"instantiation of optional with nullopt_t is ill-formed");
static_assert(!is_reference_v<value_type>,
"instantiation of optional with a reference type is ill-formed");
@@ -679,8 +666,8 @@ private:
};
template <class _Up>
using _CheckOptionalArgsCtor = _If<
- _IsNotSame<__uncvref_t<_Up>, in_place_t>::value &&
- _IsNotSame<__uncvref_t<_Up>, optional>::value,
+ _IsNotSame<__remove_cvref_t<_Up>, in_place_t>::value &&
+ _IsNotSame<__remove_cvref_t<_Up>, optional>::value,
_CheckOptionalArgsConstructor,
__check_tuple_constructor_fail
>;
@@ -787,7 +774,7 @@ public:
_CheckOptionalLikeCtor<_Up, _Up const&>::template __enable_implicit<_Up>()
, int> = 0>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 optional(const optional<_Up>& __v)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 optional(const optional<_Up>& __v)
{
this->__construct_from(__v);
}
@@ -795,7 +782,7 @@ public:
_CheckOptionalLikeCtor<_Up, _Up const&>::template __enable_explicit<_Up>()
, int> = 0>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit optional(const optional<_Up>& __v)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit optional(const optional<_Up>& __v)
{
this->__construct_from(__v);
}
@@ -805,7 +792,7 @@ public:
_CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_implicit<_Up>()
, int> = 0>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 optional(optional<_Up>&& __v)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 optional(optional<_Up>&& __v)
{
this->__construct_from(_VSTD::move(__v));
}
@@ -813,7 +800,7 @@ public:
_CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_explicit<_Up>()
, int> = 0>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit optional(optional<_Up>&& __v)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit optional(optional<_Up>&& __v)
{
this->__construct_from(_VSTD::move(__v));
}
@@ -827,22 +814,22 @@ public:
#endif
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 optional& operator=(nullopt_t) noexcept
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 optional& operator=(nullopt_t) noexcept
{
reset();
return *this;
}
- _LIBCPP_INLINE_VISIBILITY optional& operator=(const optional&) = default;
- _LIBCPP_INLINE_VISIBILITY optional& operator=(optional&&) = default;
+ constexpr optional& operator=(const optional&) = default;
+ constexpr optional& operator=(optional&&) = default;
// LWG2756
template <class _Up = value_type,
class = enable_if_t<
_And<
- _IsNotSame<__uncvref_t<_Up>, optional>,
+ _IsNotSame<__remove_cvref_t<_Up>, optional>,
_Or<
- _IsNotSame<__uncvref_t<_Up>, value_type>,
+ _IsNotSame<__remove_cvref_t<_Up>, value_type>,
_Not<is_scalar<value_type>>
>,
is_constructible<value_type, _Up>,
@@ -850,7 +837,7 @@ public:
>::value>
>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 optional&
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 optional&
operator=(_Up&& __v)
{
if (this->has_value())
@@ -865,7 +852,7 @@ public:
_CheckOptionalLikeAssign<_Up, _Up const&>::template __enable_assign<_Up>()
, int> = 0>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 optional&
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 optional&
operator=(const optional<_Up>& __v)
{
this->__assign_from(__v);
@@ -877,7 +864,7 @@ public:
_CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_assign<_Up>()
, int> = 0>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 optional&
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 optional&
operator=(optional<_Up>&& __v)
{
this->__assign_from(_VSTD::move(__v));
@@ -891,7 +878,7 @@ public:
>
>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp &
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp &
emplace(_Args&&... __args)
{
reset();
@@ -906,7 +893,7 @@ public:
>
>
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp &
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp &
emplace(initializer_list<_Up> __il, _Args&&... __args)
{
reset();
@@ -915,7 +902,7 @@ public:
}
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(optional& __opt)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(optional& __opt)
noexcept(is_nothrow_move_constructible_v<value_type> &&
is_nothrow_swappable_v<value_type>)
{
@@ -1535,7 +1522,7 @@ operator>=(const _Tp& __v, const optional<_Up>& __x)
template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
enable_if_t<
is_move_constructible_v<_Tp> && is_swappable_v<_Tp>,
void
@@ -1587,4 +1574,22 @@ _LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_STD_VER > 14
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
+# include <chrono>
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <atomic>
+# include <climits>
+# include <concepts>
+# include <ctime>
+# include <iterator>
+# include <memory>
+# include <ratio>
+# include <tuple>
+# include <typeinfo>
+# include <utility>
+# include <variant>
+#endif
+
#endif // _LIBCPP_OPTIONAL
diff --git a/contrib/libs/cxxsupp/libcxx/include/ostream b/contrib/libs/cxxsupp/libcxx/include/ostream
index e82f4fa311..6e0d3d5a23 100644
--- a/contrib/libs/cxxsupp/libcxx/include/ostream
+++ b/contrib/libs/cxxsupp/libcxx/include/ostream
@@ -165,16 +165,15 @@ basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, cons
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+#include <__memory/shared_ptr.h>
+#include <__memory/unique_ptr.h>
#include <bitset>
#include <ios>
#include <locale>
+#include <new>
#include <streambuf>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <iterator>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
@@ -197,7 +196,7 @@ public:
inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
explicit basic_ostream(basic_streambuf<char_type, traits_type>* __sb)
{ this->init(__sb); }
- virtual ~basic_ostream();
+ ~basic_ostream() override;
protected:
inline _LIBCPP_INLINE_VISIBILITY
basic_ostream(basic_ostream&& __rhs);
@@ -748,7 +747,7 @@ basic_ostream<_CharT, _Traits>::operator<<(const void* __n)
}
template<class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
__put_character_sequence(basic_ostream<_CharT, _Traits>& __os,
const _CharT* __str, size_t __len)
{
@@ -782,14 +781,14 @@ __put_character_sequence(basic_ostream<_CharT, _Traits>& __os,
template<class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c)
{
return _VSTD::__put_character_sequence(__os, &__c, 1);
}
template<class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -822,35 +821,35 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
}
template<class _Traits>
-basic_ostream<char, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, char __c)
{
return _VSTD::__put_character_sequence(__os, &__c, 1);
}
template<class _Traits>
-basic_ostream<char, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
{
return _VSTD::__put_character_sequence(__os, (char *) &__c, 1);
}
template<class _Traits>
-basic_ostream<char, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)
{
return _VSTD::__put_character_sequence(__os, (char *) &__c, 1);
}
template<class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str)
{
return _VSTD::__put_character_sequence(__os, __str, _Traits::length(__str));
}
template<class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -896,14 +895,14 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
}
template<class _Traits>
-basic_ostream<char, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, const char* __str)
{
return _VSTD::__put_character_sequence(__os, __str, _Traits::length(__str));
}
template<class _Traits>
-basic_ostream<char, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
{
const char *__s = (const char *) __str;
@@ -911,7 +910,7 @@ operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
}
template<class _Traits>
-basic_ostream<char, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)
{
const char *__s = (const char *) __str;
@@ -1032,7 +1031,7 @@ basic_ostream<_CharT, _Traits>::seekp(off_type __off, ios_base::seekdir __dir)
}
template <class _CharT, class _Traits>
-inline
+_LIBCPP_HIDE_FROM_ABI inline
basic_ostream<_CharT, _Traits>&
endl(basic_ostream<_CharT, _Traits>& __os)
{
@@ -1042,7 +1041,7 @@ endl(basic_ostream<_CharT, _Traits>& __os)
}
template <class _CharT, class _Traits>
-inline
+_LIBCPP_HIDE_FROM_ABI inline
basic_ostream<_CharT, _Traits>&
ends(basic_ostream<_CharT, _Traits>& __os)
{
@@ -1051,7 +1050,7 @@ ends(basic_ostream<_CharT, _Traits>& __os)
}
template <class _CharT, class _Traits>
-inline
+_LIBCPP_HIDE_FROM_ABI inline
basic_ostream<_CharT, _Traits>&
flush(basic_ostream<_CharT, _Traits>& __os)
{
@@ -1087,7 +1086,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template<class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
basic_string_view<_CharT, _Traits> __sv)
{
@@ -1114,7 +1113,7 @@ template<class _CharT, class _Traits, class _Yp, class _Dp>
inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
- is_same<void, typename __void_t<decltype((declval<basic_ostream<_CharT, _Traits>&>() << declval<typename unique_ptr<_Yp, _Dp>::pointer>()))>::type>::value,
+ is_same<void, __void_t<decltype((declval<basic_ostream<_CharT, _Traits>&>() << declval<typename unique_ptr<_Yp, _Dp>::pointer>()))> >::value,
basic_ostream<_CharT, _Traits>&
>::type
operator<<(basic_ostream<_CharT, _Traits>& __os, unique_ptr<_Yp, _Dp> const& __p)
@@ -1123,7 +1122,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, unique_ptr<_Yp, _Dp> const& __p
}
template <class _CharT, class _Traits, size_t _Size>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x)
{
return __os << __x.template to_string<_CharT, _Traits>
@@ -1189,4 +1188,9 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<wchar_t>;
_LIBCPP_END_NAMESPACE_STD
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <iterator>
+#endif
+
#endif // _LIBCPP_OSTREAM
diff --git a/contrib/libs/cxxsupp/libcxx/include/queue b/contrib/libs/cxxsupp/libcxx/include/queue
index 9a5cfb39f2..c58da5ec6e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/queue
+++ b/contrib/libs/cxxsupp/libcxx/include/queue
@@ -231,11 +231,9 @@ template <class T, class Container, class Compare>
#include <vector>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <functional>
-#endif
-
// standard-mandated includes
+
+// [queue.syn]
#include <compare>
#include <initializer_list>
@@ -960,4 +958,9 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocator<priority_queue<_Tp, _Container, _Comp
_LIBCPP_END_NAMESPACE_STD
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <functional>
+#endif
+
#endif // _LIBCPP_QUEUE
diff --git a/contrib/libs/cxxsupp/libcxx/include/random b/contrib/libs/cxxsupp/libcxx/include/random
index 41ee4d85fd..5fe4906cb0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/random
+++ b/contrib/libs/cxxsupp/libcxx/include/random
@@ -1718,25 +1718,28 @@ class piecewise_linear_distribution
#include <__random/weibull_distribution.h>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <algorithm>
-#endif
-
// standard-mandated includes
-#include <initializer_list>
-#include <cmath> // for backward compatibility; TODO remove it
-#include <cstddef> // for backward compatibility; TODO remove it
-#include <cstdint> // for backward compatibility; TODO remove it
-#include <iosfwd> // for backward compatibility; TODO remove it
-#include <limits> // for backward compatibility; TODO remove it
-#include <numeric> // for backward compatibility; TODO remove it
-#include <string> // for backward compatibility; TODO remove it
-#include <type_traits> // for backward compatibility; TODO remove it
-#include <vector> // for backward compatibility; TODO remove it
+// [rand.synopsis]
+#include <initializer_list>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <algorithm>
+# include <climits>
+# include <cmath>
+# include <concepts>
+# include <cstddef>
+# include <cstdint>
+# include <iosfwd>
+# include <limits>
+# include <numeric>
+# include <string>
+# include <type_traits>
+# include <vector>
+#endif
+
#endif // _LIBCPP_RANDOM
diff --git a/contrib/libs/cxxsupp/libcxx/include/ranges b/contrib/libs/cxxsupp/libcxx/include/ranges
index 82378a6b0d..643853e1d3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/ranges
+++ b/contrib/libs/cxxsupp/libcxx/include/ranges
@@ -166,6 +166,18 @@ namespace std::ranges {
template<class T>
inline constexpr bool enable_borrowed_range<drop_view<T>> = enable_borrowed_range<T>;
+ // [range.drop.while], drop while view
+ template<view V, class Pred>
+ requires input_range<V> && is_object_v<Pred> &&
+ indirect_unary_predicate<const Pred, iterator_t<V>>
+ class drop_while_view;
+
+ template<class T, class Pred>
+ inline constexpr bool enable_borrowed_range<drop_while_view<T, Pred>> =
+ enable_borrowed_range<T>;
+
+ namespace views { inline constexpr unspecified drop_while = unspecified; }
+
// [range.transform], transform view
template<input_range V, copy_constructible F>
requires view<V> && is_object_v<F> &&
@@ -198,6 +210,14 @@ namespace std::ranges {
template<class T>
inline constexpr bool enable_borrowed_range<take_view<T>> = enable_borrowed_range<T>;
+ // [range.take.while], take while view
+ template<view V, class Pred>
+ requires input_range<V> && is_object_v<Pred> &&
+ indirect_unary_predicate<const Pred, iterator_t<V>>
+ class take_while_view;
+
+ namespace views { inline constexpr unspecified take_while = unspecified; }
+
template<copy_constructible T>
requires is_object_v<T>
class single_view;
@@ -228,6 +248,19 @@ namespace std::ranges {
inline constexpr unspecified lazy_split = unspecified;
}
+ // [range.istream], istream view
+ template<movable Val, class CharT, class Traits = char_traits<CharT>>
+ requires see below
+ class basic_istream_view;
+
+ template<class Val>
+ using istream_view = basic_istream_view<Val, char>;
+
+ template<class Val>
+ using wistream_view = basic_istream_view<Val, wchar_t>;
+
+ namespace views { template<class T> inline constexpr unspecified istream = unspecified; }
+
// [range.zip], zip view
template<input_range... Views>
requires (view<Views> && ...) && (sizeof...(Views) > 0)
@@ -282,6 +315,7 @@ namespace std {
#include <__ranges/dangling.h>
#include <__ranges/data.h>
#include <__ranges/drop_view.h>
+#include <__ranges/drop_while_view.h>
#include <__ranges/empty.h>
#include <__ranges/empty_view.h>
#include <__ranges/enable_borrowed_range.h>
@@ -298,17 +332,29 @@ namespace std {
#include <__ranges/size.h>
#include <__ranges/subrange.h>
#include <__ranges/take_view.h>
+#include <__ranges/take_while_view.h>
#include <__ranges/transform_view.h>
#include <__ranges/view_interface.h>
#include <__ranges/views.h>
#include <__ranges/zip_view.h>
-#include <__tuple> // TODO: <ranges> has to export std::tuple_size. Replace this, once <tuple> is granularized.
-#include <compare> // Required by the standard.
-#include <initializer_list> // Required by the standard.
-#include <iterator> // Required by the standard.
#include <type_traits>
#include <version>
+#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#include <__ranges/istream_view.h>
+#endif
+
+// standard-mandated includes
+
+// [ranges.syn]
+#include <compare>
+#include <initializer_list>
+#include <iterator>
+
+// [tuple.helper]
+#include <__tuple/tuple_element.h>
+#include <__tuple/tuple_size.h>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/regex b/contrib/libs/cxxsupp/libcxx/include/regex
index 26887e84bf..f35197339b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/regex
+++ b/contrib/libs/cxxsupp/libcxx/include/regex
@@ -769,20 +769,17 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
#include <__iterator/back_insert_iterator.h>
#include <__iterator/wrap_iter.h>
#include <__locale>
+#include <__memory_resource/polymorphic_allocator.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#include <__utility/swap.h>
+#include <cstring>
#include <deque>
-#include <memory>
#include <stdexcept>
#include <string>
#include <vector>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <iterator>
-# include <utility>
-#endif
-
// standard-mandated includes
// [iterator.range]
@@ -833,7 +830,7 @@ enum syntax_option_type
multiline = 1 << 10
};
-inline _LIBCPP_CONSTEXPR
+_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR
syntax_option_type __get_grammar(syntax_option_type __g)
{
#ifdef _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO
@@ -1006,8 +1003,8 @@ class _LIBCPP_EXCEPTION_ABI regex_error
public:
explicit regex_error(regex_constants::error_type __ecode);
regex_error(const regex_error&) _NOEXCEPT = default;
- virtual ~regex_error() _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY
+ ~regex_error() _NOEXCEPT override;
+ _LIBCPP_INLINE_VISIBILITY
regex_constants::error_type code() const {return __code_;}
};
@@ -1029,7 +1026,7 @@ public:
typedef _CharT char_type;
typedef basic_string<char_type> string_type;
typedef locale locale_type;
-#ifdef __BIONIC__
+#if defined(__BIONIC__) || defined(_NEWLIB_VERSION)
// Originally bionic's ctype_base used its own ctype masks because the
// builtin ctype implementation wasn't in libc++ yet. Bionic's ctype mask
// was only 8 bits wide and already saturated, so it used a wider type here
@@ -1038,6 +1035,11 @@ public:
// implementation, but this was not updated to match. Since then Android has
// needed to maintain a stable libc++ ABI, and this can't be changed without
// an ABI break.
+ // We also need this workaround for newlib since _NEWLIB_VERSION is not
+ // defined yet inside __config, so we can't set the
+ // _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE macro. Additionally, newlib is
+ // often used for space constrained environments, so it makes sense not to
+ // duplicate the ctype table.
typedef uint16_t char_class_type;
#else
typedef ctype_base::mask char_class_type;
@@ -1507,7 +1509,7 @@ public:
explicit __owns_one_state(__node<_CharT>* __s)
: base(__s) {}
- virtual ~__owns_one_state();
+ ~__owns_one_state() override;
};
template <class _CharT>
@@ -2196,7 +2198,7 @@ public:
__match_any_but_newline(__node<_CharT>* __s)
: base(__s) {}
- virtual void __exec(__state&) const;
+ void __exec(__state&) const override;
};
template <> _LIBCPP_FUNC_VIS void __match_any_but_newline<char>::__exec(__state&) const;
@@ -5732,7 +5734,7 @@ match_results<_BidirectionalIterator, _Allocator>::swap(match_results& __m)
}
template <class _BidirectionalIterator, class _Allocator>
-bool
+_LIBCPP_HIDE_FROM_ABI bool
operator==(const match_results<_BidirectionalIterator, _Allocator>& __x,
const match_results<_BidirectionalIterator, _Allocator>& __y)
{
@@ -6224,7 +6226,7 @@ regex_search(const basic_string<_Cp, _ST, _SA>&& __s,
// regex_match
template <class _BidirectionalIterator, class _Allocator, class _CharT, class _Traits>
-bool
+_LIBCPP_HIDE_FROM_ABI bool
regex_match(_BidirectionalIterator __first, _BidirectionalIterator __last,
match_results<_BidirectionalIterator, _Allocator>& __m,
const basic_regex<_CharT, _Traits>& __e,
@@ -6737,7 +6739,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::operator++()
template <class _OutputIterator, class _BidirectionalIterator,
class _Traits, class _CharT>
-_OutputIterator
+_LIBCPP_HIDE_FROM_ABI _OutputIterator
regex_replace(_OutputIterator __output_iter,
_BidirectionalIterator __first, _BidirectionalIterator __last,
const basic_regex<_CharT, _Traits>& __e, const _CharT* __fmt,
@@ -6842,6 +6844,33 @@ regex_replace(const _CharT* __s,
_LIBCPP_END_NAMESPACE_STD
+#if _LIBCPP_STD_VER > 14
+_LIBCPP_BEGIN_NAMESPACE_STD
+namespace pmr {
+template <class _BidirT>
+using match_results = std::match_results<_BidirT, polymorphic_allocator<std::sub_match<_BidirT>>>;
+
+using cmatch = match_results<const char*>;
+using smatch = match_results<std::pmr::string::const_iterator>;
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+using wcmatch = match_results<const wchar_t*>;
+using wsmatch = match_results<std::pmr::wstring::const_iterator>;
+#endif
+} // namespace pmr
+_LIBCPP_END_NAMESPACE_STD
+#endif
+
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <atomic>
+# include <concepts>
+# include <iosfwd>
+# include <iterator>
+# include <new>
+# include <typeinfo>
+# include <utility>
+#endif
+
#endif // _LIBCPP_REGEX
diff --git a/contrib/libs/cxxsupp/libcxx/include/semaphore b/contrib/libs/cxxsupp/libcxx/include/semaphore
index 228cf773f0..3e4f51cae5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/semaphore
+++ b/contrib/libs/cxxsupp/libcxx/include/semaphore
@@ -80,31 +80,31 @@ functions. It avoids contention against users' own use of those facilities.
class __atomic_semaphore_base
{
- __atomic_base<ptrdiff_t> __a;
+ __atomic_base<ptrdiff_t> __a_;
public:
_LIBCPP_INLINE_VISIBILITY
- constexpr explicit __atomic_semaphore_base(ptrdiff_t __count) : __a(__count)
+ constexpr explicit __atomic_semaphore_base(ptrdiff_t __count) : __a_(__count)
{
}
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void release(ptrdiff_t __update = 1)
{
- if(0 < __a.fetch_add(__update, memory_order_release))
+ if(0 < __a_.fetch_add(__update, memory_order_release))
;
else if(__update > 1)
- __a.notify_all();
+ __a_.notify_all();
else
- __a.notify_one();
+ __a_.notify_one();
}
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void acquire()
{
auto const __test_fn = [this]() -> bool {
- auto __old = __a.load(memory_order_relaxed);
- return (__old != 0) && __a.compare_exchange_strong(__old, __old - 1, memory_order_acquire, memory_order_relaxed);
+ auto __old = __a_.load(memory_order_relaxed);
+ return (__old != 0) && __a_.compare_exchange_strong(__old, __old - 1, memory_order_acquire, memory_order_relaxed);
};
- __cxx_atomic_wait(&__a.__a_, __test_fn);
+ __cxx_atomic_wait(&__a_.__a_, __test_fn);
}
template <class Rep, class Period>
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
@@ -118,11 +118,11 @@ public:
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
bool try_acquire()
{
- auto __old = __a.load(memory_order_acquire);
+ auto __old = __a_.load(memory_order_acquire);
while (true) {
if (__old == 0)
return false;
- if (__a.compare_exchange_strong(__old, __old - 1, memory_order_acquire, memory_order_relaxed))
+ if (__a_.compare_exchange_strong(__old, __old - 1, memory_order_acquire, memory_order_relaxed))
return true;
}
}
@@ -133,7 +133,7 @@ public:
template<ptrdiff_t __least_max_value = _LIBCPP_SEMAPHORE_MAX>
class counting_semaphore
{
- __atomic_semaphore_base __semaphore;
+ __atomic_semaphore_base __semaphore_;
public:
static constexpr ptrdiff_t max() noexcept {
@@ -141,7 +141,7 @@ public:
}
_LIBCPP_INLINE_VISIBILITY
- constexpr explicit counting_semaphore(ptrdiff_t __count) : __semaphore(__count) { }
+ constexpr explicit counting_semaphore(ptrdiff_t __count) : __semaphore_(__count) { }
~counting_semaphore() = default;
counting_semaphore(const counting_semaphore&) = delete;
@@ -150,23 +150,23 @@ public:
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void release(ptrdiff_t __update = 1)
{
- __semaphore.release(__update);
+ __semaphore_.release(__update);
}
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void acquire()
{
- __semaphore.acquire();
+ __semaphore_.acquire();
}
template<class Rep, class Period>
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
bool try_acquire_for(chrono::duration<Rep, Period> const& __rel_time)
{
- return __semaphore.try_acquire_for(chrono::duration_cast<chrono::nanoseconds>(__rel_time));
+ return __semaphore_.try_acquire_for(chrono::duration_cast<chrono::nanoseconds>(__rel_time));
}
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
bool try_acquire()
{
- return __semaphore.try_acquire();
+ return __semaphore_.try_acquire();
}
template <class Clock, class Duration>
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
diff --git a/contrib/libs/cxxsupp/libcxx/include/set b/contrib/libs/cxxsupp/libcxx/include/set
index 80e22765fb..97387e239b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/set
+++ b/contrib/libs/cxxsupp/libcxx/include/set
@@ -480,16 +480,14 @@ erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred); // C++20
#include <__iterator/erase_if_container.h>
#include <__iterator/iterator_traits.h>
#include <__iterator/reverse_iterator.h>
+#include <__memory/allocator.h>
+#include <__memory_resource/polymorphic_allocator.h>
#include <__node_handle>
#include <__tree>
+#include <__type_traits/is_allocator.h>
#include <__utility/forward.h>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <functional>
-# include <iterator>
-#endif
-
// standard-mandated includes
// [iterator.range]
@@ -533,6 +531,10 @@ private:
typedef __tree<value_type, value_compare, allocator_type> __base;
typedef allocator_traits<allocator_type> __alloc_traits;
+ static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
+ "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
+ "original allocator");
+
__base __tree_;
public:
@@ -1066,6 +1068,10 @@ private:
typedef __tree<value_type, value_compare, allocator_type> __base;
typedef allocator_traits<allocator_type> __alloc_traits;
+ static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
+ "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
+ "original allocator");
+
__base __tree_;
public:
@@ -1578,4 +1584,22 @@ inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_END_NAMESPACE_STD
+#if _LIBCPP_STD_VER > 14
+_LIBCPP_BEGIN_NAMESPACE_STD
+namespace pmr {
+template <class _KeyT, class _CompareT = std::less<_KeyT>>
+using set = std::set<_KeyT, _CompareT, polymorphic_allocator<_KeyT>>;
+
+template <class _KeyT, class _CompareT = std::less<_KeyT>>
+using multiset = std::multiset<_KeyT, _CompareT, polymorphic_allocator<_KeyT>>;
+} // namespace pmr
+_LIBCPP_END_NAMESPACE_STD
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <functional>
+# include <iterator>
+#endif
+
#endif // _LIBCPP_SET
diff --git a/contrib/libs/cxxsupp/libcxx/include/setjmp.h b/contrib/libs/cxxsupp/libcxx/include/setjmp.h
index de4f9edf48..f4a2bbcb0b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/setjmp.h
+++ b/contrib/libs/cxxsupp/libcxx/include/setjmp.h
@@ -31,7 +31,9 @@ void longjmp(jmp_buf env, int val);
# pragma GCC system_header
#endif
-#include_next <setjmp.h>
+#if __has_include_next(<setjmp.h>)
+# include_next <setjmp.h>
+#endif
#ifdef __cplusplus
diff --git a/contrib/libs/cxxsupp/libcxx/include/shared_mutex b/contrib/libs/cxxsupp/libcxx/include/shared_mutex
index f85cf6ec4c..6919898f66 100644
--- a/contrib/libs/cxxsupp/libcxx/include/shared_mutex
+++ b/contrib/libs/cxxsupp/libcxx/include/shared_mutex
@@ -180,23 +180,23 @@ __shared_mutex_base
#if _LIBCPP_STD_VER > 14
class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_mutex
{
- __shared_mutex_base __base;
+ __shared_mutex_base __base_;
public:
- _LIBCPP_INLINE_VISIBILITY shared_mutex() : __base() {}
+ _LIBCPP_INLINE_VISIBILITY shared_mutex() : __base_() {}
_LIBCPP_INLINE_VISIBILITY ~shared_mutex() = default;
shared_mutex(const shared_mutex&) = delete;
shared_mutex& operator=(const shared_mutex&) = delete;
// Exclusive ownership
- _LIBCPP_INLINE_VISIBILITY void lock() { return __base.lock(); }
- _LIBCPP_INLINE_VISIBILITY bool try_lock() { return __base.try_lock(); }
- _LIBCPP_INLINE_VISIBILITY void unlock() { return __base.unlock(); }
+ _LIBCPP_INLINE_VISIBILITY void lock() { return __base_.lock(); }
+ _LIBCPP_INLINE_VISIBILITY bool try_lock() { return __base_.try_lock(); }
+ _LIBCPP_INLINE_VISIBILITY void unlock() { return __base_.unlock(); }
// Shared ownership
- _LIBCPP_INLINE_VISIBILITY void lock_shared() { return __base.lock_shared(); }
- _LIBCPP_INLINE_VISIBILITY bool try_lock_shared() { return __base.try_lock_shared(); }
- _LIBCPP_INLINE_VISIBILITY void unlock_shared() { return __base.unlock_shared(); }
+ _LIBCPP_INLINE_VISIBILITY void lock_shared() { return __base_.lock_shared(); }
+ _LIBCPP_INLINE_VISIBILITY bool try_lock_shared() { return __base_.try_lock_shared(); }
+ _LIBCPP_INLINE_VISIBILITY void unlock_shared() { return __base_.unlock_shared(); }
// typedef __shared_mutex_base::native_handle_type native_handle_type;
// _LIBCPP_INLINE_VISIBILITY native_handle_type native_handle() { return __base::unlock_shared(); }
@@ -206,7 +206,7 @@ public:
class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_timed_mutex
{
- __shared_mutex_base __base;
+ __shared_mutex_base __base_;
public:
shared_timed_mutex();
_LIBCPP_INLINE_VISIBILITY ~shared_timed_mutex() = default;
@@ -252,30 +252,30 @@ bool
shared_timed_mutex::try_lock_until(
const chrono::time_point<_Clock, _Duration>& __abs_time)
{
- unique_lock<mutex> __lk(__base.__mut_);
- if (__base.__state_ & __base.__write_entered_)
+ unique_lock<mutex> __lk(__base_.__mut_);
+ if (__base_.__state_ & __base_.__write_entered_)
{
while (true)
{
- cv_status __status = __base.__gate1_.wait_until(__lk, __abs_time);
- if ((__base.__state_ & __base.__write_entered_) == 0)
+ cv_status __status = __base_.__gate1_.wait_until(__lk, __abs_time);
+ if ((__base_.__state_ & __base_.__write_entered_) == 0)
break;
if (__status == cv_status::timeout)
return false;
}
}
- __base.__state_ |= __base.__write_entered_;
- if (__base.__state_ & __base.__n_readers_)
+ __base_.__state_ |= __base_.__write_entered_;
+ if (__base_.__state_ & __base_.__n_readers_)
{
while (true)
{
- cv_status __status = __base.__gate2_.wait_until(__lk, __abs_time);
- if ((__base.__state_ & __base.__n_readers_) == 0)
+ cv_status __status = __base_.__gate2_.wait_until(__lk, __abs_time);
+ if ((__base_.__state_ & __base_.__n_readers_) == 0)
break;
if (__status == cv_status::timeout)
{
- __base.__state_ &= ~__base.__write_entered_;
- __base.__gate1_.notify_all();
+ __base_.__state_ &= ~__base_.__write_entered_;
+ __base_.__gate1_.notify_all();
return false;
}
}
@@ -288,22 +288,22 @@ bool
shared_timed_mutex::try_lock_shared_until(
const chrono::time_point<_Clock, _Duration>& __abs_time)
{
- unique_lock<mutex> __lk(__base.__mut_);
- if ((__base.__state_ & __base.__write_entered_) || (__base.__state_ & __base.__n_readers_) == __base.__n_readers_)
+ unique_lock<mutex> __lk(__base_.__mut_);
+ if ((__base_.__state_ & __base_.__write_entered_) || (__base_.__state_ & __base_.__n_readers_) == __base_.__n_readers_)
{
while (true)
{
- cv_status status = __base.__gate1_.wait_until(__lk, __abs_time);
- if ((__base.__state_ & __base.__write_entered_) == 0 &&
- (__base.__state_ & __base.__n_readers_) < __base.__n_readers_)
+ cv_status status = __base_.__gate1_.wait_until(__lk, __abs_time);
+ if ((__base_.__state_ & __base_.__write_entered_) == 0 &&
+ (__base_.__state_ & __base_.__n_readers_) < __base_.__n_readers_)
break;
if (status == cv_status::timeout)
return false;
}
}
- unsigned __num_readers = (__base.__state_ & __base.__n_readers_) + 1;
- __base.__state_ &= ~__base.__n_readers_;
- __base.__state_ |= __num_readers;
+ unsigned __num_readers = (__base_.__state_ & __base_.__n_readers_) + 1;
+ __base_.__state_ &= ~__base_.__n_readers_;
+ __base_.__state_ |= __num_readers;
return true;
}
@@ -432,6 +432,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
mutex_type* mutex() const _NOEXCEPT {return __m_;}
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(shared_lock);
template <class _Mutex>
void
diff --git a/contrib/libs/cxxsupp/libcxx/include/span b/contrib/libs/cxxsupp/libcxx/include/span
index 67d2ac241f..23af04f388 100644
--- a/contrib/libs/cxxsupp/libcxx/include/span
+++ b/contrib/libs/cxxsupp/libcxx/include/span
@@ -148,11 +148,6 @@ template<class R>
#include <type_traits> // for remove_cv, etc
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <functional>
-# include <iterator>
-#endif
-
// standard-mandated includes
// [iterator.range]
@@ -185,23 +180,6 @@ struct __is_std_span : false_type {};
template <class _Tp, size_t _Sz>
struct __is_std_span<span<_Tp, _Sz>> : true_type {};
-#if defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
-// This is a temporary workaround until we ship <ranges> -- we've unfortunately been
-// shipping <span> before its API was finalized, and we used to provide a constructor
-// from container types that had the requirements below. To avoid breaking code that
-// has started relying on the range-based constructor until we ship all of <ranges>,
-// we emulate the constructor requirements like this.
-template <class _Range, class _ElementType>
-concept __span_compatible_range =
- !__is_std_span<remove_cvref_t<_Range>>::value &&
- !__is_std_array<remove_cvref_t<_Range>>::value &&
- !is_array_v<remove_cvref_t<_Range>> &&
- requires (_Range&& __r) {
- data(std::forward<_Range>(__r));
- size(std::forward<_Range>(__r));
- } &&
- is_convertible_v<remove_reference_t<ranges::range_reference_t<_Range>>(*)[], _ElementType(*)[]>;
-#else
template <class _Range, class _ElementType>
concept __span_compatible_range =
ranges::contiguous_range<_Range> &&
@@ -211,7 +189,6 @@ concept __span_compatible_range =
!__is_std_array<remove_cvref_t<_Range>>::value &&
!is_array_v<remove_cvref_t<_Range>> &&
is_convertible_v<remove_reference_t<ranges::range_reference_t<_Range>>(*)[], _ElementType(*)[]>;
-#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
template <class _From, class _To>
concept __span_array_convertible = is_convertible_v<_From(*)[], _To(*)[]>;
@@ -234,7 +211,7 @@ public:
using const_pointer = const _Tp *;
using reference = _Tp &;
using const_reference = const _Tp &;
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCPP_DEBUG_ITERATOR_BOUNDS_CHECKING
using iterator = __bounded_iter<pointer>;
#else
using iterator = __wrap_iter<pointer>;
@@ -245,7 +222,7 @@ public:
// [span.cons], span constructors, copy, assignment, and destructor
template <size_t _Sz = _Extent> requires(_Sz == 0)
- _LIBCPP_INLINE_VISIBILITY constexpr span() noexcept : __data{nullptr} {}
+ _LIBCPP_INLINE_VISIBILITY constexpr span() noexcept : __data_{nullptr} {}
constexpr span (const span&) noexcept = default;
constexpr span& operator=(const span&) noexcept = default;
@@ -253,61 +230,46 @@ public:
template <__span_compatible_iterator<element_type> _It>
_LIBCPP_INLINE_VISIBILITY
constexpr explicit span(_It __first, size_type __count)
- : __data{_VSTD::to_address(__first)} {
+ : __data_{_VSTD::to_address(__first)} {
(void)__count;
_LIBCPP_ASSERT(_Extent == __count, "size mismatch in span's constructor (iterator, len)");
}
template <__span_compatible_iterator<element_type> _It, __span_compatible_sentinel_for<_It> _End>
_LIBCPP_INLINE_VISIBILITY
- constexpr explicit span(_It __first, _End __last) : __data{_VSTD::to_address(__first)} {
+ constexpr explicit span(_It __first, _End __last) : __data_{_VSTD::to_address(__first)} {
(void)__last;
_LIBCPP_ASSERT((__last - __first >= 0), "invalid range in span's constructor (iterator, sentinel)");
_LIBCPP_ASSERT(__last - __first == _Extent,
"invalid range in span's constructor (iterator, sentinel): last - first != extent");
}
- _LIBCPP_INLINE_VISIBILITY constexpr span(type_identity_t<element_type> (&__arr)[_Extent]) noexcept : __data{__arr} {}
+ _LIBCPP_INLINE_VISIBILITY constexpr span(type_identity_t<element_type> (&__arr)[_Extent]) noexcept : __data_{__arr} {}
template <__span_array_convertible<element_type> _OtherElementType>
_LIBCPP_INLINE_VISIBILITY
- constexpr span(array<_OtherElementType, _Extent>& __arr) noexcept : __data{__arr.data()} {}
+ constexpr span(array<_OtherElementType, _Extent>& __arr) noexcept : __data_{__arr.data()} {}
template <class _OtherElementType>
requires __span_array_convertible<const _OtherElementType, element_type>
_LIBCPP_INLINE_VISIBILITY
- constexpr span(const array<_OtherElementType, _Extent>& __arr) noexcept : __data{__arr.data()} {}
+ constexpr span(const array<_OtherElementType, _Extent>& __arr) noexcept : __data_{__arr.data()} {}
-#if defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
- template <class _Container>
- requires __span_compatible_range<_Container, element_type>
- _LIBCPP_INLINE_VISIBILITY
- constexpr explicit span(_Container& __c) : __data{std::data(__c)} {
- _LIBCPP_ASSERT(std::size(__c) == _Extent, "size mismatch in span's constructor (range)");
- }
- template <class _Container>
- requires __span_compatible_range<const _Container, element_type>
- _LIBCPP_INLINE_VISIBILITY
- constexpr explicit span(const _Container& __c) : __data{std::data(__c)} {
- _LIBCPP_ASSERT(std::size(__c) == _Extent, "size mismatch in span's constructor (range)");
- }
-#else
template <__span_compatible_range<element_type> _Range>
_LIBCPP_INLINE_VISIBILITY
- constexpr explicit span(_Range&& __r) : __data{ranges::data(__r)} {
+ constexpr explicit span(_Range&& __r) : __data_{ranges::data(__r)} {
_LIBCPP_ASSERT(ranges::size(__r) == _Extent, "size mismatch in span's constructor (range)");
}
-#endif
template <__span_array_convertible<element_type> _OtherElementType>
_LIBCPP_INLINE_VISIBILITY
constexpr span(const span<_OtherElementType, _Extent>& __other)
- : __data{__other.data()} {}
+ : __data_{__other.data()} {}
template <__span_array_convertible<element_type> _OtherElementType>
_LIBCPP_INLINE_VISIBILITY
constexpr explicit span(const span<_OtherElementType, dynamic_extent>& __other) noexcept
- : __data{__other.data()} { _LIBCPP_ASSERT(_Extent == __other.size(), "size mismatch in span's constructor (other span)"); }
+ : __data_{__other.data()} { _LIBCPP_ASSERT(_Extent == __other.size(), "size mismatch in span's constructor (other span)"); }
// ~span() noexcept = default;
@@ -374,33 +336,33 @@ public:
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](size_type __idx) const noexcept
{
_LIBCPP_ASSERT(__idx < size(), "span<T, N>::operator[](index): index out of range");
- return __data[__idx];
+ return __data_[__idx];
}
_LIBCPP_INLINE_VISIBILITY constexpr reference front() const noexcept
{
_LIBCPP_ASSERT(!empty(), "span<T, N>::front() on empty span");
- return __data[0];
+ return __data_[0];
}
_LIBCPP_INLINE_VISIBILITY constexpr reference back() const noexcept
{
_LIBCPP_ASSERT(!empty(), "span<T, N>::back() on empty span");
- return __data[size()-1];
+ return __data_[size()-1];
}
- _LIBCPP_INLINE_VISIBILITY constexpr pointer data() const noexcept { return __data; }
+ _LIBCPP_INLINE_VISIBILITY constexpr pointer data() const noexcept { return __data_; }
// [span.iter], span iterator support
_LIBCPP_INLINE_VISIBILITY constexpr iterator begin() const noexcept {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCPP_DEBUG_ITERATOR_BOUNDS_CHECKING
return std::__make_bounded_iter(data(), data(), data() + size());
#else
return iterator(this, data());
#endif
}
_LIBCPP_INLINE_VISIBILITY constexpr iterator end() const noexcept {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCPP_DEBUG_ITERATOR_BOUNDS_CHECKING
return std::__make_bounded_iter(data() + size(), data(), data() + size());
#else
return iterator(this, data() + size());
@@ -416,7 +378,7 @@ public:
{ return span<byte, _Extent * sizeof(element_type)>{reinterpret_cast<byte *>(data()), size_bytes()}; }
private:
- pointer __data;
+ pointer __data_;
};
@@ -432,7 +394,7 @@ public:
using const_pointer = const _Tp *;
using reference = _Tp &;
using const_reference = const _Tp &;
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCPP_DEBUG_ITERATOR_BOUNDS_CHECKING
using iterator = __bounded_iter<pointer>;
#else
using iterator = __wrap_iter<pointer>;
@@ -442,7 +404,7 @@ public:
static constexpr size_type extent = dynamic_extent;
// [span.cons], span constructors, copy, assignment, and destructor
- _LIBCPP_INLINE_VISIBILITY constexpr span() noexcept : __data{nullptr}, __size{0} {}
+ _LIBCPP_INLINE_VISIBILITY constexpr span() noexcept : __data_{nullptr}, __size_{0} {}
constexpr span (const span&) noexcept = default;
constexpr span& operator=(const span&) noexcept = default;
@@ -450,46 +412,35 @@ public:
template <__span_compatible_iterator<element_type> _It>
_LIBCPP_INLINE_VISIBILITY
constexpr span(_It __first, size_type __count)
- : __data{_VSTD::to_address(__first)}, __size{__count} {}
+ : __data_{_VSTD::to_address(__first)}, __size_{__count} {}
template <__span_compatible_iterator<element_type> _It, __span_compatible_sentinel_for<_It> _End>
_LIBCPP_INLINE_VISIBILITY constexpr span(_It __first, _End __last)
- : __data(_VSTD::to_address(__first)), __size(__last - __first) {
+ : __data_(_VSTD::to_address(__first)), __size_(__last - __first) {
_LIBCPP_ASSERT(__last - __first >= 0, "invalid range in span's constructor (iterator, sentinel)");
}
template <size_t _Sz>
_LIBCPP_INLINE_VISIBILITY
- constexpr span(type_identity_t<element_type> (&__arr)[_Sz]) noexcept : __data{__arr}, __size{_Sz} {}
+ constexpr span(type_identity_t<element_type> (&__arr)[_Sz]) noexcept : __data_{__arr}, __size_{_Sz} {}
template <__span_array_convertible<element_type> _OtherElementType, size_t _Sz>
_LIBCPP_INLINE_VISIBILITY
- constexpr span(array<_OtherElementType, _Sz>& __arr) noexcept : __data{__arr.data()}, __size{_Sz} {}
+ constexpr span(array<_OtherElementType, _Sz>& __arr) noexcept : __data_{__arr.data()}, __size_{_Sz} {}
template <class _OtherElementType, size_t _Sz>
requires __span_array_convertible<const _OtherElementType, element_type>
_LIBCPP_INLINE_VISIBILITY
- constexpr span(const array<_OtherElementType, _Sz>& __arr) noexcept : __data{__arr.data()}, __size{_Sz} {}
+ constexpr span(const array<_OtherElementType, _Sz>& __arr) noexcept : __data_{__arr.data()}, __size_{_Sz} {}
-#if defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
- template <class _Container>
- requires __span_compatible_range<_Container, element_type>
- _LIBCPP_INLINE_VISIBILITY
- constexpr span(_Container& __c) : __data(std::data(__c)), __size{std::size(__c)} {}
- template <class _Container>
- requires __span_compatible_range<const _Container, element_type>
- _LIBCPP_INLINE_VISIBILITY
- constexpr span(const _Container& __c) : __data(std::data(__c)), __size{std::size(__c)} {}
-#else
template <__span_compatible_range<element_type> _Range>
_LIBCPP_INLINE_VISIBILITY
- constexpr span(_Range&& __r) : __data(ranges::data(__r)), __size{ranges::size(__r)} {}
-#endif
+ constexpr span(_Range&& __r) : __data_(ranges::data(__r)), __size_{ranges::size(__r)} {}
template <__span_array_convertible<element_type> _OtherElementType, size_t _OtherExtent>
_LIBCPP_INLINE_VISIBILITY
constexpr span(const span<_OtherElementType, _OtherExtent>& __other) noexcept
- : __data{__other.data()}, __size{__other.size()} {}
+ : __data_{__other.data()}, __size_{__other.size()} {}
// ~span() noexcept = default;
@@ -544,41 +495,41 @@ public:
return {data() + __offset, __count};
}
- _LIBCPP_INLINE_VISIBILITY constexpr size_type size() const noexcept { return __size; }
- _LIBCPP_INLINE_VISIBILITY constexpr size_type size_bytes() const noexcept { return __size * sizeof(element_type); }
- [[nodiscard]] _LIBCPP_INLINE_VISIBILITY constexpr bool empty() const noexcept { return __size == 0; }
+ _LIBCPP_INLINE_VISIBILITY constexpr size_type size() const noexcept { return __size_; }
+ _LIBCPP_INLINE_VISIBILITY constexpr size_type size_bytes() const noexcept { return __size_ * sizeof(element_type); }
+ [[nodiscard]] _LIBCPP_INLINE_VISIBILITY constexpr bool empty() const noexcept { return __size_ == 0; }
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](size_type __idx) const noexcept
{
_LIBCPP_ASSERT(__idx < size(), "span<T>::operator[](index): index out of range");
- return __data[__idx];
+ return __data_[__idx];
}
_LIBCPP_INLINE_VISIBILITY constexpr reference front() const noexcept
{
_LIBCPP_ASSERT(!empty(), "span<T>::front() on empty span");
- return __data[0];
+ return __data_[0];
}
_LIBCPP_INLINE_VISIBILITY constexpr reference back() const noexcept
{
_LIBCPP_ASSERT(!empty(), "span<T>::back() on empty span");
- return __data[size()-1];
+ return __data_[size()-1];
}
- _LIBCPP_INLINE_VISIBILITY constexpr pointer data() const noexcept { return __data; }
+ _LIBCPP_INLINE_VISIBILITY constexpr pointer data() const noexcept { return __data_; }
// [span.iter], span iterator support
_LIBCPP_INLINE_VISIBILITY constexpr iterator begin() const noexcept {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCPP_DEBUG_ITERATOR_BOUNDS_CHECKING
return std::__make_bounded_iter(data(), data(), data() + size());
#else
return iterator(this, data());
#endif
}
_LIBCPP_INLINE_VISIBILITY constexpr iterator end() const noexcept {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCPP_DEBUG_ITERATOR_BOUNDS_CHECKING
return std::__make_bounded_iter(data() + size(), data(), data() + size());
#else
return iterator(this, data() + size());
@@ -594,8 +545,8 @@ public:
{ return {reinterpret_cast<byte *>(data()), size_bytes()}; }
private:
- pointer __data;
- size_type __size;
+ pointer __data_;
+ size_type __size_;
};
template <class _Tp, size_t _Extent>
@@ -629,16 +580,8 @@ template<class _Tp, size_t _Sz>
template<class _Tp, size_t _Sz>
span(const array<_Tp, _Sz>&) -> span<const _Tp, _Sz>;
-#if defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
-template<class _Container>
- span(_Container&) -> span<typename _Container::value_type>;
-
-template<class _Container>
- span(const _Container&) -> span<const typename _Container::value_type>;
-#else
template<ranges::contiguous_range _Range>
span(_Range&&) -> span<remove_reference_t<ranges::range_reference_t<_Range>>>;
-#endif
#endif // _LIBCPP_STD_VER > 17
@@ -646,4 +589,10 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <functional>
+# include <iterator>
+#endif
+
#endif // _LIBCPP_SPAN
diff --git a/contrib/libs/cxxsupp/libcxx/include/sstream b/contrib/libs/cxxsupp/libcxx/include/sstream
index 602a1b55b4..91d1a07353 100644
--- a/contrib/libs/cxxsupp/libcxx/include/sstream
+++ b/contrib/libs/cxxsupp/libcxx/include/sstream
@@ -11,8 +11,9 @@
#define _LIBCPP_SSTREAM
/*
- sstream synopsis
+ sstream synopsis [sstream.syn]
+// Class template basic_stringbuf [stringbuf]
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
class basic_stringbuf
: public basic_streambuf<charT, traits>
@@ -25,7 +26,7 @@ public:
typedef typename traits_type::off_type off_type;
typedef Allocator allocator_type;
- // 27.8.1.1 [stringbuf.cons], constructors:
+ // [stringbuf.cons] constructors:
explicit basic_stringbuf(ios_base::openmode which = ios_base::in | ios_base::out); // before C++20
basic_stringbuf() : basic_stringbuf(ios_base::in | ios_base::out) {} // C++20
explicit basic_stringbuf(ios_base::openmode which); // C++20
@@ -33,16 +34,16 @@ public:
ios_base::openmode which = ios_base::in | ios_base::out);
basic_stringbuf(basic_stringbuf&& rhs);
- // 27.8.1.2 Assign and swap:
+ // [stringbuf.assign] Assign and swap:
basic_stringbuf& operator=(basic_stringbuf&& rhs);
void swap(basic_stringbuf& rhs);
- // 27.8.1.3 Get and set:
+ // [stringbuf.members] Member functions:
basic_string<char_type, traits_type, allocator_type> str() const;
void str(const basic_string<char_type, traits_type, allocator_type>& s);
protected:
- // 27.8.1.4 Overridden virtual functions:
+ // [stringbuf.virtuals] Overridden virtual functions:
virtual int_type underflow();
virtual int_type pbackfail(int_type c = traits_type::eof());
virtual int_type overflow (int_type c = traits_type::eof());
@@ -53,6 +54,7 @@ protected:
ios_base::openmode which = ios_base::in | ios_base::out);
};
+// [stringbuf.assign] non member swap
template <class charT, class traits, class Allocator>
void swap(basic_stringbuf<charT, traits, Allocator>& x,
basic_stringbuf<charT, traits, Allocator>& y);
@@ -60,6 +62,7 @@ template <class charT, class traits, class Allocator>
typedef basic_stringbuf<char> stringbuf;
typedef basic_stringbuf<wchar_t> wstringbuf;
+// Class template basic_istringstream [istringstream]
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
class basic_istringstream
: public basic_istream<charT, traits>
@@ -72,7 +75,7 @@ public:
typedef typename traits_type::off_type off_type;
typedef Allocator allocator_type;
- // 27.8.2.1 Constructors:
+ // [istringstream.cons] Constructors:
explicit basic_istringstream(ios_base::openmode which = ios_base::in); // before C++20
basic_istringstream() : basic_istringstream(ios_base::in) {} // C++20
explicit basic_istringstream(ios_base::openmode which); // C++20
@@ -81,11 +84,11 @@ public:
ios_base::openmode which = ios_base::in);
basic_istringstream(basic_istringstream&& rhs);
- // 27.8.2.2 Assign and swap:
+ // [istringstream.assign] Assign and swap:
basic_istringstream& operator=(basic_istringstream&& rhs);
void swap(basic_istringstream& rhs);
- // 27.8.2.3 Members:
+ // [istringstream.members] Member functions:
basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const;
basic_string<char_type, traits_type, allocator_type> str() const;
void str(const basic_string<char_type, traits_type, allocator_type>& s);
@@ -98,6 +101,7 @@ template <class charT, class traits, class Allocator>
typedef basic_istringstream<char> istringstream;
typedef basic_istringstream<wchar_t> wistringstream;
+// Class template basic_ostringstream [ostringstream]
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
class basic_ostringstream
: public basic_ostream<charT, traits>
@@ -111,7 +115,7 @@ public:
typedef typename traits_type::off_type off_type;
typedef Allocator allocator_type;
- // 27.8.3.1 Constructors/destructor:
+ // [ostringstream.cons] Constructors:
explicit basic_ostringstream(ios_base::openmode which = ios_base::out); // before C++20
basic_ostringstream() : basic_ostringstream(ios_base::out) {} // C++20
explicit basic_ostringstream(ios_base::openmode which); // C++20
@@ -120,11 +124,11 @@ public:
ios_base::openmode which = ios_base::out);
basic_ostringstream(basic_ostringstream&& rhs);
- // 27.8.3.2 Assign/swap:
+ // [ostringstream.assign] Assign and swap:
basic_ostringstream& operator=(basic_ostringstream&& rhs);
void swap(basic_ostringstream& rhs);
- // 27.8.3.3 Members:
+ // [ostringstream.members] Member functions:
basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const;
basic_string<char_type, traits_type, allocator_type> str() const;
void str(const basic_string<char_type, traits_type, allocator_type>& s);
@@ -137,6 +141,7 @@ template <class charT, class traits, class Allocator>
typedef basic_ostringstream<char> ostringstream;
typedef basic_ostringstream<wchar_t> wostringstream;
+// Class template basic_stringstream [stringstream]
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
class basic_stringstream
: public basic_iostream<charT, traits>
@@ -150,7 +155,7 @@ public:
typedef typename traits_type::off_type off_type;
typedef Allocator allocator_type;
- // constructors/destructor
+ // [stringstream.cons] constructors
explicit basic_stringstream(ios_base::openmode which = ios_base::out | ios_base::in); // before C++20
basic_stringstream() : basic_stringstream(ios_base::out | ios_base::in) {} // C++20
explicit basic_stringstream(ios_base::openmode which); // C++20
@@ -159,11 +164,11 @@ public:
ios_base::openmode which = ios_base::out|ios_base::in);
basic_stringstream(basic_stringstream&& rhs);
- // 27.8.5.1 Assign/swap:
+ // [stringstream.assign] Assign and swap:
basic_stringstream& operator=(basic_stringstream&& rhs);
void swap(basic_stringstream& rhs);
- // Members:
+ // [stringstream.members] Member functions:
basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const;
basic_string<char_type, traits_type, allocator_type> str() const;
void str(const basic_string<char_type, traits_type, allocator_type>& str);
@@ -198,7 +203,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-// basic_stringbuf
+// Class template basic_stringbuf [stringbuf]
template <class _CharT, class _Traits, class _Allocator>
class _LIBCPP_TEMPLATE_VIS basic_stringbuf
@@ -221,7 +226,7 @@ private:
ios_base::openmode __mode_;
public:
- // 30.8.2.1 [stringbuf.cons], constructors
+ // [stringbuf.cons] constructors:
_LIBCPP_INLINE_VISIBILITY
basic_stringbuf()
: __hm_(nullptr), __mode_(ios_base::in | ios_base::out) {}
@@ -240,24 +245,24 @@ public:
basic_stringbuf(basic_stringbuf&& __rhs);
- // 27.8.1.2 Assign and swap:
+ // [stringbuf.assign] Assign and swap:
basic_stringbuf& operator=(basic_stringbuf&& __rhs);
void swap(basic_stringbuf& __rhs);
- // 27.8.1.3 Get and set:
+ // [stringbuf.members] Member functions:
string_type str() const;
void str(const string_type& __s);
protected:
- // 27.8.1.4 Overridden virtual functions:
- virtual int_type underflow();
- virtual int_type pbackfail(int_type __c = traits_type::eof());
- virtual int_type overflow (int_type __c = traits_type::eof());
- virtual pos_type seekoff(off_type __off, ios_base::seekdir __way,
- ios_base::openmode __wch = ios_base::in | ios_base::out);
+ // [stringbuf.virtuals] Overridden virtual functions:
+ int_type underflow() override;
+ int_type pbackfail(int_type __c = traits_type::eof()) override;
+ int_type overflow (int_type __c = traits_type::eof()) override;
+ pos_type seekoff(off_type __off, ios_base::seekdir __way,
+ ios_base::openmode __wch = ios_base::in | ios_base::out) override;
_LIBCPP_INLINE_VISIBILITY
- virtual pos_type seekpos(pos_type __sp,
- ios_base::openmode __wch = ios_base::in | ios_base::out) {
+ pos_type seekpos(pos_type __sp,
+ ios_base::openmode __wch = ios_base::in | ios_base::out) override {
return seekoff(__sp, ios_base::beg, __wch);
}
};
@@ -619,7 +624,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::seekoff(off_type __off,
return pos_type(__noff);
}
-// basic_istringstream
+// Class template basic_istringstream [istringstream]
template <class _CharT, class _Traits, class _Allocator>
class _LIBCPP_TEMPLATE_VIS basic_istringstream
@@ -639,7 +644,7 @@ private:
basic_stringbuf<char_type, traits_type, allocator_type> __sb_;
public:
- // 30.8.3.1 [istringstream.cons], constructors
+ // [istringstream.cons] Constructors:
_LIBCPP_INLINE_VISIBILITY
basic_istringstream()
: basic_istream<_CharT, _Traits>(&__sb_), __sb_(ios_base::in) {}
@@ -663,7 +668,7 @@ public:
basic_istream<_CharT, _Traits>::set_rdbuf(&__sb_);
}
- // 27.8.2.2 Assign and swap:
+ // [istringstream.assign] Assign and swap:
basic_istringstream& operator=(basic_istringstream&& __rhs) {
basic_istream<char_type, traits_type>::operator=(_VSTD::move(__rhs));
__sb_ = _VSTD::move(__rhs.__sb_);
@@ -675,7 +680,7 @@ public:
__sb_.swap(__rhs.__sb_);
}
- // 27.8.2.3 Members:
+ // [istringstream.members] Member functions:
_LIBCPP_INLINE_VISIBILITY
basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const {
return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_);
@@ -699,7 +704,7 @@ swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x,
__x.swap(__y);
}
-// basic_ostringstream
+// Class template basic_ostringstream [ostringstream]
template <class _CharT, class _Traits, class _Allocator>
class _LIBCPP_TEMPLATE_VIS basic_ostringstream
@@ -719,7 +724,7 @@ private:
basic_stringbuf<char_type, traits_type, allocator_type> __sb_;
public:
- // 30.8.4.1 [ostringstream.cons], constructors
+ // [ostringstream.cons] Constructors:
_LIBCPP_INLINE_VISIBILITY
basic_ostringstream()
: basic_ostream<_CharT, _Traits>(&__sb_), __sb_(ios_base::out) {}
@@ -743,7 +748,7 @@ public:
basic_ostream<_CharT, _Traits>::set_rdbuf(&__sb_);
}
- // 27.8.2.2 Assign and swap:
+ // [ostringstream.assign] Assign and swap:
basic_ostringstream& operator=(basic_ostringstream&& __rhs) {
basic_ostream<char_type, traits_type>::operator=(_VSTD::move(__rhs));
__sb_ = _VSTD::move(__rhs.__sb_);
@@ -756,7 +761,7 @@ public:
__sb_.swap(__rhs.__sb_);
}
- // 27.8.2.3 Members:
+ // [ostringstream.members] Member functions:
_LIBCPP_INLINE_VISIBILITY
basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const {
return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_);
@@ -780,7 +785,7 @@ swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x,
__x.swap(__y);
}
-// basic_stringstream
+// Class template basic_stringstream [stringstream]
template <class _CharT, class _Traits, class _Allocator>
class _LIBCPP_TEMPLATE_VIS basic_stringstream
@@ -800,7 +805,7 @@ private:
basic_stringbuf<char_type, traits_type, allocator_type> __sb_;
public:
- // 30.8.5.1 [stringstream.cons], constructors
+ // [stringstream.cons] constructors
_LIBCPP_INLINE_VISIBILITY
basic_stringstream()
: basic_iostream<_CharT, _Traits>(&__sb_), __sb_(ios_base::in | ios_base::out) {}
@@ -824,7 +829,7 @@ public:
basic_istream<_CharT, _Traits>::set_rdbuf(&__sb_);
}
- // 27.8.2.2 Assign and swap:
+ // [stringstream.assign] Assign and swap:
basic_stringstream& operator=(basic_stringstream&& __rhs) {
basic_iostream<char_type, traits_type>::operator=(_VSTD::move(__rhs));
__sb_ = _VSTD::move(__rhs.__sb_);
@@ -836,7 +841,7 @@ public:
__sb_.swap(__rhs.__sb_);
}
- // 27.8.2.3 Members:
+ // [stringstream.members] Member functions:
_LIBCPP_INLINE_VISIBILITY
basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const {
return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_);
diff --git a/contrib/libs/cxxsupp/libcxx/include/stack b/contrib/libs/cxxsupp/libcxx/include/stack
index 86435c4559..2abbcd025c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/stack
+++ b/contrib/libs/cxxsupp/libcxx/include/stack
@@ -107,11 +107,9 @@ template <class T, class Container>
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <functional>
-#endif
-
// standard-mandated includes
+
+// [stack.syn]
#include <compare>
#include <initializer_list>
@@ -363,4 +361,9 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocator<stack<_Tp, _Container>, _Alloc>
_LIBCPP_END_NAMESPACE_STD
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <functional>
+#endif
+
#endif // _LIBCPP_STACK
diff --git a/contrib/libs/cxxsupp/libcxx/include/stdbool.h b/contrib/libs/cxxsupp/libcxx/include/stdbool.h
index 0bc1aa8304..74869b46d5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/stdbool.h
+++ b/contrib/libs/cxxsupp/libcxx/include/stdbool.h
@@ -6,6 +6,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP_STDBOOL_H
#define _LIBCPP_STDBOOL_H
@@ -24,7 +25,9 @@ Macros:
# pragma GCC system_header
#endif
-#include_next <stdbool.h>
+#if __has_include_next(<stdbool.h>)
+# include_next <stdbool.h>
+#endif
#ifdef __cplusplus
#undef bool
diff --git a/contrib/libs/cxxsupp/libcxx/include/stddef.h b/contrib/libs/cxxsupp/libcxx/include/stddef.h
index 19e344f2a0..f1725db062 100644
--- a/contrib/libs/cxxsupp/libcxx/include/stddef.h
+++ b/contrib/libs/cxxsupp/libcxx/include/stddef.h
@@ -42,7 +42,9 @@ Types:
# pragma GCC system_header
#endif
-#include_next <stddef.h>
+# if __has_include_next(<stddef.h>)
+# include_next <stddef.h>
+# endif
#ifdef __cplusplus
typedef decltype(nullptr) nullptr_t;
diff --git a/contrib/libs/cxxsupp/libcxx/include/stdexcept b/contrib/libs/cxxsupp/libcxx/include/stdexcept
index ee5a296cd9..68de6ced17 100644
--- a/contrib/libs/cxxsupp/libcxx/include/stdexcept
+++ b/contrib/libs/cxxsupp/libcxx/include/stdexcept
@@ -87,9 +87,9 @@ public:
logic_error(const logic_error&) _NOEXCEPT;
logic_error& operator=(const logic_error&) _NOEXCEPT;
- virtual ~logic_error() _NOEXCEPT;
+ ~logic_error() _NOEXCEPT override;
- virtual const char* what() const _NOEXCEPT;
+ const char* what() const _NOEXCEPT override;
#else
public:
explicit logic_error(const _VSTD::string&); // Symbol uses versioned std::string
@@ -110,9 +110,9 @@ public:
runtime_error(const runtime_error&) _NOEXCEPT;
runtime_error& operator=(const runtime_error&) _NOEXCEPT;
- virtual ~runtime_error() _NOEXCEPT;
+ ~runtime_error() _NOEXCEPT override;
- virtual const char* what() const _NOEXCEPT;
+ const char* what() const _NOEXCEPT override;
#else
public:
explicit runtime_error(const _VSTD::string&); // Symbol uses versioned std::string
@@ -129,7 +129,7 @@ public:
#ifndef _LIBCPP_ABI_VCRUNTIME
domain_error(const domain_error&) _NOEXCEPT = default;
- virtual ~domain_error() _NOEXCEPT;
+ ~domain_error() _NOEXCEPT override;
#endif
};
@@ -142,7 +142,7 @@ public:
#ifndef _LIBCPP_ABI_VCRUNTIME
invalid_argument(const invalid_argument&) _NOEXCEPT = default;
- virtual ~invalid_argument() _NOEXCEPT;
+ ~invalid_argument() _NOEXCEPT override;
#endif
};
@@ -154,7 +154,7 @@ public:
_LIBCPP_INLINE_VISIBILITY explicit length_error(const char* __s) : logic_error(__s) {}
#ifndef _LIBCPP_ABI_VCRUNTIME
length_error(const length_error&) _NOEXCEPT = default;
- virtual ~length_error() _NOEXCEPT;
+ ~length_error() _NOEXCEPT override;
#endif
};
@@ -167,7 +167,7 @@ public:
#ifndef _LIBCPP_ABI_VCRUNTIME
out_of_range(const out_of_range&) _NOEXCEPT = default;
- virtual ~out_of_range() _NOEXCEPT;
+ ~out_of_range() _NOEXCEPT override;
#endif
};
@@ -180,7 +180,7 @@ public:
#ifndef _LIBCPP_ABI_VCRUNTIME
range_error(const range_error&) _NOEXCEPT = default;
- virtual ~range_error() _NOEXCEPT;
+ ~range_error() _NOEXCEPT override;
#endif
};
@@ -193,7 +193,7 @@ public:
#ifndef _LIBCPP_ABI_VCRUNTIME
overflow_error(const overflow_error&) _NOEXCEPT = default;
- virtual ~overflow_error() _NOEXCEPT;
+ ~overflow_error() _NOEXCEPT override;
#endif
};
@@ -206,7 +206,7 @@ public:
#ifndef _LIBCPP_ABI_VCRUNTIME
underflow_error(const underflow_error&) _NOEXCEPT = default;
- virtual ~underflow_error() _NOEXCEPT;
+ ~underflow_error() _NOEXCEPT override;
#endif
};
diff --git a/contrib/libs/cxxsupp/libcxx/include/stdint.h b/contrib/libs/cxxsupp/libcxx/include/stdint.h
index ee71f62ab0..fa7b011c71 100644
--- a/contrib/libs/cxxsupp/libcxx/include/stdint.h
+++ b/contrib/libs/cxxsupp/libcxx/include/stdint.h
@@ -120,6 +120,8 @@ Macros:
# define __STDC_CONSTANT_MACROS
#endif
-#include_next <stdint.h>
+#if __has_include_next(<stdint.h>)
+# include_next <stdint.h>
+#endif
#endif // _LIBCPP_STDINT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/stdio.h b/contrib/libs/cxxsupp/libcxx/include/stdio.h
index ad1b4c05f1..cea43aa768 100644
--- a/contrib/libs/cxxsupp/libcxx/include/stdio.h
+++ b/contrib/libs/cxxsupp/libcxx/include/stdio.h
@@ -104,7 +104,9 @@ void perror(const char* s);
# pragma GCC system_header
#endif
-#include_next <stdio.h>
+# if __has_include_next(<stdio.h>)
+# include_next <stdio.h>
+# endif
#ifdef __cplusplus
diff --git a/contrib/libs/cxxsupp/libcxx/include/stdlib.h b/contrib/libs/cxxsupp/libcxx/include/stdlib.h
index e4dce9c545..64581b67f2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/stdlib.h
+++ b/contrib/libs/cxxsupp/libcxx/include/stdlib.h
@@ -90,7 +90,9 @@ void *aligned_alloc(size_t alignment, size_t size); // C11
# pragma GCC system_header
#endif
-#include_next <stdlib.h>
+# if __has_include_next(<stdlib.h>)
+# include_next <stdlib.h>
+# endif
#ifdef __cplusplus
extern "C++" {
diff --git a/contrib/libs/cxxsupp/libcxx/include/streambuf b/contrib/libs/cxxsupp/libcxx/include/streambuf
index 53a71720f1..d473df1034 100644
--- a/contrib/libs/cxxsupp/libcxx/include/streambuf
+++ b/contrib/libs/cxxsupp/libcxx/include/streambuf
@@ -489,10 +489,12 @@ basic_streambuf<_CharT, _Traits>::overflow(int_type)
}
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<char>;
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<wchar_t>;
-
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<char>;
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<wchar_t>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<wchar_t>;
+#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/string b/contrib/libs/cxxsupp/libcxx/include/string
index 5f8b119cf6..bbb1c1a859 100644
--- a/contrib/libs/cxxsupp/libcxx/include/string
+++ b/contrib/libs/cxxsupp/libcxx/include/string
@@ -13,6 +13,9 @@
/*
string synopsis
+#include <compare>
+#include <initializer_list>
+
namespace std
{
@@ -43,11 +46,13 @@ template <class stateT> bool operator!=(const fpos<stateT>& x, const fpos<stateT
template <class charT>
struct char_traits
{
- typedef charT char_type;
- typedef ... int_type;
- typedef streamoff off_type;
- typedef streampos pos_type;
- typedef mbstate_t state_type;
+ using char_type = charT;
+ using int_type = ...;
+ using off_type = streamoff;
+ using pos_type = streampos;
+ using state_type = mbstate_t;
+ using comparison_category = strong_ordering; // Since C++20 only for the specializations
+ // char, wchar_t, char8_t, char16_t, and char32_t.
static void assign(char_type& c1, const char_type& c2) noexcept;
static constexpr bool eq(char_type c1, char_type c2) noexcept;
@@ -104,6 +109,10 @@ public:
const allocator_type& a = allocator_type()); // constexpr since C++20
basic_string(const basic_string& str, size_type pos, size_type n,
const Allocator& a = Allocator()); // constexpr since C++20
+ constexpr basic_string(
+ basic_string&& str, size_type pos, const Allocator& a = Allocator()); // since C++23
+ constexpr basic_string(
+ basic_string&& str, size_type pos, size_type n, const Allocator& a = Allocator()); // since C++23
template<class T>
basic_string(const T& t, size_type pos, size_type n, const Allocator& a = Allocator()); // C++17, constexpr since C++20
template <class T>
@@ -256,8 +265,9 @@ public:
basic_string& replace(const_iterator i1, const_iterator i2, initializer_list<value_type>); // constexpr since C++20
size_type copy(value_type* s, size_type n, size_type pos = 0) const; // constexpr since C++20
- basic_string substr(size_type pos = 0, size_type n = npos) const; // constexpr since C++20
-
+ basic_string substr(size_type pos = 0, size_type n = npos) const; // constexpr in C++20, removed in C++23
+ basic_string substr(size_type pos = 0, size_type n = npos) const&; // since C++23
+ constexpr basic_string substr(size_type pos = 0, size_type n = npos) &&; // since C++23
void swap(basic_string& str)
noexcept(allocator_traits<allocator_type>::propagate_on_container_swap::value ||
allocator_traits<allocator_type>::is_always_equal::value); // C++17, constexpr since C++20
@@ -370,60 +380,68 @@ bool operator==(const basic_string<charT, traits, Allocator>& lhs,
const basic_string<charT, traits, Allocator>& rhs) noexcept; // constexpr since C++20
template<class charT, class traits, class Allocator>
-bool operator==(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept; // constexpr since C++20
+bool operator==(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
bool operator==(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs) noexcept; // constexpr since C++20
template<class charT, class traits, class Allocator>
bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
- const basic_string<charT, traits, Allocator>& rhs) noexcept; // constexpr since C++20
+ const basic_string<charT, traits, Allocator>& rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
-bool operator!=(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept; // constexpr since C++20
+bool operator!=(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
-bool operator!=(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept; // constexpr since C++20
+bool operator!=(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
bool operator< (const basic_string<charT, traits, Allocator>& lhs,
- const basic_string<charT, traits, Allocator>& rhs) noexcept; // constexpr since C++20
+ const basic_string<charT, traits, Allocator>& rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
-bool operator< (const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept; // constexpr since C++20
+bool operator< (const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
-bool operator< (const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept; // constexpr since C++20
+bool operator< (const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
bool operator> (const basic_string<charT, traits, Allocator>& lhs,
- const basic_string<charT, traits, Allocator>& rhs) noexcept; // constexpr since C++20
+ const basic_string<charT, traits, Allocator>& rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
-bool operator> (const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept; // constexpr since C++20
+bool operator> (const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
-bool operator> (const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept; // constexpr since C++20
+bool operator> (const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
bool operator<=(const basic_string<charT, traits, Allocator>& lhs,
- const basic_string<charT, traits, Allocator>& rhs) noexcept; // constexpr since C++20
+ const basic_string<charT, traits, Allocator>& rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
-bool operator<=(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept; // constexpr since C++20
+bool operator<=(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
-bool operator<=(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept; // constexpr since C++20
+bool operator<=(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
bool operator>=(const basic_string<charT, traits, Allocator>& lhs,
- const basic_string<charT, traits, Allocator>& rhs) noexcept; // constexpr since C++20
+ const basic_string<charT, traits, Allocator>& rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
-bool operator>=(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept; // constexpr since C++20
+bool operator>=(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept; // removed in C++20
template<class charT, class traits, class Allocator>
-bool operator>=(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept; // constexpr since C++20
+bool operator>=(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept; // removed in C++20
+
+template<class charT, class traits, class Allocator> // since C++20
+constexpr see below operator<=>(const basic_string<charT, traits, Allocator>& lhs,
+ const basic_string<charT, traits, Allocator>& rhs) noexcept;
+
+template<class charT, class traits, class Allocator> // since C++20
+constexpr see below operator<=>(const basic_string<charT, traits, Allocator>& lhs,
+ const charT* rhs) noexcept;
template<class charT, class traits, class Allocator>
void swap(basic_string<charT, traits, Allocator>& lhs,
@@ -526,15 +544,24 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len );
#include <__format/enable_insertable.h>
#include <__functional/hash.h>
#include <__functional/unary_function.h>
+#include <__fwd/string.h>
#include <__ios/fpos.h>
#include <__iterator/distance.h>
#include <__iterator/iterator_traits.h>
#include <__iterator/reverse_iterator.h>
#include <__iterator/wrap_iter.h>
#include <__memory/allocate_at_least.h>
+#include <__memory/allocator.h>
+#include <__memory/allocator_traits.h>
+#include <__memory/compressed_pair.h>
+#include <__memory/construct_at.h>
+#include <__memory/pointer_traits.h>
#include <__memory/swap_allocator.h>
+#include <__memory_resource/polymorphic_allocator.h>
#include <__string/char_traits.h>
#include <__string/extern_template_lists.h>
+#include <__type_traits/is_allocator.h>
+#include <__type_traits/noexcept_move_assign_container.h>
#include <__utility/auto_cast.h>
#include <__utility/move.h>
#include <__utility/swap.h>
@@ -544,9 +571,7 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len );
#include <cstdio> // EOF
#include <cstdlib>
#include <cstring>
-#include <iosfwd>
#include <limits>
-#include <memory>
#include <stdexcept>
#include <string_view>
#include <type_traits>
@@ -556,16 +581,6 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len );
# include <cwchar>
#endif
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <algorithm>
-# include <functional>
-# include <iterator>
-# include <new>
-# include <typeinfo>
-# include <utility>
-# include <vector>
-#endif
-
// standard-mandated includes
// [iterator.range]
@@ -593,27 +608,27 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template<class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
operator+(const basic_string<_CharT, _Traits, _Allocator>& __x,
const basic_string<_CharT, _Traits, _Allocator>& __y);
template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDDEN _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const _CharT* __x, const basic_string<_CharT,_Traits,_Allocator>& __y);
template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(_CharT __x, const basic_string<_CharT,_Traits,_Allocator>& __y);
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, const _CharT* __y);
template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, _CharT __y);
@@ -636,23 +651,10 @@ struct __can_be_converted_to_string_view : public _BoolConstant<
!is_convertible<const _Tp&, const _CharT*>::value
> {};
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
-typedef basic_string<char8_t> u8string;
-#endif
-typedef basic_string<char16_t> u16string;
-typedef basic_string<char32_t> u32string;
-
struct __uninitialized_size_tag {};
template<class _CharT, class _Traits, class _Allocator>
-class
- _LIBCPP_TEMPLATE_VIS
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
- _LIBCPP_PREFERRED_NAME(u8string)
-#endif
- _LIBCPP_PREFERRED_NAME(u16string)
- _LIBCPP_PREFERRED_NAME(u32string)
- basic_string
+class basic_string
{
static_assert(sizeof(_CharT) <= 4, "libc++ implementation of std::basic_string does not support extra-wide character types");
public:
@@ -677,10 +679,15 @@ public:
static_assert(( is_same<typename allocator_type::value_type, value_type>::value),
"Allocator::value_type must be same type as value_type");
+ static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
+ "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
+ "original allocator");
+
#if _YNDX_LIBCPP_MAKE_STRING_ITERATOR_POINTERS == 1
typedef pointer iterator;
typedef const_pointer const_iterator;
#else
+ // TODO: Implement iterator bounds checking without requiring the global database.
typedef __wrap_iter<pointer> iterator;
typedef __wrap_iter<const_pointer> const_iterator;
#endif
@@ -793,13 +800,13 @@ private:
// Construct a string with the given allocator and enough storage to hold `__size` characters, but
// don't initialize the characters. The contents of the string, including the null terminator, must be
// initialized separately.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
explicit basic_string(__uninitialized_size_tag, size_type __size, const allocator_type& __a)
: __r_(__default_init_tag(), __a) {
if (__size > max_size())
__throw_length_error();
if (__fits_in_sso(__size)) {
- __zero();
+ __r_.first() = __rep();
__set_short_size(__size);
} else {
auto __capacity = __recommend(__size) + 1;
@@ -812,198 +819,308 @@ private:
std::__debug_db_insert_c(this);
}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator __make_iterator(pointer __p) {
+ return iterator(this, __p);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_iterator __make_const_iterator(const_pointer __p) const {
+ return const_iterator(this, __p);
+ }
+
public:
- _LIBCPP_TEMPLATE_DATA_VIS
- static const size_type npos = -1;
+ _LIBCPP_TEMPLATE_DATA_VIS static const size_type npos = -1;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string()
- _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string()
+ _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
+ : __r_(__default_init_tag(), __default_init_tag()) {
+ std::__debug_db_insert_c(this);
+ __default_init();
+ }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit basic_string(const allocator_type& __a)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const allocator_type& __a)
#if _LIBCPP_STD_VER <= 14
- _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value);
+ _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
#else
- _NOEXCEPT;
+ _NOEXCEPT
#endif
+ : __r_(__default_init_tag(), __a) {
+ std::__debug_db_insert_c(this);
+ __default_init();
+ }
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string(const basic_string& __str);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string(const basic_string& __str, const allocator_type& __a);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const basic_string& __str);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const basic_string& __str, const allocator_type& __a);
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(basic_string&& __str)
-#if _LIBCPP_STD_VER <= 14
- _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
-#else
- _NOEXCEPT;
-#endif
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(basic_string&& __str)
+# if _LIBCPP_STD_VER <= 14
+ _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
+# else
+ _NOEXCEPT
+# endif
+ : __r_(std::move(__str.__r_)) {
+ __str.__default_init();
+ std::__debug_db_insert_c(this);
+ if (__is_long())
+ std::__debug_db_swap(this, &__str);
+ }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(basic_string&& __str, const allocator_type& __a);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(basic_string&& __str, const allocator_type& __a)
+ : __r_(__default_init_tag(), __a) {
+ if (__str.__is_long() && __a != __str.__alloc()) // copy, not move
+ __init(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size());
+ else {
+ if (__libcpp_is_constant_evaluated())
+ __r_.first() = __rep();
+ __r_.first() = __str.__r_.first();
+ __str.__default_init();
+ }
+ std::__debug_db_insert_c(this);
+ if (__is_long())
+ std::__debug_db_swap(this, &__str);
+ }
#endif // _LIBCPP_CXX03_LANG
- template <class = __enable_if_t<__is_allocator<_Allocator>::value, nullptr_t> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(const _CharT* __s) : __r_(__default_init_tag(), __default_init_tag()) {
- _LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*) detected nullptr");
- __init(__s, traits_type::length(__s));
- std::__debug_db_insert_c(this);
- }
+ template <class = __enable_if_t<__is_allocator<_Allocator>::value, nullptr_t> >
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s)
+ : __r_(__default_init_tag(), __default_init_tag()) {
+ _LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*) detected nullptr");
+ __init(__s, traits_type::length(__s));
+ std::__debug_db_insert_c(this);
+ }
- template <class = __enable_if_t<__is_allocator<_Allocator>::value, nullptr_t> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(const _CharT* __s, const _Allocator& __a);
+ template <class = __enable_if_t<__is_allocator<_Allocator>::value, nullptr_t> >
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s, const _Allocator& __a);
#if _LIBCPP_STD_VER > 17
- basic_string(nullptr_t) = delete;
+ basic_string(nullptr_t) = delete;
#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(nullptr_t, size_t) = delete;
-
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(const _CharT* __s, size_type __n);
-
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(nullptr_t, size_t, const _Allocator&) = delete;
-
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(const _CharT* __s, size_type __n, const _Allocator& __a);
-
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(size_type __n, _CharT __c);
-
- template <class = __enable_if_t<__is_allocator<_Allocator>::value, nullptr_t> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(size_type __n, _CharT __c, const _Allocator& __a);
-
- _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(const basic_string& __str, size_type __pos, size_type __n,
- const _Allocator& __a = _Allocator());
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(const basic_string& __str, size_type __pos,
- const _Allocator& __a = _Allocator());
-
- template<class _Tp, class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value> >
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(const _Tp& __t, size_type __pos, size_type __n,
- const allocator_type& __a = allocator_type());
-
- template<class _Tp, class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
- !__is_same_uncvref<_Tp, basic_string>::value> >
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
- explicit basic_string(const _Tp& __t);
-
- template<class _Tp, class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value> >
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
- explicit basic_string(const _Tp& __t, const allocator_type& __a);
-
- template<class _InputIterator, class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(_InputIterator __first, _InputIterator __last);
- template<class _InputIterator, class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
+ basic_string(nullptr_t, size_t) = delete;
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s, size_type __n)
+ : __r_(__default_init_tag(), __default_init_tag()) {
+ _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n) detected nullptr");
+ __init(__s, __n);
+ std::__debug_db_insert_c(this);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
+ basic_string(nullptr_t, size_t, const _Allocator&) = delete;
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
+ basic_string(const _CharT* __s, size_type __n, const _Allocator& __a)
+ : __r_(__default_init_tag(), __a) {
+ _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n, allocator) detected nullptr");
+ __init(__s, __n);
+ std::__debug_db_insert_c(this);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(size_type __n, _CharT __c)
+ : __r_(__default_init_tag(), __default_init_tag()) {
+ __init(__n, __c);
+ std::__debug_db_insert_c(this);
+ }
+
+#if _LIBCPP_STD_VER > 20
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ basic_string(basic_string&& __str, size_type __pos, const _Allocator& __alloc = _Allocator())
+ : basic_string(std::move(__str), __pos, npos, __alloc) {}
+
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ basic_string(basic_string&& __str, size_type __pos, size_type __n, const _Allocator& __alloc = _Allocator())
+ : __r_(__default_init_tag(), __alloc) {
+ if (__pos > __str.size())
+ __throw_out_of_range();
+
+ auto __len = std::min<size_type>(__n, __str.size() - __pos);
+ if (__alloc_traits::is_always_equal::value || __alloc == __str.__alloc()) {
+ __r_.first() = __str.__r_.first();
+ __str.__default_init();
+
+ _Traits::move(data(), data() + __pos, __len);
+ __set_size(__len);
+ _Traits::assign(data()[__len], value_type());
+ } else {
+ // Perform a copy because the allocators are not compatible.
+ __init(__str.data() + __pos, __len);
+ }
+
+ std::__debug_db_insert_c(this);
+ if (__is_long())
+ std::__debug_db_swap(this, &__str);
+ }
+#endif
+
+ template <class = __enable_if_t<__is_allocator<_Allocator>::value, nullptr_t> >
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(size_type __n, _CharT __c, const _Allocator& __a);
+
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
+ basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Allocator& __a = _Allocator());
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
+ basic_string(const basic_string& __str, size_type __pos, const _Allocator& __a = _Allocator())
+ : __r_(__default_init_tag(), __a) {
+ size_type __str_sz = __str.size();
+ if (__pos > __str_sz)
+ __throw_out_of_range();
+ __init(__str.data() + __pos, __str_sz - __pos);
+ std::__debug_db_insert_c(this);
+ }
+
+ template <class _Tp,
+ class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
+ !__is_same_uncvref<_Tp, basic_string>::value> >
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
+ basic_string(const _Tp& __t, size_type __pos, size_type __n, const allocator_type& __a = allocator_type());
+
+ template <class _Tp,
+ class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
+ !__is_same_uncvref<_Tp, basic_string>::value> >
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(
+ const _Tp& __t);
+
+ template <class _Tp,
+ class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
+ !__is_same_uncvref<_Tp, basic_string>::value> >
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(
+ const _Tp& __t, const allocator_type& __a);
+
+ template <class _InputIterator, class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value> >
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(_InputIterator __first, _InputIterator __last)
+ : __r_(__default_init_tag(), __default_init_tag()) {
+ __init(__first, __last);
+ std::__debug_db_insert_c(this);
+ }
+
+ template <class _InputIterator, class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value> >
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
+ basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a)
+ : __r_(__default_init_tag(), __a) {
+ __init(__first, __last);
+ std::__debug_db_insert_c(this);
+ }
+
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(initializer_list<_CharT> __il);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string(initializer_list<_CharT> __il, const _Allocator& __a);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(initializer_list<_CharT> __il)
+ : __r_(__default_init_tag(), __default_init_tag()) {
+ __init(__il.begin(), __il.end());
+ std::__debug_db_insert_c(this);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(initializer_list<_CharT> __il, const _Allocator& __a)
+ : __r_(__default_init_tag(), __a) {
+ __init(__il.begin(), __il.end());
+ std::__debug_db_insert_c(this);
+ }
#endif // _LIBCPP_CXX03_LANG
- inline _LIBCPP_CONSTEXPR_AFTER_CXX17 ~basic_string();
+ inline _LIBCPP_CONSTEXPR_SINCE_CXX20 ~basic_string();
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
operator __self_view() const _NOEXCEPT { return __self_view(data(), size()); }
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& operator=(const basic_string& __str);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(const basic_string& __str);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& operator=(nullptr_t) = delete;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(nullptr_t) = delete;
template <class _Tp, class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
!__is_same_uncvref<_Tp, basic_string>::value> >
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& operator=(const _Tp& __t) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(const _Tp& __t) {
__self_view __sv = __t;
return assign(__sv);
}
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string& operator=(basic_string&& __str)
- _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(basic_string&& __str)
+ _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value)) {
+ __move_assign(__str, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignment::value>());
+ return *this;
+ }
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string& operator=(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string& operator=(const value_type* __s) {return assign(__s);}
#if _LIBCPP_STD_VER > 20
basic_string& operator=(nullptr_t) = delete;
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& operator=(value_type __c);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(value_type __c);
#ifndef _YNDX_LIBCPP_MAKE_STRING_ITERATOR_POINTERS == 1
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
iterator begin() _NOEXCEPT
- {return iterator(this, __get_pointer());}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ {return __make_iterator(__get_pointer());}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_iterator begin() const _NOEXCEPT
- {return const_iterator(this, __get_pointer());}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ {return __make_const_iterator(__get_pointer());}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
iterator end() _NOEXCEPT
- {return iterator(this, __get_pointer() + size());}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ {return __make_iterator(__get_pointer() + size());}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_iterator end() const _NOEXCEPT
- {return const_iterator(this, __get_pointer() + size());}
+ {return __make_const_iterator(__get_pointer() + size());}
#else
// It is necessary to keep the list of constructors matching the one above it.
// Made to support pointer iterators
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
iterator begin() _NOEXCEPT
{return iterator(__get_pointer());}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_iterator begin() const _NOEXCEPT
{return const_iterator(__get_pointer());}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
iterator end() _NOEXCEPT
{return iterator(__get_pointer() + size());}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_iterator end() const _NOEXCEPT
{return const_iterator(__get_pointer() + size());}
#endif // _YNDX_LIBCPP_MAKE_STRING_ITERATOR_POINTERS == 1
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
reverse_iterator rbegin() _NOEXCEPT
{return reverse_iterator(end());}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_reverse_iterator rbegin() const _NOEXCEPT
{return const_reverse_iterator(end());}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
reverse_iterator rend() _NOEXCEPT
{return reverse_iterator(begin());}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_reverse_iterator rend() const _NOEXCEPT
{return const_reverse_iterator(begin());}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_iterator cbegin() const _NOEXCEPT
{return begin();}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_iterator cend() const _NOEXCEPT
{return end();}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_reverse_iterator crbegin() const _NOEXCEPT
{return rbegin();}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_reverse_iterator crend() const _NOEXCEPT
{return rend();}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type size() const _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type size() const _NOEXCEPT
{return __is_long() ? __get_long_size() : __get_short_size();}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type length() const _NOEXCEPT {return size();}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type max_size() const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type capacity() const _NOEXCEPT {
- return (__is_long() ? __get_long_cap() : static_cast<size_type>(__min_cap)) - 1;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type length() const _NOEXCEPT {return size();}
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type max_size() const _NOEXCEPT {
+ size_type __m = __alloc_traits::max_size(__alloc());
+ if (__m <= std::numeric_limits<size_type>::max() / 2) {
+ return __m - __alignment;
+ } else {
+ bool __uses_lsb = __endian_factor == 2;
+ return __uses_lsb ? __m - __alignment : (__m / 2) - __alignment;
}
+ }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type capacity() const _NOEXCEPT {
+ return (__is_long() ? __get_long_cap() : static_cast<size_type>(__min_cap)) - 1;
+ }
#if _YNDX_LIBCXX_ENABLE_STRING_RESIZE_UNINITIALIZED == 1
inline void resize_uninitialized(size_type __n)
@@ -1012,10 +1129,10 @@ public:
}
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void resize(size_type __n, value_type __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void resize(size_type __n) { resize(__n, value_type()); }
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void resize(size_type __n, value_type __c);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void resize(size_type __n) { resize(__n, value_type()); }
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void reserve(size_type __requested_capacity);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void reserve(size_type __requested_capacity);
#if _LIBCPP_STD_VER > 20
template <class _Op>
@@ -1026,28 +1143,34 @@ public:
}
#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __resize_default_init(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __resize_default_init(size_type __n);
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI void reserve() _NOEXCEPT { shrink_to_fit(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void clear() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void shrink_to_fit() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void clear() _NOEXCEPT;
- _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
bool empty() const _NOEXCEPT {return size() == 0;}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- const_reference operator[](size_type __pos) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 reference operator[](size_type __pos) _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference operator[](size_type __pos) const _NOEXCEPT {
+ _LIBCPP_ASSERT(__pos <= size(), "string index out of bounds");
+ return *(data() + __pos);
+ }
- _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference at(size_type __n) const;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 reference at(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference operator[](size_type __pos) _NOEXCEPT {
+ _LIBCPP_ASSERT(__pos <= size(), "string index out of bounds");
+ return *(__get_pointer() + __pos);
+ }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& operator+=(const basic_string& __str) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference at(size_type __n) const;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 reference at(size_type __n);
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator+=(const basic_string& __str) {
return append(__str);
}
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
@@ -1058,35 +1181,36 @@ public:
__self_view __sv = __t; return append(__sv);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& operator+=(const value_type* __s) {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator+=(const value_type* __s) {
return append(__s);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& operator+=(value_type __c) {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator+=(value_type __c) {
push_back(__c);
return *this;
}
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string& operator+=(initializer_list<value_type> __il) { return append(__il); }
#endif // _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string& append(const basic_string& __str);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const basic_string& __str) {
+ return append(__str.data(), __str.size());
+ }
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
&& !__is_same_uncvref<_Tp, basic_string>::value,
basic_string&
>
append(const _Tp& __t) { __self_view __sv = __t; return append(__sv.data(), __sv.size()); }
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& append(const basic_string& __str, size_type __pos, size_type __n=npos);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const basic_string& __str, size_type __pos, size_type __n=npos);
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
@@ -1094,11 +1218,11 @@ public:
basic_string&
>
append(const _Tp& __t, size_type __pos, size_type __n=npos);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& append(const value_type* __s, size_type __n);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& append(const value_type* __s);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& append(size_type __n, value_type __c);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const value_type* __s, size_type __n);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const value_type* __s);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(size_type __n, value_type __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __append_default_init(size_type __n);
template<class _InputIterator>
@@ -1108,7 +1232,7 @@ public:
__is_exactly_cpp17_input_iterator<_InputIterator>::value,
basic_string&
>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
append(_InputIterator __first, _InputIterator __last) {
const basic_string __temp(__first, __last, __alloc());
append(__temp.data(), __temp.size());
@@ -1121,40 +1245,56 @@ public:
__is_cpp17_forward_iterator<_ForwardIterator>::value,
basic_string&
>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
append(_ForwardIterator __first, _ForwardIterator __last);
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string& append(initializer_list<value_type> __il) {return append(__il.begin(), __il.size());}
#endif // _LIBCPP_CXX03_LANG
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void push_back(value_type __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void pop_back();
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 reference front() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference front() const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 reference back() _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference back() const _NOEXCEPT;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void push_back(value_type __c);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void pop_back();
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference front() _NOEXCEPT {
+ _LIBCPP_ASSERT(!empty(), "string::front(): string is empty");
+ return *__get_pointer();
+ }
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference front() const _NOEXCEPT {
+ _LIBCPP_ASSERT(!empty(), "string::front(): string is empty");
+ return *data();
+ }
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference back() _NOEXCEPT {
+ _LIBCPP_ASSERT(!empty(), "string::back(): string is empty");
+ return *(__get_pointer() + size() - 1);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference back() const _NOEXCEPT {
+ _LIBCPP_ASSERT(!empty(), "string::back(): string is empty");
+ return *(data() + size() - 1);
+ }
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
basic_string&
>
assign(const _Tp & __t) { __self_view __sv = __t; return assign(__sv.data(), __sv.size()); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string& assign(const basic_string& __str) { return *this = __str; }
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string& assign(basic_string&& __str)
_NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value))
{*this = std::move(__str); return *this;}
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& assign(const basic_string& __str, size_type __pos, size_type __n=npos);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const basic_string& __str, size_type __pos, size_type __n=npos);
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
@@ -1162,11 +1302,11 @@ public:
basic_string&
>
assign(const _Tp & __t, size_type __pos, size_type __n=npos);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& assign(const value_type* __s, size_type __n);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& assign(const value_type* __s);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& assign(size_type __n, value_type __c);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const value_type* __s, size_type __n);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const value_type* __s);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(size_type __n, value_type __c);
template<class _InputIterator>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_exactly_cpp17_input_iterator<_InputIterator>::value,
@@ -1174,7 +1314,7 @@ public:
>
assign(_InputIterator __first, _InputIterator __last);
template<class _ForwardIterator>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -1182,15 +1322,17 @@ public:
>
assign(_ForwardIterator __first, _ForwardIterator __last);
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string& assign(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
#endif // _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string& insert(size_type __pos1, const basic_string& __str);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ insert(size_type __pos1, const basic_string& __str) {
+ return insert(__pos1, __str.data(), __str.size());
+ }
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -1200,23 +1342,31 @@ public:
{ __self_view __sv = __t; return insert(__pos1, __sv.data(), __sv.size()); }
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value,
basic_string&
>
insert(size_type __pos1, const _Tp& __t, size_type __pos2, size_type __n=npos);
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n=npos);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& insert(size_type __pos, const value_type* __s, size_type __n);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& insert(size_type __pos, const value_type* __s);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& insert(size_type __pos, size_type __n, value_type __c);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __pos, value_type __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- iterator insert(const_iterator __pos, size_type __n, value_type __c);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& insert(size_type __pos, const value_type* __s, size_type __n);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& insert(size_type __pos, const value_type* __s);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& insert(size_type __pos, size_type __n, value_type __c);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator insert(const_iterator __pos, value_type __c);
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator
+ insert(const_iterator __pos, size_type __n, value_type __c) {
+ _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
+ "string::insert(iterator, n, value) called with an iterator not referring to this string");
+ difference_type __p = __pos - begin();
+ insert(static_cast<size_type>(__p), __n, __c);
+ return begin() + __p;
+ }
+
template<class _InputIterator>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_exactly_cpp17_input_iterator<_InputIterator>::value,
@@ -1224,7 +1374,7 @@ public:
>
insert(const_iterator __pos, _InputIterator __first, _InputIterator __last);
template<class _ForwardIterator>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -1232,47 +1382,53 @@ public:
>
insert(const_iterator __pos, _ForwardIterator __first, _ForwardIterator __last);
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
iterator insert(const_iterator __pos, initializer_list<value_type> __il)
{return insert(__pos, __il.begin(), __il.end());}
#endif // _LIBCPP_CXX03_LANG
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& erase(size_type __pos = 0, size_type __n = npos);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& erase(size_type __pos = 0, size_type __n = npos);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
iterator erase(const_iterator __pos);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
iterator erase(const_iterator __first, const_iterator __last);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ replace(size_type __pos1, size_type __n1, const basic_string& __str) {
+ return replace(__pos1, __n1, __str.data(), __str.size());
+ }
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
basic_string&
>
replace(size_type __pos1, size_type __n1, const _Tp& __t) { __self_view __sv = __t; return replace(__pos1, __n1, __sv.data(), __sv.size()); }
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2=npos);
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value,
basic_string&
>
replace(size_type __pos1, size_type __n1, const _Tp& __t, size_type __pos2, size_type __n2=npos);
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string& replace(size_type __pos, size_type __n1, const value_type* __s, size_type __n2);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& replace(size_type __pos, size_type __n1, const value_type* __s);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& replace(size_type __pos, size_type __n1, size_type __n2, value_type __c);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string& replace(const_iterator __i1, const_iterator __i2, const basic_string& __str);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& replace(size_type __pos, size_type __n1, const value_type* __s);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& replace(size_type __pos, size_type __n1, size_type __n2, value_type __c);
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ replace(const_iterator __i1, const_iterator __i2, const basic_string& __str) {
+ return replace(
+ static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __str.data(), __str.size());
+ }
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -1280,14 +1436,23 @@ public:
>
replace(const_iterator __i1, const_iterator __i2, const _Tp& __t) { __self_view __sv = __t; return replace(__i1 - begin(), __i2 - __i1, __sv); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string& replace(const_iterator __i1, const_iterator __i2, const value_type* __s, size_type __n);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string& replace(const_iterator __i1, const_iterator __i2, const value_type* __s);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string& replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ replace(const_iterator __i1, const_iterator __i2, const value_type* __s, size_type __n) {
+ return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __s, __n);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ replace(const_iterator __i1, const_iterator __i2, const value_type* __s) {
+ return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __s);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
+ replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c) {
+ return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __n, __c);
+ }
+
template<class _InputIterator>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_cpp17_input_iterator<_InputIterator>::value,
@@ -1295,16 +1460,31 @@ public:
>
replace(const_iterator __i1, const_iterator __i2, _InputIterator __j1, _InputIterator __j2);
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string& replace(const_iterator __i1, const_iterator __i2, initializer_list<value_type> __il)
{return replace(__i1, __i2, __il.begin(), __il.end());}
#endif // _LIBCPP_CXX03_LANG
- _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type copy(value_type* __s, size_type __n, size_type __pos = 0) const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- basic_string substr(size_type __pos = 0, size_type __n = npos) const;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type copy(value_type* __s, size_type __n, size_type __pos = 0) const;
+
+#if _LIBCPP_STD_VER <= 20
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
+ basic_string substr(size_type __pos = 0, size_type __n = npos) const {
+ return basic_string(*this, __pos, __n);
+ }
+#else
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ basic_string substr(size_type __pos = 0, size_type __n = npos) const& {
+ return basic_string(*this, __pos, __n);
+ }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ basic_string substr(size_type __pos = 0, size_type __n = npos) && {
+ return basic_string(std::move(*this), __pos, __n);
+ }
+#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void swap(basic_string& __str)
#if _LIBCPP_STD_VER >= 14
_NOEXCEPT;
@@ -1313,129 +1493,129 @@ public:
__is_nothrow_swappable<allocator_type>::value);
#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const value_type* c_str() const _NOEXCEPT {return data();}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const value_type* data() const _NOEXCEPT {return std::__to_address(__get_pointer());}
#if _LIBCPP_STD_VER > 14 || defined(_LIBCPP_BUILDING_LIBRARY)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
value_type* data() _NOEXCEPT {return std::__to_address(__get_pointer());}
#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
allocator_type get_allocator() const _NOEXCEPT {return __alloc();}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
size_type
>
find(const _Tp& __t, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type find(value_type __c, size_type __pos = 0) const _NOEXCEPT;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type find(value_type __c, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type rfind(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
size_type
>
rfind(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type rfind(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type rfind(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type rfind(value_type __c, size_type __pos = npos) const _NOEXCEPT;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type rfind(value_type __c, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_first_of(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
size_type
>
find_first_of(const _Tp& __t, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_first_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_first_of(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_first_of(value_type __c, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_last_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
size_type
>
find_last_of(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_last_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_last_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_last_of(value_type __c, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
size_type
>
find_first_not_of(const _Tp &__t, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_first_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_first_not_of(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_first_not_of(value_type __c, size_type __pos = 0) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
size_type
>
find_last_not_of(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_last_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_last_not_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type find_last_not_of(value_type __c, size_type __pos = npos) const _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
int compare(const basic_string& __str) const _NOEXCEPT;
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -1444,7 +1624,7 @@ public:
compare(const _Tp &__t) const _NOEXCEPT;
template <class _Tp>
- _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -1452,23 +1632,23 @@ public:
>
compare(size_type __pos1, size_type __n1, const _Tp& __t) const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
int compare(size_type __pos1, size_type __n1, const basic_string& __str) const;
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
int compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2,
size_type __n2 = npos) const;
template <class _Tp>
- inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value,
int
>
compare(size_type __pos1, size_type __n1, const _Tp& __t, size_type __pos2, size_type __n2=npos) const;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 int compare(const value_type* __s) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 int compare(size_type __pos1, size_type __n1, const value_type* __s) const;
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 int compare(const value_type* __s) const _NOEXCEPT;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 int compare(size_type __pos1, size_type __n1, const value_type* __s) const;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
int compare(size_type __pos1, size_type __n1, const value_type* __s, size_type __n2) const;
//WARN: disabled std guards in order to allow using these options without switching to new std
@@ -1512,9 +1692,9 @@ public:
{ return __self_view(data(), size()).contains(__s); }
#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool __invariants() const;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __invariants() const;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __clear_and_shrink() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __clear_and_shrink() _NOEXCEPT;
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
@@ -1527,20 +1707,20 @@ public:
private:
template<class _Alloc>
- inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
bool friend operator==(const basic_string<char, char_traits<char>, _Alloc>& __lhs,
const basic_string<char, char_traits<char>, _Alloc>& __rhs) _NOEXCEPT;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __shrink_or_extend(size_type __target_capacity);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __shrink_or_extend(size_type __target_capacity);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
bool __is_long() const _NOEXCEPT {
if (__libcpp_is_constant_evaluated())
return true;
return __r_.first().__s.__is_long_;
}
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __begin_lifetime(pointer __begin, size_type __n) {
+ static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __begin_lifetime(pointer __begin, size_type __n) {
#if _LIBCPP_STD_VER > 17
if (__libcpp_is_constant_evaluated()) {
for (size_type __i = 0; __i != __n; ++__i)
@@ -1552,8 +1732,8 @@ private:
#endif // _LIBCPP_STD_VER > 17
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __default_init() {
- __zero();
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __default_init() {
+ __r_.first() = __rep();
if (__libcpp_is_constant_evaluated()) {
size_type __sz = __recommend(0) + 1;
pointer __ptr = __alloc_traits::allocate(__alloc(), __sz);
@@ -1564,7 +1744,7 @@ private:
}
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __deallocate_constexpr() {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __deallocate_constexpr() {
if (__libcpp_is_constant_evaluated() && __get_pointer() != nullptr)
__alloc_traits::deallocate(__alloc(), __get_pointer(), __get_long_cap());
}
@@ -1575,7 +1755,7 @@ private:
}
template <class _ForwardIterator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
iterator __insert_from_safe_copy(size_type __n, size_type __ip, _ForwardIterator __first, _ForwardIterator __last) {
size_type __sz = size();
size_type __cap = capacity();
@@ -1601,76 +1781,71 @@ private:
return begin() + __ip;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 allocator_type& __alloc() _NOEXCEPT { return __r_.second(); }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 allocator_type& __alloc() _NOEXCEPT { return __r_.second(); }
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const allocator_type& __alloc() const _NOEXCEPT { return __r_.second(); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __set_short_size(size_type __s) _NOEXCEPT {
_LIBCPP_ASSERT(__s < __min_cap, "__s should never be greater than or equal to the short string capacity");
__r_.first().__s.__size_ = __s;
__r_.first().__s.__is_long_ = false;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type __get_short_size() const _NOEXCEPT {
_LIBCPP_ASSERT(!__r_.first().__s.__is_long_, "String has to be short when trying to get the short size");
return __r_.first().__s.__size_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __set_long_size(size_type __s) _NOEXCEPT
{__r_.first().__l.__size_ = __s;}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type __get_long_size() const _NOEXCEPT
{return __r_.first().__l.__size_;}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __set_size(size_type __s) _NOEXCEPT
{if (__is_long()) __set_long_size(__s); else __set_short_size(__s);}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __set_long_cap(size_type __s) _NOEXCEPT {
__r_.first().__l.__cap_ = __s / __endian_factor;
__r_.first().__l.__is_long_ = true;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type __get_long_cap() const _NOEXCEPT {
return __r_.first().__l.__cap_ * __endian_factor;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __set_long_pointer(pointer __p) _NOEXCEPT
{__r_.first().__l.__data_ = __p;}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
pointer __get_long_pointer() _NOEXCEPT
{return __r_.first().__l.__data_;}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_pointer __get_long_pointer() const _NOEXCEPT
{return __r_.first().__l.__data_;}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
pointer __get_short_pointer() _NOEXCEPT
{return pointer_traits<pointer>::pointer_to(__r_.first().__s.__data_[0]);}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_pointer __get_short_pointer() const _NOEXCEPT
{return pointer_traits<const_pointer>::pointer_to(__r_.first().__s.__data_[0]);}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
pointer __get_pointer() _NOEXCEPT
{return __is_long() ? __get_long_pointer() : __get_short_pointer();}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_pointer __get_pointer() const _NOEXCEPT
{return __is_long() ? __get_long_pointer() : __get_short_pointer();}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- void __zero() _NOEXCEPT {
- __r_.first() = __rep();
- }
-
template <size_type __a> static
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type __align_it(size_type __s) _NOEXCEPT
{return (__s + (__a-1)) & ~(__a-1);}
enum {__alignment = 16};
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type __recommend(size_type __s) _NOEXCEPT
{
if (__s < __min_cap) {
@@ -1685,11 +1860,11 @@ private:
return __guess;
}
- inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+ inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void __init(const value_type* __s, size_type __sz, size_type __reserve);
- inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+ inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void __init(const value_type* __s, size_type __sz);
- inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+ inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void __init(size_type __n, value_type __c);
// Slow path for the (inlined) copy constructor for 'long' strings.
@@ -1700,10 +1875,10 @@ private:
// to call the __init() functions as those are marked as inline which may
// result in over-aggressive inlining by the compiler, where our aim is
// to only inline the fast path code directly in the ctor.
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __init_copy_ctor_external(const value_type* __s, size_type __sz);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __init_copy_ctor_external(const value_type* __s, size_type __sz);
template <class _InputIterator>
- inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+ inline _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_exactly_cpp17_input_iterator<_InputIterator>::value
@@ -1711,17 +1886,17 @@ private:
__init(_InputIterator __first, _InputIterator __last);
template <class _ForwardIterator>
- inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+ inline _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value
>
__init(_ForwardIterator __first, _ForwardIterator __last);
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
void __grow_by(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
size_type __n_copy, size_type __n_del, size_type __n_add = 0);
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
void __grow_by_and_replace(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
size_type __n_copy, size_type __n_del,
size_type __n_add, const value_type* __p_new_stuff);
@@ -1730,21 +1905,22 @@ private:
// have proof that the input does not alias the current instance.
// For example, operator=(basic_string) performs a 'self' check.
template <bool __is_short>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& __assign_no_alias(const value_type* __s, size_type __n);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& __assign_no_alias(const value_type* __s, size_type __n);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
- void __erase_to_end(size_type __pos);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __erase_to_end(size_type __pos) {
+ __null_terminate_at(std::__to_address(__get_pointer()), __pos);
+ }
// __erase_external_with_move is invoked for erase() invocations where
// `n ~= npos`, likely requiring memory moves on the string data.
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __erase_external_with_move(size_type __pos, size_type __n);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __erase_external_with_move(size_type __pos, size_type __n);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __copy_assign_alloc(const basic_string& __str)
{__copy_assign_alloc(__str, integral_constant<bool,
__alloc_traits::propagate_on_container_copy_assignment::value>());}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __copy_assign_alloc(const basic_string& __str, true_type)
{
if (__alloc() == __str.__alloc())
@@ -1761,7 +1937,7 @@ private:
allocator_type __a = __str.__alloc();
auto __allocation = std::__allocate_at_least(__a, __str.__get_long_cap());
__begin_lifetime(__allocation.ptr, __allocation.count);
- __clear_and_shrink();
+ __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap());
__alloc() = std::move(__a);
__set_long_pointer(__allocation.ptr);
__set_long_cap(__allocation.count);
@@ -1770,15 +1946,15 @@ private:
}
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __copy_assign_alloc(const basic_string&, false_type) _NOEXCEPT
{}
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __move_assign(basic_string& __str, false_type)
_NOEXCEPT_(__alloc_traits::is_always_equal::value);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __move_assign(basic_string& __str, true_type)
#if _LIBCPP_STD_VER > 14
_NOEXCEPT;
@@ -1787,7 +1963,7 @@ private:
#endif
#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void
__move_assign_alloc(basic_string& __str)
_NOEXCEPT_(
@@ -1796,20 +1972,20 @@ private:
{__move_assign_alloc(__str, integral_constant<bool,
__alloc_traits::propagate_on_container_move_assignment::value>());}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __move_assign_alloc(basic_string& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
__alloc() = std::move(__c.__alloc());
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __move_assign_alloc(basic_string&, false_type)
_NOEXCEPT
{}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& __assign_external(const value_type* __s);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& __assign_external(const value_type* __s, size_type __n);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& __assign_external(const value_type* __s);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& __assign_external(const value_type* __s, size_type __n);
// Assigns the value in __s, guaranteed to be __n < __min_cap in length.
inline basic_string& __assign_short(const value_type* __s, size_type __n) {
@@ -1821,7 +1997,7 @@ private:
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string& __null_terminate_at(value_type* __p, size_type __newsz) {
__set_size(__newsz);
__invalidate_iterators_past(__newsz);
@@ -1829,10 +2005,10 @@ private:
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __invalidate_iterators_past(size_type);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __invalidate_iterators_past(size_type);
template<class _Tp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
bool __addr_in_range(_Tp&& __t) const {
// assume that the ranges overlap, because we can't check during constant evaluation
if (__libcpp_is_constant_evaluated())
@@ -1851,11 +2027,11 @@ private:
std::__throw_out_of_range("basic_string");
}
- friend _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(const basic_string&, const basic_string&);
- friend _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(const value_type*, const basic_string&);
- friend _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(value_type, const basic_string&);
- friend _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(const basic_string&, const value_type*);
- friend _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(const basic_string&, value_type);
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+<>(const basic_string&, const basic_string&);
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+<>(const value_type*, const basic_string&);
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+<>(value_type, const basic_string&);
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+<>(const basic_string&, const value_type*);
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+<>(const basic_string&, value_type);
};
// These declarations must appear before any functions are implicitly used
@@ -1904,7 +2080,7 @@ basic_string(basic_string_view<_CharT, _Traits>, _Sz, _Sz, const _Allocator& = _
#endif
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__invalidate_iterators_past(size_type __pos)
{
@@ -1934,37 +2110,13 @@ basic_string<_CharT, _Traits, _Allocator>::__invalidate_iterators_past(size_type
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>::basic_string()
- _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
- : __r_(__default_init_tag(), __default_init_tag())
-{
- std::__debug_db_insert_c(this);
- __default_init();
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a)
-#if _LIBCPP_STD_VER <= 14
- _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
-#else
- _NOEXCEPT
-#endif
-: __r_(__default_init_tag(), __a)
-{
- std::__debug_db_insert_c(this);
- __default_init();
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s,
size_type __sz,
size_type __reserve)
{
if (__libcpp_is_constant_evaluated())
- __zero();
+ __r_.first() = __rep();
if (__reserve > max_size())
__throw_length_error();
pointer __p;
@@ -1987,12 +2139,12 @@ void basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s,
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_type __sz)
{
if (__libcpp_is_constant_evaluated())
- __zero();
+ __r_.first() = __rep();
if (__sz > max_size())
__throw_length_error();
pointer __p;
@@ -2016,7 +2168,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_ty
template <class _CharT, class _Traits, class _Allocator>
template <class>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, const _Allocator& __a)
: __r_(__default_init_tag(), __a)
{
@@ -2026,32 +2178,12 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, const
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, size_type __n)
- : __r_(__default_init_tag(), __default_init_tag())
-{
- _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n) detected nullptr");
- __init(__s, __n);
- std::__debug_db_insert_c(this);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, size_type __n, const _Allocator& __a)
- : __r_(__default_init_tag(), __a)
-{
- _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n, allocator) detected nullptr");
- __init(__s, __n);
- std::__debug_db_insert_c(this);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str)
: __r_(__default_init_tag(), __alloc_traits::select_on_container_copy_construction(__str.__alloc()))
{
if (!__str.__is_long())
- __r_.first().__r = __str.__r_.first().__r;
+ __r_.first() = __str.__r_.first();
else
__init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()),
__str.__get_long_size());
@@ -2059,13 +2191,13 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>::basic_string(
const basic_string& __str, const allocator_type& __a)
: __r_(__default_init_tag(), __a)
{
if (!__str.__is_long())
- __r_.first().__r = __str.__r_.first().__r;
+ __r_.first() = __str.__r_.first();
else
__init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()),
__str.__get_long_size());
@@ -2073,11 +2205,12 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void basic_string<_CharT, _Traits, _Allocator>::__init_copy_ctor_external(
const value_type* __s, size_type __sz) {
if (__libcpp_is_constant_evaluated())
- __zero();
+ __r_.first() = __rep();
+
pointer __p;
if (__fits_in_sso(__sz)) {
__p = __get_short_pointer();
@@ -2095,55 +2228,14 @@ void basic_string<_CharT, _Traits, _Allocator>::__init_copy_ctor_external(
traits_type::copy(std::__to_address(__p), __s, __sz + 1);
}
-#ifndef _LIBCPP_CXX03_LANG
-
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str)
-#if _LIBCPP_STD_VER <= 14
- _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
-#else
- _NOEXCEPT
-#endif
- : __r_(std::move(__str.__r_))
-{
- __str.__default_init();
- std::__debug_db_insert_c(this);
- if (__is_long())
- std::__debug_db_swap(this, &__str);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str, const allocator_type& __a)
- : __r_(__default_init_tag(), __a)
-{
- if (__str.__is_long() && __a != __str.__alloc()) // copy, not move
- __init(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size());
- else
- {
- if (__libcpp_is_constant_evaluated()) {
- __zero();
- __r_.first().__l = __str.__r_.first().__l;
- } else {
- __r_.first().__r = __str.__r_.first().__r;
- }
- __str.__default_init();
- }
- std::__debug_db_insert_c(this);
- if (__is_long())
- std::__debug_db_swap(this, &__str);
-}
-
-#endif // _LIBCPP_CXX03_LANG
-
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__init(size_type __n, value_type __c)
{
if (__libcpp_is_constant_evaluated())
- __zero();
+ __r_.first() = __rep();
+
if (__n > max_size())
__throw_length_error();
pointer __p;
@@ -2166,17 +2258,8 @@ basic_string<_CharT, _Traits, _Allocator>::__init(size_type __n, value_type __c)
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __c)
- : __r_(__default_init_tag(), __default_init_tag())
-{
- __init(__n, __c);
- std::__debug_db_insert_c(this);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
template <class>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __c, const _Allocator& __a)
: __r_(__default_init_tag(), __a)
{
@@ -2185,7 +2268,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str,
size_type __pos, size_type __n,
const _Allocator& __a)
@@ -2199,21 +2282,8 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str, size_type __pos,
- const _Allocator& __a)
- : __r_(__default_init_tag(), __a)
-{
- size_type __str_sz = __str.size();
- if (__pos > __str_sz)
- __throw_out_of_range();
- __init(__str.data() + __pos, __str_sz - __pos);
- std::__debug_db_insert_c(this);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
template <class _Tp, class>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>::basic_string(
const _Tp& __t, size_type __pos, size_type __n, const allocator_type& __a)
: __r_(__default_init_tag(), __a)
@@ -2226,7 +2296,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp, class>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>::basic_string(const _Tp & __t)
: __r_(__default_init_tag(), __default_init_tag())
{
@@ -2237,7 +2307,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const _Tp & __t)
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp, class>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>::basic_string(const _Tp & __t, const _Allocator& __a)
: __r_(__default_init_tag(), __a)
{
@@ -2248,7 +2318,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const _Tp & __t, const _
template <class _CharT, class _Traits, class _Allocator>
template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_exactly_cpp17_input_iterator<_InputIterator>::value
@@ -2275,7 +2345,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(_InputIterator __first, _Input
template <class _CharT, class _Traits, class _Allocator>
template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value
@@ -2283,7 +2353,7 @@ __enable_if_t
basic_string<_CharT, _Traits, _Allocator>::__init(_ForwardIterator __first, _ForwardIterator __last)
{
if (__libcpp_is_constant_evaluated())
- __zero();
+ __r_.first() = __rep();
size_type __sz = static_cast<size_type>(std::distance(__first, __last));
if (__sz > max_size())
__throw_length_error();
@@ -2322,52 +2392,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(_ForwardIterator __first, _For
}
template <class _CharT, class _Traits, class _Allocator>
-template<class _InputIterator, class>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator __first, _InputIterator __last)
- : __r_(__default_init_tag(), __default_init_tag())
-{
- __init(__first, __last);
- std::__debug_db_insert_c(this);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-template<class _InputIterator, class>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator __first, _InputIterator __last,
- const allocator_type& __a)
- : __r_(__default_init_tag(), __a)
-{
- __init(__first, __last);
- std::__debug_db_insert_c(this);
-}
-
-#ifndef _LIBCPP_CXX03_LANG
-
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>::basic_string(
- initializer_list<_CharT> __il)
- : __r_(__default_init_tag(), __default_init_tag())
-{
- __init(__il.begin(), __il.end());
- std::__debug_db_insert_c(this);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>::basic_string(
- initializer_list<_CharT> __il, const _Allocator& __a)
- : __r_(__default_init_tag(), __a)
-{
- __init(__il.begin(), __il.end());
- std::__debug_db_insert_c(this);
-}
-
-#endif // _LIBCPP_CXX03_LANG
-
-template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>::~basic_string()
{
std::__debug_db_erase_c(this);
@@ -2376,7 +2401,7 @@ basic_string<_CharT, _Traits, _Allocator>::~basic_string()
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace
(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
@@ -2413,7 +2438,7 @@ basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace
template <class _CharT, class _Traits, class _Allocator>
void
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>::__grow_by(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
size_type __n_copy, size_type __n_del, size_type __n_add)
{
@@ -2446,7 +2471,7 @@ basic_string<_CharT, _Traits, _Allocator>::__grow_by(size_type __old_cap, size_t
template <class _CharT, class _Traits, class _Allocator>
template <bool __is_short>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::__assign_no_alias(
const value_type* __s, size_type __n) {
@@ -2465,7 +2490,7 @@ basic_string<_CharT, _Traits, _Allocator>::__assign_no_alias(
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::__assign_external(
const value_type* __s, size_type __n) {
@@ -2482,7 +2507,7 @@ basic_string<_CharT, _Traits, _Allocator>::__assign_external(
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s, size_type __n)
{
@@ -2493,7 +2518,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s, size_ty
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(size_type __n, value_type __c)
{
@@ -2509,7 +2534,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(size_type __n, value_type __c)
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::operator=(value_type __c)
{
@@ -2531,7 +2556,7 @@ basic_string<_CharT, _Traits, _Allocator>::operator=(value_type __c)
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::operator=(const basic_string& __str)
{
@@ -2539,7 +2564,7 @@ basic_string<_CharT, _Traits, _Allocator>::operator=(const basic_string& __str)
__copy_assign_alloc(__str);
if (!__is_long()) {
if (!__str.__is_long()) {
- __r_.first().__r = __str.__r_.first().__r;
+ __r_.first() = __str.__r_.first();
} else {
return __assign_no_alias<true>(__str.data(), __str.size());
}
@@ -2553,7 +2578,7 @@ basic_string<_CharT, _Traits, _Allocator>::operator=(const basic_string& __str)
#ifndef _LIBCPP_CXX03_LANG
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, false_type)
_NOEXCEPT_(__alloc_traits::is_always_equal::value)
@@ -2565,7 +2590,7 @@ basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, fa
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, true_type)
#if _LIBCPP_STD_VER > 14
@@ -2594,22 +2619,11 @@ basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, tr
}
}
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::operator=(basic_string&& __str)
- _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value))
-{
- __move_assign(__str, integral_constant<bool,
- __alloc_traits::propagate_on_container_move_assignment::value>());
- return *this;
-}
-
#endif
template <class _CharT, class _Traits, class _Allocator>
template<class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_exactly_cpp17_input_iterator<_InputIterator>::value,
@@ -2624,7 +2638,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(_InputIterator __first, _Input
template <class _CharT, class _Traits, class _Allocator>
template<class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -2660,7 +2674,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(_ForwardIterator __first, _For
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(const basic_string& __str, size_type __pos, size_type __n)
{
@@ -2672,7 +2686,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(const basic_string& __str, siz
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
@@ -2690,14 +2704,14 @@ basic_string<_CharT, _Traits, _Allocator>::assign(const _Tp & __t, size_type __p
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::__assign_external(const value_type* __s) {
return __assign_external(__s, traits_type::length(__s));
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s)
{
@@ -2711,7 +2725,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s)
// append
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s, size_type __n)
{
@@ -2735,7 +2749,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s, size_ty
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(size_type __n, value_type __c)
{
@@ -2755,7 +2769,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(size_type __n, value_type __c)
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 inline void
+_LIBCPP_CONSTEXPR_SINCE_CXX20 inline void
basic_string<_CharT, _Traits, _Allocator>::__append_default_init(size_type __n)
{
if (__n)
@@ -2772,7 +2786,7 @@ basic_string<_CharT, _Traits, _Allocator>::__append_default_init(size_type __n)
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::push_back(value_type __c)
{
@@ -2811,7 +2825,7 @@ basic_string<_CharT, _Traits, _Allocator>::push_back(value_type __c)
template <class _CharT, class _Traits, class _Allocator>
template<class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -2846,15 +2860,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::append(const basic_string& __str)
-{
- return append(__str.data(), __str.size());
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(const basic_string& __str, size_type __pos, size_type __n)
{
@@ -2866,7 +2872,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(const basic_string& __str, siz
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
@@ -2882,7 +2888,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(const _Tp & __t, size_type __p
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s)
{
@@ -2893,7 +2899,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s)
// insert
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s, size_type __n)
{
@@ -2933,7 +2939,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_t
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, size_type __n, value_type __c)
{
@@ -2966,7 +2972,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, size_type __n
template <class _CharT, class _Traits, class _Allocator>
template<class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_exactly_cpp17_input_iterator<_InputIterator>::value,
@@ -2983,7 +2989,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _InputIt
template <class _CharT, class _Traits, class _Allocator>
template<class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -3011,15 +3017,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _Forward
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos1, const basic_string& __str)
-{
- return insert(__pos1, __str.data(), __str.size());
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos1, const basic_string& __str,
size_type __pos2, size_type __n)
@@ -3032,7 +3030,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos1, const basic_
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
@@ -3049,7 +3047,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos1, const _Tp& _
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s)
{
@@ -3058,7 +3056,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_t
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, value_type __c)
{
@@ -3088,23 +3086,10 @@ basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, value_ty
return begin() + static_cast<difference_type>(__ip);
}
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-typename basic_string<_CharT, _Traits, _Allocator>::iterator
-basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, size_type __n, value_type __c)
-{
- _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
- "string::insert(iterator, n, value) called with an iterator not"
- " referring to this string");
- difference_type __p = __pos - begin();
- insert(static_cast<size_type>(__p), __n, __c);
- return begin() + __p;
-}
-
// replace
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, const value_type* __s, size_type __n2)
_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
@@ -3158,7 +3143,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, size_type __n2, value_type __c)
{
@@ -3189,7 +3174,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __
template <class _CharT, class _Traits, class _Allocator>
template<class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__is_cpp17_input_iterator<_InputIterator>::value,
@@ -3203,15 +3188,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_it
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos1, size_type __n1, const basic_string& __str)
-{
- return replace(__pos1, __n1, __str.data(), __str.size());
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos1, size_type __n1, const basic_string& __str,
size_type __pos2, size_type __n2)
@@ -3224,7 +3201,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos1, size_type _
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
@@ -3241,7 +3218,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos1, size_type _
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, const value_type* __s)
{
@@ -3249,45 +3226,12 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __
return replace(__pos, __n1, __s, traits_type::length(__s));
}
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_iterator __i2, const basic_string& __str)
-{
- return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1),
- __str.data(), __str.size());
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_iterator __i2, const value_type* __s, size_type __n)
-{
- return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __s, __n);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_iterator __i2, const value_type* __s)
-{
- return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __s);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c)
-{
- return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __n, __c);
-}
-
// erase
// 'externally instantiated' erase() implementation, called when __n != npos.
// Does not check __pos against size()
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__erase_external_with_move(
size_type __pos, size_type __n)
@@ -3305,7 +3249,7 @@ basic_string<_CharT, _Traits, _Allocator>::__erase_external_with_move(
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::erase(size_type __pos,
size_type __n) {
@@ -3320,7 +3264,7 @@ basic_string<_CharT, _Traits, _Allocator>::erase(size_type __pos,
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __pos)
{
@@ -3336,7 +3280,7 @@ basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __pos)
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __first, const_iterator __last)
{
@@ -3352,7 +3296,7 @@ basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __first, const_i
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::pop_back()
{
@@ -3361,7 +3305,7 @@ basic_string<_CharT, _Traits, _Allocator>::pop_back()
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::clear() _NOEXCEPT
{
@@ -3379,15 +3323,7 @@ basic_string<_CharT, _Traits, _Allocator>::clear() _NOEXCEPT
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-void
-basic_string<_CharT, _Traits, _Allocator>::__erase_to_end(size_type __pos)
-{
- __null_terminate_at(std::__to_address(__get_pointer()), __pos);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::resize(size_type __n, value_type __c)
{
@@ -3399,7 +3335,7 @@ basic_string<_CharT, _Traits, _Allocator>::resize(size_type __n, value_type __c)
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 inline void
+_LIBCPP_CONSTEXPR_SINCE_CXX20 inline void
basic_string<_CharT, _Traits, _Allocator>::__resize_default_init(size_type __n)
{
size_type __sz = size();
@@ -3410,21 +3346,7 @@ basic_string<_CharT, _Traits, _Allocator>::__resize_default_init(size_type __n)
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-typename basic_string<_CharT, _Traits, _Allocator>::size_type
-basic_string<_CharT, _Traits, _Allocator>::max_size() const _NOEXCEPT
-{
- size_type __m = __alloc_traits::max_size(__alloc());
- if (__m <= std::numeric_limits<size_type>::max() / 2) {
- return __m - __alignment;
- } else {
- bool __uses_lsb = __endian_factor == 2;
- return __uses_lsb ? __m - __alignment : (__m / 2) - __alignment;
- }
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::reserve(size_type __requested_capacity)
{
@@ -3445,7 +3367,7 @@ basic_string<_CharT, _Traits, _Allocator>::reserve(size_type __requested_capacit
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::shrink_to_fit() _NOEXCEPT
{
@@ -3456,7 +3378,7 @@ basic_string<_CharT, _Traits, _Allocator>::shrink_to_fit() _NOEXCEPT
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__shrink_or_extend(size_type __target_capacity)
{
@@ -3520,25 +3442,7 @@ basic_string<_CharT, _Traits, _Allocator>::__shrink_or_extend(size_type __target
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-typename basic_string<_CharT, _Traits, _Allocator>::const_reference
-basic_string<_CharT, _Traits, _Allocator>::operator[](size_type __pos) const _NOEXCEPT
-{
- _LIBCPP_ASSERT(__pos <= size(), "string index out of bounds");
- return *(data() + __pos);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-typename basic_string<_CharT, _Traits, _Allocator>::reference
-basic_string<_CharT, _Traits, _Allocator>::operator[](size_type __pos) _NOEXCEPT
-{
- _LIBCPP_ASSERT(__pos <= size(), "string index out of bounds");
- return *(__get_pointer() + __pos);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::const_reference
basic_string<_CharT, _Traits, _Allocator>::at(size_type __n) const
{
@@ -3548,7 +3452,7 @@ basic_string<_CharT, _Traits, _Allocator>::at(size_type __n) const
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::reference
basic_string<_CharT, _Traits, _Allocator>::at(size_type __n)
{
@@ -3558,43 +3462,7 @@ basic_string<_CharT, _Traits, _Allocator>::at(size_type __n)
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-typename basic_string<_CharT, _Traits, _Allocator>::reference
-basic_string<_CharT, _Traits, _Allocator>::front() _NOEXCEPT
-{
- _LIBCPP_ASSERT(!empty(), "string::front(): string is empty");
- return *__get_pointer();
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-typename basic_string<_CharT, _Traits, _Allocator>::const_reference
-basic_string<_CharT, _Traits, _Allocator>::front() const _NOEXCEPT
-{
- _LIBCPP_ASSERT(!empty(), "string::front(): string is empty");
- return *data();
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-typename basic_string<_CharT, _Traits, _Allocator>::reference
-basic_string<_CharT, _Traits, _Allocator>::back() _NOEXCEPT
-{
- _LIBCPP_ASSERT(!empty(), "string::back(): string is empty");
- return *(__get_pointer() + size() - 1);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-typename basic_string<_CharT, _Traits, _Allocator>::const_reference
-basic_string<_CharT, _Traits, _Allocator>::back() const _NOEXCEPT
-{
- _LIBCPP_ASSERT(!empty(), "string::back(): string is empty");
- return *(data() + size() - 1);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::copy(value_type* __s, size_type __n, size_type __pos) const
{
@@ -3607,15 +3475,7 @@ basic_string<_CharT, _Traits, _Allocator>::copy(value_type* __s, size_type __n,
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
-basic_string<_CharT, _Traits, _Allocator>
-basic_string<_CharT, _Traits, _Allocator>::substr(size_type __pos, size_type __n) const
-{
- return basic_string(*this, __pos, __n, __alloc());
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str)
#if _LIBCPP_STD_VER >= 14
@@ -3651,7 +3511,7 @@ struct _LIBCPP_HIDDEN __traits_eq
};
template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s,
size_type __pos,
@@ -3663,7 +3523,7 @@ basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find(const basic_string& __str,
size_type __pos) const _NOEXCEPT
@@ -3674,7 +3534,7 @@ basic_string<_CharT, _Traits, _Allocator>::find(const basic_string& __str,
template<class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -3689,7 +3549,7 @@ basic_string<_CharT, _Traits, _Allocator>::find(const _Tp &__t,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s,
size_type __pos) const _NOEXCEPT
@@ -3700,7 +3560,7 @@ basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s,
}
template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find(value_type __c,
size_type __pos) const _NOEXCEPT
@@ -3712,7 +3572,7 @@ basic_string<_CharT, _Traits, _Allocator>::find(value_type __c,
// rfind
template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::rfind(const value_type* __s,
size_type __pos,
@@ -3724,7 +3584,7 @@ basic_string<_CharT, _Traits, _Allocator>::rfind(const value_type* __s,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::rfind(const basic_string& __str,
size_type __pos) const _NOEXCEPT
@@ -3735,7 +3595,7 @@ basic_string<_CharT, _Traits, _Allocator>::rfind(const basic_string& __str,
template<class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -3750,7 +3610,7 @@ basic_string<_CharT, _Traits, _Allocator>::rfind(const _Tp& __t,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::rfind(const value_type* __s,
size_type __pos) const _NOEXCEPT
@@ -3761,7 +3621,7 @@ basic_string<_CharT, _Traits, _Allocator>::rfind(const value_type* __s,
}
template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::rfind(value_type __c,
size_type __pos) const _NOEXCEPT
@@ -3773,7 +3633,7 @@ basic_string<_CharT, _Traits, _Allocator>::rfind(value_type __c,
// find_first_of
template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_of(const value_type* __s,
size_type __pos,
@@ -3785,7 +3645,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_of(const value_type* __s,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_of(const basic_string& __str,
size_type __pos) const _NOEXCEPT
@@ -3796,7 +3656,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_of(const basic_string& __s
template<class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -3811,7 +3671,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_of(const _Tp& __t,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_of(const value_type* __s,
size_type __pos) const _NOEXCEPT
@@ -3822,7 +3682,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_of(const value_type* __s,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_of(value_type __c,
size_type __pos) const _NOEXCEPT
@@ -3833,7 +3693,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_of(value_type __c,
// find_last_of
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_of(const value_type* __s,
size_type __pos,
@@ -3845,7 +3705,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_of(const value_type* __s,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_of(const basic_string& __str,
size_type __pos) const _NOEXCEPT
@@ -3856,7 +3716,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_of(const basic_string& __st
template<class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -3871,7 +3731,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_of(const _Tp& __t,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_of(const value_type* __s,
size_type __pos) const _NOEXCEPT
@@ -3882,7 +3742,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_of(const value_type* __s,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_of(value_type __c,
size_type __pos) const _NOEXCEPT
@@ -3893,7 +3753,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_of(value_type __c,
// find_first_not_of
template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const value_type* __s,
size_type __pos,
@@ -3905,7 +3765,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const value_type* _
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const basic_string& __str,
size_type __pos) const _NOEXCEPT
@@ -3916,7 +3776,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const basic_string&
template<class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -3931,7 +3791,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const _Tp& __t,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const value_type* __s,
size_type __pos) const _NOEXCEPT
@@ -3942,7 +3802,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const value_type* _
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(value_type __c,
size_type __pos) const _NOEXCEPT
@@ -3954,7 +3814,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(value_type __c,
// find_last_not_of
template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const value_type* __s,
size_type __pos,
@@ -3966,7 +3826,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const value_type* __
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const basic_string& __str,
size_type __pos) const _NOEXCEPT
@@ -3977,7 +3837,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const basic_string&
template<class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -3992,7 +3852,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const _Tp& __t,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const value_type* __s,
size_type __pos) const _NOEXCEPT
@@ -4003,7 +3863,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const value_type* __
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(value_type __c,
size_type __pos) const _NOEXCEPT
@@ -4016,7 +3876,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(value_type __c,
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -4039,7 +3899,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(const _Tp& __t) const _NOEXCE
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
int
basic_string<_CharT, _Traits, _Allocator>::compare(const basic_string& __str) const _NOEXCEPT
{
@@ -4047,7 +3907,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(const basic_string& __str) co
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
int
basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
size_type __n1,
@@ -4072,7 +3932,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -4087,7 +3947,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
}
template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
int
basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
size_type __n1,
@@ -4098,7 +3958,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
template <class _CharT, class _Traits, class _Allocator>
template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t
<
__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
@@ -4116,7 +3976,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
int
basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
size_type __n1,
@@ -4128,7 +3988,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
int
basic_string<_CharT, _Traits, _Allocator>::compare(const value_type* __s) const _NOEXCEPT
{
@@ -4137,7 +3997,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(const value_type* __s) const
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
int
basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
size_type __n1,
@@ -4150,7 +4010,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
// __invariants
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
basic_string<_CharT, _Traits, _Allocator>::__invariants() const
{
@@ -4168,7 +4028,7 @@ basic_string<_CharT, _Traits, _Allocator>::__invariants() const
// __clear_and_shrink
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink() _NOEXCEPT
{
@@ -4176,28 +4036,30 @@ basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink() _NOEXCEPT
if(__is_long())
{
__alloc_traits::deallocate(__alloc(), __get_long_pointer(), capacity() + 1);
- __set_long_cap(0);
- __set_short_size(0);
- traits_type::assign(*__get_short_pointer(), value_type());
+ __default_init();
}
}
// operator==
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
bool
operator==(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
{
+#if _LIBCPP_STD_VER > 17
+ return basic_string_view<_CharT, _Traits>(__lhs) == basic_string_view<_CharT, _Traits>(__rhs);
+#else
size_t __lhs_sz = __lhs.size();
return __lhs_sz == __rhs.size() && _Traits::compare(__lhs.data(),
__rhs.data(),
__lhs_sz) == 0;
+#endif
}
template<class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
bool
operator==(const basic_string<char, char_traits<char>, _Allocator>& __lhs,
const basic_string<char, char_traits<char>, _Allocator>& __rhs) _NOEXCEPT
@@ -4215,8 +4077,9 @@ operator==(const basic_string<char, char_traits<char>, _Allocator>& __lhs,
return true;
}
+#if _LIBCPP_STD_VER <= 17
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator==(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4227,22 +4090,44 @@ operator==(const _CharT* __lhs,
if (__lhs_len != __rhs.size()) return false;
return __rhs.compare(0, _String::npos, __lhs, __lhs_len) == 0;
}
+#endif // _LIBCPP_STD_VER <= 17
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
bool
operator==(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
const _CharT* __rhs) _NOEXCEPT
{
+#if _LIBCPP_STD_VER > 17
+ return basic_string_view<_CharT, _Traits>(__lhs) == basic_string_view<_CharT, _Traits>(__rhs);
+#else
typedef basic_string<_CharT, _Traits, _Allocator> _String;
_LIBCPP_ASSERT(__rhs != nullptr, "operator==(basic_string, char*): received nullptr");
size_t __rhs_len = _Traits::length(__rhs);
if (__rhs_len != __lhs.size()) return false;
return __lhs.compare(0, _String::npos, __rhs, __rhs_len) == 0;
+#endif
}
+#if _LIBCPP_STD_VER > 17
+
+template <class _CharT, class _Traits, class _Allocator>
+_LIBCPP_HIDE_FROM_ABI constexpr auto operator<=>(
+ const basic_string<_CharT, _Traits, _Allocator>& __lhs,
+ const basic_string<_CharT, _Traits, _Allocator>& __rhs) noexcept {
+ return basic_string_view<_CharT, _Traits>(__lhs) <=> basic_string_view<_CharT, _Traits>(__rhs);
+}
+
+template <class _CharT, class _Traits, class _Allocator>
+_LIBCPP_HIDE_FROM_ABI constexpr auto
+operator<=>(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs) {
+ return basic_string_view<_CharT, _Traits>(__lhs) <=> basic_string_view<_CharT, _Traits>(__rhs);
+}
+
+#else // _LIBCPP_STD_VER > 17
+
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4251,7 +4136,7 @@ operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator!=(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4260,7 +4145,7 @@ operator!=(const _CharT* __lhs,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator!=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
const _CharT* __rhs) _NOEXCEPT
@@ -4271,7 +4156,7 @@ operator!=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
// operator<
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4280,7 +4165,7 @@ operator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
const _CharT* __rhs) _NOEXCEPT
@@ -4289,7 +4174,7 @@ operator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator< (const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4300,7 +4185,7 @@ operator< (const _CharT* __lhs,
// operator>
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator> (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4309,7 +4194,7 @@ operator> (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator> (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
const _CharT* __rhs) _NOEXCEPT
@@ -4318,7 +4203,7 @@ operator> (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator> (const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4329,7 +4214,7 @@ operator> (const _CharT* __lhs,
// operator<=
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator<=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4338,7 +4223,7 @@ operator<=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator<=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
const _CharT* __rhs) _NOEXCEPT
@@ -4347,7 +4232,7 @@ operator<=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator<=(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4358,7 +4243,7 @@ operator<=(const _CharT* __lhs,
// operator>=
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator>=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4367,7 +4252,7 @@ operator>=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator>=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
const _CharT* __rhs) _NOEXCEPT
@@ -4376,18 +4261,19 @@ operator>=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator>=(const _CharT* __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
{
return !(__lhs < __rhs);
}
+#endif // _LIBCPP_STD_VER > 17
// operator +
template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs)
@@ -4406,7 +4292,7 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
}
template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDDEN _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const _CharT* __lhs , const basic_string<_CharT,_Traits,_Allocator>& __rhs)
{
@@ -4424,7 +4310,7 @@ operator+(const _CharT* __lhs , const basic_string<_CharT,_Traits,_Allocator>& _
}
template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Allocator>& __rhs)
{
@@ -4441,7 +4327,7 @@ operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Allocator>& __rhs)
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs)
{
@@ -4459,7 +4345,7 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT*
}
template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, _CharT __rhs)
{
@@ -4478,7 +4364,7 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, _CharT __rhs)
#ifndef _LIBCPP_CXX03_LANG
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const basic_string<_CharT, _Traits, _Allocator>& __rhs)
{
@@ -4486,7 +4372,7 @@ operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const basic_string<
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, basic_string<_CharT, _Traits, _Allocator>&& __rhs)
{
@@ -4494,7 +4380,7 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, basic_string<_
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, basic_string<_CharT, _Traits, _Allocator>&& __rhs)
{
@@ -4502,7 +4388,7 @@ operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, basic_string<_CharT
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const _CharT* __lhs , basic_string<_CharT,_Traits,_Allocator>&& __rhs)
{
@@ -4510,7 +4396,7 @@ operator+(const _CharT* __lhs , basic_string<_CharT,_Traits,_Allocator>&& __rhs)
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(_CharT __lhs, basic_string<_CharT,_Traits,_Allocator>&& __rhs)
{
@@ -4519,7 +4405,7 @@ operator+(_CharT __lhs, basic_string<_CharT,_Traits,_Allocator>&& __rhs)
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const _CharT* __rhs)
{
@@ -4527,7 +4413,7 @@ operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const _CharT* __rhs
}
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, _CharT __rhs)
{
@@ -4540,7 +4426,7 @@ operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, _CharT __rhs)
// swap
template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void
swap(basic_string<_CharT, _Traits, _Allocator>& __lhs,
basic_string<_CharT, _Traits, _Allocator>& __rhs)
@@ -4597,27 +4483,44 @@ const typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::npos;
template <class _CharT, class _Allocator>
-struct _LIBCPP_TEMPLATE_VIS
- hash<basic_string<_CharT, char_traits<_CharT>, _Allocator> >
- : public __unary_function<basic_string<_CharT, char_traits<_CharT>, _Allocator>, size_t>
+struct __string_hash : public __unary_function<basic_string<_CharT, char_traits<_CharT>, _Allocator>, size_t>
{
size_t
operator()(const basic_string<_CharT, char_traits<_CharT>, _Allocator>& __val) const _NOEXCEPT
{ return __do_string_hash(__val.data(), __val.data() + __val.size()); }
};
+template <class _Allocator>
+struct hash<basic_string<char, char_traits<char>, _Allocator> > : __string_hash<char, _Allocator> {};
+
+#ifndef _LIBCPP_HAS_NO_CHAR8_T
+template <class _Allocator>
+struct hash<basic_string<char8_t, char_traits<char8_t>, _Allocator> > : __string_hash<char8_t, _Allocator> {};
+#endif
+
+template <class _Allocator>
+struct hash<basic_string<char16_t, char_traits<char16_t>, _Allocator> > : __string_hash<char16_t, _Allocator> {};
+
+template <class _Allocator>
+struct hash<basic_string<char32_t, char_traits<char32_t>, _Allocator> > : __string_hash<char32_t, _Allocator> {};
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <class _Allocator>
+struct hash<basic_string<wchar_t, char_traits<wchar_t>, _Allocator> > : __string_hash<wchar_t, _Allocator> {};
+#endif
+
template<class _CharT, class _Traits, class _Allocator>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const basic_string<_CharT, _Traits, _Allocator>& __str);
template<class _CharT, class _Traits, class _Allocator>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Allocator>& __str);
template<class _CharT, class _Traits, class _Allocator>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm);
@@ -4703,14 +4606,14 @@ inline namespace literals
{
inline namespace string_literals
{
- inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<char> operator "" s( const char *__str, size_t __len )
{
return basic_string<char> (__str, __len);
}
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
- inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<wchar_t> operator "" s( const wchar_t *__str, size_t __len )
{
return basic_string<wchar_t> (__str, __len);
@@ -4719,19 +4622,19 @@ inline namespace literals
#ifndef _LIBCPP_HAS_NO_CHAR8_T
inline _LIBCPP_HIDE_FROM_ABI constexpr
- basic_string<char8_t> operator "" s(const char8_t *__str, size_t __len) _NOEXCEPT
+ basic_string<char8_t> operator "" s(const char8_t *__str, size_t __len)
{
return basic_string<char8_t> (__str, __len);
}
#endif
- inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<char16_t> operator "" s( const char16_t *__str, size_t __len )
{
return basic_string<char16_t> (__str, __len);
}
- inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<char32_t> operator "" s( const char32_t *__str, size_t __len )
{
return basic_string<char32_t> (__str, __len);
@@ -4754,4 +4657,15 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <algorithm>
+# include <concepts>
+# include <functional>
+# include <iterator>
+# include <new>
+# include <typeinfo>
+# include <utility>
+# include <vector>
+#endif
+
#endif // _LIBCPP_STRING
diff --git a/contrib/libs/cxxsupp/libcxx/include/string.h b/contrib/libs/cxxsupp/libcxx/include/string.h
index 082c632a29..3ec877bad3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/string.h
+++ b/contrib/libs/cxxsupp/libcxx/include/string.h
@@ -57,7 +57,9 @@ size_t strlen(const char* s);
# pragma GCC system_header
#endif
-#include_next <string.h>
+#if __has_include_next(<string.h>)
+# include_next <string.h>
+#endif
// MSVCRT, GNU libc and its derivates may already have the correct prototype in
// <string.h>. This macro can be defined by users if their C library provides
@@ -69,41 +71,41 @@ size_t strlen(const char* s);
#if defined(__cplusplus) && !defined(_LIBCPP_STRING_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD)
extern "C++" {
-inline _LIBCPP_INLINE_VISIBILITY
-char* __libcpp_strchr(const char* __s, int __c) {return (char*)strchr(__s, __c);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const char* strchr(const char* __s, int __c) {return __libcpp_strchr(__s, __c);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
- char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);}
-
-inline _LIBCPP_INLINE_VISIBILITY
-char* __libcpp_strpbrk(const char* __s1, const char* __s2) {return (char*)strpbrk(__s1, __s2);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const char* strpbrk(const char* __s1, const char* __s2) {return __libcpp_strpbrk(__s1, __s2);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
- char* strpbrk( char* __s1, const char* __s2) {return __libcpp_strpbrk(__s1, __s2);}
-
-inline _LIBCPP_INLINE_VISIBILITY
-char* __libcpp_strrchr(const char* __s, int __c) {return (char*)strrchr(__s, __c);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const char* strrchr(const char* __s, int __c) {return __libcpp_strrchr(__s, __c);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
- char* strrchr( char* __s, int __c) {return __libcpp_strrchr(__s, __c);}
-
-inline _LIBCPP_INLINE_VISIBILITY
-void* __libcpp_memchr(const void* __s, int __c, size_t __n) {return (void*)memchr(__s, __c, __n);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const void* memchr(const void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
- void* memchr( void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
-
-inline _LIBCPP_INLINE_VISIBILITY
-char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const char* strstr(const char* __s1, const char* __s2) {return __libcpp_strstr(__s1, __s2);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
- char* strstr( char* __s1, const char* __s2) {return __libcpp_strstr(__s1, __s2);}
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strchr(const char* __s, int __c) {
+ return __builtin_strchr(__s, __c);
+}
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strchr(char* __s, int __c) {
+ return __builtin_strchr(__s, __c);
+}
+
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strpbrk(const char* __s1, const char* __s2) {
+ return __builtin_strpbrk(__s1, __s2);
+}
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strpbrk(char* __s1, const char* __s2) {
+ return __builtin_strpbrk(__s1, __s2);
+}
+
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strrchr(const char* __s, int __c) {
+ return __builtin_strrchr(__s, __c);
+}
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strrchr(char* __s, int __c) {
+ return __builtin_strrchr(__s, __c);
+}
+
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const void* memchr(const void* __s, int __c, size_t __n) {
+ return __builtin_memchr(__s, __c, __n);
+}
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD void* memchr(void* __s, int __c, size_t __n) {
+ return __builtin_memchr(__s, __c, __n);
+}
+
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strstr(const char* __s1, const char* __s2) {
+ return __builtin_strstr(__s1, __s2);
+}
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strstr(char* __s1, const char* __s2) {
+ return __builtin_strstr(__s1, __s2);
}
+} // extern "C++"
#endif
#endif // _LIBCPP_STRING_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/string_view b/contrib/libs/cxxsupp/libcxx/include/string_view
index 62e0a6f1eb..7ebef2a104 100644
--- a/contrib/libs/cxxsupp/libcxx/include/string_view
+++ b/contrib/libs/cxxsupp/libcxx/include/string_view
@@ -14,6 +14,8 @@
string_view synopsis
+#include <compare>
+
namespace std {
// 7.2, Class template basic_string_view
@@ -30,21 +32,25 @@ namespace std {
template<class charT, class traits>
constexpr bool operator==(basic_string_view<charT, traits> x,
basic_string_view<charT, traits> y) noexcept;
- template<class charT, class traits>
+ template<class charT, class traits> // Removed in C++20
constexpr bool operator!=(basic_string_view<charT, traits> x,
basic_string_view<charT, traits> y) noexcept;
- template<class charT, class traits>
+ template<class charT, class traits> // Removed in C++20
constexpr bool operator< (basic_string_view<charT, traits> x,
basic_string_view<charT, traits> y) noexcept;
- template<class charT, class traits>
+ template<class charT, class traits> // Removed in C++20
constexpr bool operator> (basic_string_view<charT, traits> x,
basic_string_view<charT, traits> y) noexcept;
- template<class charT, class traits>
+ template<class charT, class traits> // Removed in C++20
constexpr bool operator<=(basic_string_view<charT, traits> x,
basic_string_view<charT, traits> y) noexcept;
- template<class charT, class traits>
+ template<class charT, class traits> // Removed in C++20
constexpr bool operator>=(basic_string_view<charT, traits> x,
basic_string_view<charT, traits> y) noexcept;
+ template<class charT, class traits> // Since C++20
+ constexpr see below operator<=>(basic_string_view<charT, traits> x,
+ basic_string_view<charT, traits> y) noexcept;
+
// see below, sufficient additional overloads of comparison functions
// 7.10, Inserters and extractors
@@ -185,11 +191,11 @@ namespace std {
template <> struct hash<u32string_view>;
template <> struct hash<wstring_view>;
- constexpr basic_string_view<char> operator "" sv( const char *str, size_t len ) noexcept;
- constexpr basic_string_view<wchar_t> operator "" sv( const wchar_t *str, size_t len ) noexcept;
- constexpr basic_string_view<char8_t> operator "" sv( const char8_t *str, size_t len ) noexcept; // C++20
- constexpr basic_string_view<char16_t> operator "" sv( const char16_t *str, size_t len ) noexcept;
- constexpr basic_string_view<char32_t> operator "" sv( const char32_t *str, size_t len ) noexcept;
+ constexpr basic_string_view<char> operator "" sv(const char *str, size_t len) noexcept;
+ constexpr basic_string_view<wchar_t> operator "" sv(const wchar_t *str, size_t len) noexcept;
+ constexpr basic_string_view<char8_t> operator "" sv(const char8_t *str, size_t len) noexcept; // C++20
+ constexpr basic_string_view<char16_t> operator "" sv(const char16_t *str, size_t len) noexcept;
+ constexpr basic_string_view<char32_t> operator "" sv(const char32_t *str, size_t len) noexcept;
} // namespace std
@@ -218,12 +224,6 @@ namespace std {
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <algorithm>
-# include <functional>
-# include <iterator>
-#endif
-
// standard-mandated includes
// [iterator.range]
@@ -256,29 +256,21 @@ inline size_t __char_traits_length_checked(const typename _Traits::char_type* __
}
template<class _CharT, class _Traits>
-class
- _LIBCPP_PREFERRED_NAME(string_view)
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
- _LIBCPP_PREFERRED_NAME(u8string_view)
-#endif
- _LIBCPP_PREFERRED_NAME(u16string_view)
- _LIBCPP_PREFERRED_NAME(u32string_view)
- _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstring_view))
- basic_string_view {
+class basic_string_view {
public:
// types
- typedef _Traits traits_type;
- typedef _CharT value_type;
- typedef _CharT* pointer;
- typedef const _CharT* const_pointer;
- typedef _CharT& reference;
- typedef const _CharT& const_reference;
- typedef const_pointer const_iterator; // See [string.view.iterators]
- typedef const_iterator iterator;
- typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef const_reverse_iterator reverse_iterator;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
+ using traits_type = _Traits;
+ using value_type = _CharT;
+ using pointer = _CharT*;
+ using const_pointer = const _CharT*;
+ using reference = _CharT&;
+ using const_reference = const _CharT&;
+ using const_iterator = const_pointer; // See [string.view.iterators]
+ using iterator = const_iterator;
+ using const_reverse_iterator = _VSTD::reverse_iterator<const_iterator>;
+ using reverse_iterator = const_reverse_iterator;
+ using size_type = size_t;
+ using difference_type = ptrdiff_t;
static _LIBCPP_CONSTEXPR const size_type npos = -1; // size_type(-1);
static_assert((!is_array<value_type>::value), "Character type of basic_string_view must not be an array");
@@ -289,7 +281,7 @@ public:
// [string.view.cons], construct/copy
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
- basic_string_view() _NOEXCEPT : __data (nullptr), __size(0) {}
+ basic_string_view() _NOEXCEPT : __data_(nullptr), __size_(0) {}
_LIBCPP_INLINE_VISIBILITY
basic_string_view(const basic_string_view&) _NOEXCEPT = default;
@@ -302,7 +294,7 @@ public:
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
basic_string_view(const _CharT* __s, size_type __len) _NOEXCEPT
- : __data(__s), __size(__len)
+ : __data_(__s), __size_(__len)
{
#if _LIBCPP_STD_VER > 11
_LIBCPP_ASSERT(__len == 0 || __s != nullptr, "string_view::string_view(_CharT *, size_t): received nullptr");
@@ -313,13 +305,13 @@ public:
template <contiguous_iterator _It, sized_sentinel_for<_It> _End>
requires (is_same_v<iter_value_t<_It>, _CharT> && !is_convertible_v<_End, size_type>)
constexpr _LIBCPP_HIDE_FROM_ABI basic_string_view(_It __begin, _End __end)
- : __data(_VSTD::to_address(__begin)), __size(__end - __begin)
+ : __data_(_VSTD::to_address(__begin)), __size_(__end - __begin)
{
_LIBCPP_ASSERT((__end - __begin) >= 0, "std::string_view::string_view(iterator, sentinel) received invalid range");
}
#endif // _LIBCPP_STD_VER > 17
-#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 20
template <class _Range>
requires (
!is_same_v<remove_cvref_t<_Range>, basic_string_view> &&
@@ -334,13 +326,13 @@ public:
typename remove_reference_t<_Range>::traits_type;
} || is_same_v<typename remove_reference_t<_Range>::traits_type, _Traits>)
)
- constexpr _LIBCPP_HIDE_FROM_ABI
- basic_string_view(_Range&& __r) : __data(ranges::data(__r)), __size(ranges::size(__r)) {}
-#endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+ constexpr explicit _LIBCPP_HIDE_FROM_ABI
+ basic_string_view(_Range&& __r) : __data_(ranges::data(__r)), __size_(ranges::size(__r)) {}
+#endif // _LIBCPP_STD_VER > 20
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
basic_string_view(const _CharT* __s)
- : __data(__s), __size(_VSTD::__char_traits_length_checked<_Traits>(__s)) {}
+ : __data_(__s), __size_(_VSTD::__char_traits_length_checked<_Traits>(__s)) {}
#if _LIBCPP_STD_VER > 17
basic_string_view(nullptr_t) = delete;
@@ -354,94 +346,94 @@ public:
const_iterator end() const _NOEXCEPT { return cend(); }
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
- const_iterator cbegin() const _NOEXCEPT { return __data; }
+ const_iterator cbegin() const _NOEXCEPT { return __data_; }
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
- const_iterator cend() const _NOEXCEPT { return __data + __size; }
+ const_iterator cend() const _NOEXCEPT { return __data_ + __size_; }
- _LIBCPP_CONSTEXPR_AFTER_CXX14 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_INLINE_VISIBILITY
const_reverse_iterator rbegin() const _NOEXCEPT { return const_reverse_iterator(cend()); }
- _LIBCPP_CONSTEXPR_AFTER_CXX14 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_INLINE_VISIBILITY
const_reverse_iterator rend() const _NOEXCEPT { return const_reverse_iterator(cbegin()); }
- _LIBCPP_CONSTEXPR_AFTER_CXX14 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_INLINE_VISIBILITY
const_reverse_iterator crbegin() const _NOEXCEPT { return const_reverse_iterator(cend()); }
- _LIBCPP_CONSTEXPR_AFTER_CXX14 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_INLINE_VISIBILITY
const_reverse_iterator crend() const _NOEXCEPT { return const_reverse_iterator(cbegin()); }
// [string.view.capacity], capacity
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
- size_type size() const _NOEXCEPT { return __size; }
+ size_type size() const _NOEXCEPT { return __size_; }
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
- size_type length() const _NOEXCEPT { return __size; }
+ size_type length() const _NOEXCEPT { return __size_; }
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
size_type max_size() const _NOEXCEPT { return numeric_limits<size_type>::max() / sizeof(value_type); }
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
- bool empty() const _NOEXCEPT { return __size == 0; }
+ bool empty() const _NOEXCEPT { return __size_ == 0; }
// [string.view.access], element access
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
const_reference operator[](size_type __pos) const _NOEXCEPT {
- return _LIBCPP_ASSERT(__pos < size(), "string_view[] index out of bounds"), __data[__pos];
+ return _LIBCPP_ASSERT(__pos < size(), "string_view[] index out of bounds"), __data_[__pos];
}
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
const_reference at(size_type __pos) const
{
return __pos >= size()
- ? (__throw_out_of_range("string_view::at"), __data[0])
- : __data[__pos];
+ ? (__throw_out_of_range("string_view::at"), __data_[0])
+ : __data_[__pos];
}
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
const_reference front() const _NOEXCEPT
{
- return _LIBCPP_ASSERT(!empty(), "string_view::front(): string is empty"), __data[0];
+ return _LIBCPP_ASSERT(!empty(), "string_view::front(): string is empty"), __data_[0];
}
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
const_reference back() const _NOEXCEPT
{
- return _LIBCPP_ASSERT(!empty(), "string_view::back(): string is empty"), __data[__size-1];
+ return _LIBCPP_ASSERT(!empty(), "string_view::back(): string is empty"), __data_[__size_-1];
}
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
- const_pointer data() const _NOEXCEPT { return __data; }
+ const_pointer data() const _NOEXCEPT { return __data_; }
// [string.view.modifiers], modifiers:
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
void remove_prefix(size_type __n) _NOEXCEPT
{
_LIBCPP_ASSERT(__n <= size(), "remove_prefix() can't remove more than size()");
- __data += __n;
- __size -= __n;
+ __data_ += __n;
+ __size_ -= __n;
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
void remove_suffix(size_type __n) _NOEXCEPT
{
_LIBCPP_ASSERT(__n <= size(), "remove_suffix() can't remove more than size()");
- __size -= __n;
+ __size_ -= __n;
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
void swap(basic_string_view& __other) _NOEXCEPT
{
- const value_type *__p = __data;
- __data = __other.__data;
- __other.__data = __p;
+ const value_type *__p = __data_;
+ __data_ = __other.__data_;
+ __other.__data_ = __p;
- size_type __sz = __size;
- __size = __other.__size;
- __other.__size = __sz;
+ size_type __sz = __size_;
+ __size_ = __other.__size_;
+ __other.__size_ = __sz;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const
{
if (__pos > size())
@@ -459,48 +451,48 @@ public:
: basic_string_view(data() + __pos, _VSTD::min(__n, size() - __pos));
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 int compare(basic_string_view __sv) const _NOEXCEPT
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 int compare(basic_string_view __sv) const _NOEXCEPT
{
- size_type __rlen = _VSTD::min( size(), __sv.size());
+ size_type __rlen = _VSTD::min(size(), __sv.size());
int __retval = _Traits::compare(data(), __sv.data(), __rlen);
- if ( __retval == 0 ) // first __rlen chars matched
- __retval = size() == __sv.size() ? 0 : ( size() < __sv.size() ? -1 : 1 );
+ if (__retval == 0) // first __rlen chars matched
+ __retval = size() == __sv.size() ? 0 : (size() < __sv.size() ? -1 : 1);
return __retval;
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
int compare(size_type __pos1, size_type __n1, basic_string_view __sv) const
{
return substr(__pos1, __n1).compare(__sv);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
int compare( size_type __pos1, size_type __n1,
basic_string_view __sv, size_type __pos2, size_type __n2) const
{
return substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2));
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
int compare(const _CharT* __s) const _NOEXCEPT
{
return compare(basic_string_view(__s));
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
int compare(size_type __pos1, size_type __n1, const _CharT* __s) const
{
return substr(__pos1, __n1).compare(basic_string_view(__s));
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
int compare(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) const
{
return substr(__pos1, __n1).compare(basic_string_view(__s, __n2));
}
// find
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT
{
_LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received nullptr");
@@ -508,14 +500,14 @@ public:
(data(), size(), __s.data(), __pos, __s.size());
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find(_CharT __c, size_type __pos = 0) const _NOEXCEPT
{
return __str_find<value_type, size_type, traits_type, npos>
(data(), size(), __c, __pos);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
{
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find(): received nullptr");
@@ -523,7 +515,7 @@ public:
(data(), size(), __s, __pos, __n);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT
{
_LIBCPP_ASSERT(__s != nullptr, "string_view::find(): received nullptr");
@@ -532,7 +524,7 @@ public:
}
// rfind
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type rfind(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT
{
_LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received nullptr");
@@ -540,14 +532,14 @@ public:
(data(), size(), __s.data(), __pos, __s.size());
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type rfind(_CharT __c, size_type __pos = npos) const _NOEXCEPT
{
return __str_rfind<value_type, size_type, traits_type, npos>
(data(), size(), __c, __pos);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
{
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::rfind(): received nullptr");
@@ -555,7 +547,7 @@ public:
(data(), size(), __s, __pos, __n);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type rfind(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
{
_LIBCPP_ASSERT(__s != nullptr, "string_view::rfind(): received nullptr");
@@ -564,7 +556,7 @@ public:
}
// find_first_of
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_first_of(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT
{
_LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_of(): received nullptr");
@@ -572,11 +564,11 @@ public:
(data(), size(), __s.data(), __pos, __s.size());
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_first_of(_CharT __c, size_type __pos = 0) const _NOEXCEPT
{ return find(__c, __pos); }
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
{
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_first_of(): received nullptr");
@@ -584,7 +576,7 @@ public:
(data(), size(), __s, __pos, __n);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_first_of(const _CharT* __s, size_type __pos=0) const _NOEXCEPT
{
_LIBCPP_ASSERT(__s != nullptr, "string_view::find_first_of(): received nullptr");
@@ -593,7 +585,7 @@ public:
}
// find_last_of
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_last_of(basic_string_view __s, size_type __pos=npos) const _NOEXCEPT
{
_LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_of(): received nullptr");
@@ -601,11 +593,11 @@ public:
(data(), size(), __s.data(), __pos, __s.size());
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_last_of(_CharT __c, size_type __pos = npos) const _NOEXCEPT
{ return rfind(__c, __pos); }
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
{
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_last_of(): received nullptr");
@@ -613,7 +605,7 @@ public:
(data(), size(), __s, __pos, __n);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_last_of(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
{
_LIBCPP_ASSERT(__s != nullptr, "string_view::find_last_of(): received nullptr");
@@ -622,7 +614,7 @@ public:
}
// find_first_not_of
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_first_not_of(basic_string_view __s, size_type __pos=0) const _NOEXCEPT
{
_LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_not_of(): received nullptr");
@@ -630,14 +622,14 @@ public:
(data(), size(), __s.data(), __pos, __s.size());
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_first_not_of(_CharT __c, size_type __pos=0) const _NOEXCEPT
{
return __str_find_first_not_of<value_type, size_type, traits_type, npos>
(data(), size(), __c, __pos);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
{
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_first_not_of(): received nullptr");
@@ -645,7 +637,7 @@ public:
(data(), size(), __s, __pos, __n);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_first_not_of(const _CharT* __s, size_type __pos=0) const _NOEXCEPT
{
_LIBCPP_ASSERT(__s != nullptr, "string_view::find_first_not_of(): received nullptr");
@@ -654,7 +646,7 @@ public:
}
// find_last_not_of
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_last_not_of(basic_string_view __s, size_type __pos=npos) const _NOEXCEPT
{
_LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_not_of(): received nullptr");
@@ -662,14 +654,14 @@ public:
(data(), size(), __s.data(), __pos, __s.size());
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_last_not_of(_CharT __c, size_type __pos=npos) const _NOEXCEPT
{
return __str_find_last_not_of<value_type, size_type, traits_type, npos>
(data(), size(), __c, __pos);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
{
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_last_not_of(): received nullptr");
@@ -677,7 +669,7 @@ public:
(data(), size(), __s, __pos, __n);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
size_type find_last_not_of(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
{
_LIBCPP_ASSERT(__s != nullptr, "string_view::find_last_not_of(): received nullptr");
@@ -727,9 +719,10 @@ public:
#endif
private:
- const value_type* __data;
- size_type __size;
+ const value_type* __data_;
+ size_type __size_;
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(basic_string_view);
#if _LIBCPP_STD_VER > 17
template <class _CharT, class _Traits>
@@ -747,69 +740,105 @@ template <contiguous_iterator _It, sized_sentinel_for<_It> _End>
#endif // _LIBCPP_STD_VER > 17
-#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 20
template <ranges::contiguous_range _Range>
basic_string_view(_Range) -> basic_string_view<ranges::range_value_t<_Range>>;
-#endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif
// [string.view.comparison]
// operator ==
template<class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator==(basic_string_view<_CharT, _Traits> __lhs,
basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
- if ( __lhs.size() != __rhs.size()) return false;
+ if (__lhs.size() != __rhs.size()) return false;
return __lhs.compare(__rhs) == 0;
}
// The dummy default template parameters are used to work around a MSVC issue with mangling, see VSO-409326 for details.
// This applies to the other sufficient overloads below for the other comparison operators.
template<class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator==(basic_string_view<_CharT, _Traits> __lhs,
- typename common_type<basic_string_view<_CharT, _Traits> >::type __rhs) _NOEXCEPT
+ __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT
{
- if ( __lhs.size() != __rhs.size()) return false;
+ if (__lhs.size() != __rhs.size()) return false;
return __lhs.compare(__rhs) == 0;
}
+#if _LIBCPP_STD_VER < 20
+// This overload is automatically generated in C++20.
template<class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-bool operator==(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs,
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
+bool operator==(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
- if ( __lhs.size() != __rhs.size()) return false;
+ if (__lhs.size() != __rhs.size()) return false;
return __lhs.compare(__rhs) == 0;
}
+#endif // _LIBCPP_STD_VER > 17
+
+// operator <=>
+#if _LIBCPP_STD_VER > 17
+
+template <class _CharT, class _Traits>
+_LIBCPP_HIDE_FROM_ABI constexpr auto
+operator<=>(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) noexcept {
+ if constexpr (requires { typename _Traits::comparison_category; }) {
+ // [string.view]/4
+ static_assert(
+ __comparison_category<typename _Traits::comparison_category>,
+ "return type is not a comparison category type");
+ return static_cast<typename _Traits::comparison_category>(__lhs.compare(__rhs) <=> 0);
+ } else {
+ return static_cast<weak_ordering>(__lhs.compare(__rhs) <=> 0);
+ }
+}
+
+template <class _CharT, class _Traits, int = 1>
+_LIBCPP_HIDE_FROM_ABI constexpr auto operator<=>(
+ basic_string_view<_CharT, _Traits> __lhs, type_identity_t<basic_string_view<_CharT, _Traits>> __rhs) noexcept {
+ if constexpr (requires { typename _Traits::comparison_category; }) {
+ // [string.view]/4
+ static_assert(
+ __comparison_category<typename _Traits::comparison_category>,
+ "return type is not a comparison category type");
+ return static_cast<typename _Traits::comparison_category>(__lhs.compare(__rhs) <=> 0);
+ } else {
+ return static_cast<weak_ordering>(__lhs.compare(__rhs) <=> 0);
+ }
+}
+
+#else // _LIBCPP_STD_VER > 17
// operator !=
template<class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator!=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
- if ( __lhs.size() != __rhs.size())
+ if (__lhs.size() != __rhs.size())
return true;
return __lhs.compare(__rhs) != 0;
}
template<class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator!=(basic_string_view<_CharT, _Traits> __lhs,
- typename common_type<basic_string_view<_CharT, _Traits> >::type __rhs) _NOEXCEPT
+ __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT
{
- if ( __lhs.size() != __rhs.size())
+ if (__lhs.size() != __rhs.size())
return true;
return __lhs.compare(__rhs) != 0;
}
template<class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-bool operator!=(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs,
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
+bool operator!=(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
- if ( __lhs.size() != __rhs.size())
+ if (__lhs.size() != __rhs.size())
return true;
return __lhs.compare(__rhs) != 0;
}
@@ -817,23 +846,23 @@ bool operator!=(typename common_type<basic_string_view<_CharT, _Traits> >::type
// operator <
template<class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator<(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
return __lhs.compare(__rhs) < 0;
}
template<class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator<(basic_string_view<_CharT, _Traits> __lhs,
- typename common_type<basic_string_view<_CharT, _Traits> >::type __rhs) _NOEXCEPT
+ __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT
{
return __lhs.compare(__rhs) < 0;
}
template<class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-bool operator<(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs,
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
+bool operator<(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
return __lhs.compare(__rhs) < 0;
@@ -842,23 +871,23 @@ bool operator<(typename common_type<basic_string_view<_CharT, _Traits> >::type _
// operator >
template<class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator> (basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
return __lhs.compare(__rhs) > 0;
}
template<class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator>(basic_string_view<_CharT, _Traits> __lhs,
- typename common_type<basic_string_view<_CharT, _Traits> >::type __rhs) _NOEXCEPT
+ __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT
{
return __lhs.compare(__rhs) > 0;
}
template<class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-bool operator>(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs,
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
+bool operator>(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
return __lhs.compare(__rhs) > 0;
@@ -867,23 +896,23 @@ bool operator>(typename common_type<basic_string_view<_CharT, _Traits> >::type _
// operator <=
template<class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator<=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
return __lhs.compare(__rhs) <= 0;
}
template<class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator<=(basic_string_view<_CharT, _Traits> __lhs,
- typename common_type<basic_string_view<_CharT, _Traits> >::type __rhs) _NOEXCEPT
+ __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT
{
return __lhs.compare(__rhs) <= 0;
}
template<class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-bool operator<=(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs,
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
+bool operator<=(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
return __lhs.compare(__rhs) <= 0;
@@ -892,7 +921,7 @@ bool operator<=(typename common_type<basic_string_view<_CharT, _Traits> >::type
// operator >=
template<class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator>=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
return __lhs.compare(__rhs) >= 0;
@@ -900,31 +929,31 @@ bool operator>=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_Cha
template<class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator>=(basic_string_view<_CharT, _Traits> __lhs,
- typename common_type<basic_string_view<_CharT, _Traits> >::type __rhs) _NOEXCEPT
+ __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT
{
return __lhs.compare(__rhs) >= 0;
}
template<class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-bool operator>=(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs,
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
+bool operator>=(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
return __lhs.compare(__rhs) >= 0;
}
+#endif // _LIBCPP_STD_VER > 17
template<class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
basic_string_view<_CharT, _Traits> __str);
// [string.view.hash]
template<class _CharT>
-struct _LIBCPP_TEMPLATE_VIS hash<basic_string_view<_CharT, char_traits<_CharT> > >
- : public __unary_function<basic_string_view<_CharT, char_traits<_CharT> >, size_t>
+struct __string_view_hash : public __unary_function<basic_string_view<_CharT, char_traits<_CharT> >, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(const basic_string_view<_CharT, char_traits<_CharT> > __val) const _NOEXCEPT {
@@ -932,6 +961,25 @@ struct _LIBCPP_TEMPLATE_VIS hash<basic_string_view<_CharT, char_traits<_CharT> >
}
};
+template <>
+struct hash<basic_string_view<char, char_traits<char> > > : __string_view_hash<char> {};
+
+#ifndef _LIBCPP_HAS_NO_CHAR8_T
+template <>
+struct hash<basic_string_view<char8_t, char_traits<char8_t> > > : __string_view_hash<char8_t> {};
+#endif
+
+template <>
+struct hash<basic_string_view<char16_t, char_traits<char16_t> > > : __string_view_hash<char16_t> {};
+
+template <>
+struct hash<basic_string_view<char32_t, char_traits<char32_t> > > : __string_view_hash<char32_t> {};
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <>
+struct hash<basic_string_view<wchar_t, char_traits<wchar_t> > > : __string_view_hash<wchar_t> {};
+#endif
+
#if _LIBCPP_STD_VER > 11
inline namespace literals
{
@@ -977,4 +1025,11 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <algorithm>
+# include <concepts>
+# include <functional>
+# include <iterator>
+#endif
+
#endif // _LIBCPP_STRING_VIEW
diff --git a/contrib/libs/cxxsupp/libcxx/include/strstream b/contrib/libs/cxxsupp/libcxx/include/strstream
index 72386bb956..9382473f68 100644
--- a/contrib/libs/cxxsupp/libcxx/include/strstream
+++ b/contrib/libs/cxxsupp/libcxx/include/strstream
@@ -167,7 +167,7 @@ public:
strstreambuf& operator=(strstreambuf&& __rhs);
#endif // _LIBCPP_CXX03_LANG
- virtual ~strstreambuf();
+ ~strstreambuf() override;
void swap(strstreambuf& __rhs);
@@ -176,13 +176,13 @@ public:
int pcount() const;
protected:
- virtual int_type overflow (int_type __c = EOF);
- virtual int_type pbackfail(int_type __c = EOF);
- virtual int_type underflow();
- virtual pos_type seekoff(off_type __off, ios_base::seekdir __way,
- ios_base::openmode __which = ios_base::in | ios_base::out);
- virtual pos_type seekpos(pos_type __sp,
- ios_base::openmode __which = ios_base::in | ios_base::out);
+ int_type overflow (int_type __c = EOF) override;
+ int_type pbackfail(int_type __c = EOF) override;
+ int_type underflow() override;
+ pos_type seekoff(off_type __off, ios_base::seekdir __way,
+ ios_base::openmode __which = ios_base::in | ios_base::out) override;
+ pos_type seekpos(pos_type __sp,
+ ios_base::openmode __which = ios_base::in | ios_base::out) override;
private:
typedef unsigned __mode_type;
@@ -272,7 +272,7 @@ public:
}
#endif // _LIBCPP_CXX03_LANG
- virtual ~istrstream();
+ ~istrstream() override;
_LIBCPP_INLINE_VISIBILITY
void swap(istrstream& __rhs)
@@ -321,7 +321,7 @@ public:
}
#endif // _LIBCPP_CXX03_LANG
- virtual ~ostrstream();
+ ~ostrstream() override;
_LIBCPP_INLINE_VISIBILITY
void swap(ostrstream& __rhs)
@@ -381,7 +381,7 @@ public:
}
#endif // _LIBCPP_CXX03_LANG
- virtual ~strstream();
+ ~strstream() override;
_LIBCPP_INLINE_VISIBILITY
void swap(strstream& __rhs)
diff --git a/contrib/libs/cxxsupp/libcxx/include/system_error b/contrib/libs/cxxsupp/libcxx/include/system_error
index 3b705aa81e..98919927bc 100644
--- a/contrib/libs/cxxsupp/libcxx/include/system_error
+++ b/contrib/libs/cxxsupp/libcxx/include/system_error
@@ -32,8 +32,9 @@ public:
virtual string message(int ev) const = 0;
bool operator==(const error_category& rhs) const noexcept;
- bool operator!=(const error_category& rhs) const noexcept;
- bool operator<(const error_category& rhs) const noexcept;
+ bool operator!=(const error_category& rhs) const noexcept; // removed in C++20
+ bool operator<(const error_category& rhs) const noexcept; // removed in C++20
+ strong_ordering operator<=>(const error_category& rhs) const noexcept; // C++20
};
const error_category& generic_category() noexcept;
@@ -75,7 +76,6 @@ public:
};
// non-member functions:
-bool operator<(const error_code& lhs, const error_code& rhs) noexcept;
template <class charT, class traits>
basic_ostream<charT,traits>&
operator<<(basic_ostream<charT,traits>& os, const error_code& ec);
@@ -102,8 +102,6 @@ public:
explicit operator bool() const noexcept;
};
-bool operator<(const error_condition& lhs, const error_condition& rhs) noexcept;
-
class system_error
: public runtime_error
{
@@ -128,12 +126,16 @@ error_condition make_error_condition(errc e) noexcept;
// Comparison operators:
bool operator==(const error_code& lhs, const error_code& rhs) noexcept;
bool operator==(const error_code& lhs, const error_condition& rhs) noexcept;
-bool operator==(const error_condition& lhs, const error_code& rhs) noexcept;
+bool operator==(const error_condition& lhs, const error_code& rhs) noexcept; // removed in C++20
bool operator==(const error_condition& lhs, const error_condition& rhs) noexcept;
-bool operator!=(const error_code& lhs, const error_code& rhs) noexcept;
-bool operator!=(const error_code& lhs, const error_condition& rhs) noexcept;
-bool operator!=(const error_condition& lhs, const error_code& rhs) noexcept;
-bool operator!=(const error_condition& lhs, const error_condition& rhs) noexcept;
+bool operator!=(const error_code& lhs, const error_code& rhs) noexcept; // removed in C++20
+bool operator!=(const error_code& lhs, const error_condition& rhs) noexcept; // removed in C++20
+bool operator!=(const error_condition& lhs, const error_code& rhs) noexcept; // removed in C++20
+bool operator!=(const error_condition& lhs, const error_condition& rhs) noexcept; // removed in C++20
+bool operator<(const error_condition& lhs, const error_condition& rhs) noexcept; // removed in C++20
+bool operator<(const error_code& lhs, const error_code& rhs) noexcept; // removed in C++20
+strong_ordering operator<=>(const error_code& lhs, const error_code& rhs) noexcept; // C++20
+strong_ordering operator<=>(const error_condition& lhs, const error_condition& rhs) noexcept; // C++20
template <> struct hash<std::error_code>;
template <> struct hash<std::error_condition>;
@@ -147,12 +149,15 @@ template <> struct hash<std::error_condition>;
#include <__errc>
#include <__functional/hash.h>
#include <__functional/unary_function.h>
+#include <__memory/addressof.h>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <version>
// standard-mandated includes
+
+// [system.error.syn]
#include <compare>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -209,7 +214,7 @@ public:
error_category() noexcept;
#else
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT = default;
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 error_category() _NOEXCEPT = default;
#endif
error_category(const error_category&) = delete;
error_category& operator=(const error_category&) = delete;
@@ -223,12 +228,21 @@ public:
_LIBCPP_INLINE_VISIBILITY
bool operator==(const error_category& __rhs) const _NOEXCEPT {return this == &__rhs;}
+#if _LIBCPP_STD_VER > 17
+
+ _LIBCPP_HIDE_FROM_ABI
+ strong_ordering operator<=>(const error_category& __rhs) const noexcept {return compare_three_way()(this, std::addressof(__rhs));}
+
+#else // _LIBCPP_STD_VER > 17
+
_LIBCPP_INLINE_VISIBILITY
bool operator!=(const error_category& __rhs) const _NOEXCEPT {return !(*this == __rhs);}
_LIBCPP_INLINE_VISIBILITY
bool operator< (const error_category& __rhs) const _NOEXCEPT {return this < &__rhs;}
+#endif // _LIBCPP_STD_VER > 17
+
friend class _LIBCPP_HIDDEN __do_message;
};
@@ -236,12 +250,19 @@ class _LIBCPP_HIDDEN __do_message
: public error_category
{
public:
- virtual string message(int __ev) const;
+ string message(int __ev) const override;
};
_LIBCPP_FUNC_VIS const error_category& generic_category() _NOEXCEPT;
_LIBCPP_FUNC_VIS const error_category& system_category() _NOEXCEPT;
+namespace __adl_only {
+ // Those cause ADL to trigger but they are not viable candidates,
+ // so they are never actually selected.
+ void make_error_condition() = delete;
+ void make_error_code() = delete;
+} // namespace __adl_only
+
class _LIBCPP_TYPE_VIS error_condition
{
int __val_;
@@ -259,7 +280,10 @@ public:
error_condition(_Ep __e,
typename enable_if<is_error_condition_enum<_Ep>::value>::type* = nullptr
) _NOEXCEPT
- {*this = make_error_condition(__e);}
+ {
+ using __adl_only::make_error_condition;
+ *this = make_error_condition(__e);
+ }
_LIBCPP_INLINE_VISIBILITY
void assign(int __val, const error_category& __cat) _NOEXCEPT
@@ -276,7 +300,11 @@ public:
error_condition&
>::type
operator=(_Ep __e) _NOEXCEPT
- {*this = make_error_condition(__e); return *this;}
+ {
+ using __adl_only::make_error_condition;
+ *this = make_error_condition(__e);
+ return *this;
+ }
_LIBCPP_INLINE_VISIBILITY
void clear() _NOEXCEPT
@@ -303,14 +331,6 @@ make_error_condition(errc __e) _NOEXCEPT
return error_condition(static_cast<int>(__e), generic_category());
}
-inline _LIBCPP_INLINE_VISIBILITY
-bool
-operator<(const error_condition& __x, const error_condition& __y) _NOEXCEPT
-{
- return __x.category() < __y.category()
- || (__x.category() == __y.category() && __x.value() < __y.value());
-}
-
// error_code
class _LIBCPP_TYPE_VIS error_code
@@ -330,7 +350,10 @@ public:
error_code(_Ep __e,
typename enable_if<is_error_code_enum<_Ep>::value>::type* = nullptr
) _NOEXCEPT
- {*this = make_error_code(__e);}
+ {
+ using __adl_only::make_error_code;
+ *this = make_error_code(__e);
+ }
_LIBCPP_INLINE_VISIBILITY
void assign(int __val, const error_category& __cat) _NOEXCEPT
@@ -347,7 +370,11 @@ public:
error_code&
>::type
operator=(_Ep __e) _NOEXCEPT
- {*this = make_error_code(__e); return *this;}
+ {
+ using __adl_only::make_error_code;
+ *this = make_error_code(__e);
+ return *this;
+ }
_LIBCPP_INLINE_VISIBILITY
void clear() _NOEXCEPT
@@ -381,14 +408,6 @@ make_error_code(errc __e) _NOEXCEPT
inline _LIBCPP_INLINE_VISIBILITY
bool
-operator<(const error_code& __x, const error_code& __y) _NOEXCEPT
-{
- return __x.category() < __y.category()
- || (__x.category() == __y.category() && __x.value() < __y.value());
-}
-
-inline _LIBCPP_INLINE_VISIBILITY
-bool
operator==(const error_code& __x, const error_code& __y) _NOEXCEPT
{
return __x.category() == __y.category() && __x.value() == __y.value();
@@ -402,12 +421,14 @@ operator==(const error_code& __x, const error_condition& __y) _NOEXCEPT
|| __y.category().equivalent(__x, __y.value());
}
+#if _LIBCPP_STD_VER <= 17
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const error_condition& __x, const error_code& __y) _NOEXCEPT
{
return __y == __x;
}
+#endif
inline _LIBCPP_INLINE_VISIBILITY
bool
@@ -416,6 +437,8 @@ operator==(const error_condition& __x, const error_condition& __y) _NOEXCEPT
return __x.category() == __y.category() && __x.value() == __y.value();
}
+#if _LIBCPP_STD_VER <= 17
+
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const error_code& __x, const error_code& __y) _NOEXCEPT
@@ -436,6 +459,42 @@ bool
operator!=(const error_condition& __x, const error_condition& __y) _NOEXCEPT
{return !(__x == __y);}
+inline _LIBCPP_INLINE_VISIBILITY
+bool
+operator<(const error_condition& __x, const error_condition& __y) _NOEXCEPT
+{
+ return __x.category() < __y.category()
+ || (__x.category() == __y.category() && __x.value() < __y.value());
+}
+
+inline _LIBCPP_INLINE_VISIBILITY
+bool
+operator<(const error_code& __x, const error_code& __y) _NOEXCEPT
+{
+ return __x.category() < __y.category()
+ || (__x.category() == __y.category() && __x.value() < __y.value());
+}
+
+#else // _LIBCPP_STD_VER <= 17
+
+inline _LIBCPP_HIDE_FROM_ABI strong_ordering
+operator<=>(const error_code& __x, const error_code& __y) noexcept
+{
+ if (auto __c = __x.category() <=> __y.category(); __c != 0)
+ return __c;
+ return __x.value() <=> __y.value();
+}
+
+inline _LIBCPP_HIDE_FROM_ABI strong_ordering
+operator<=>(const error_condition& __x, const error_condition& __y) noexcept
+{
+ if (auto __c = __x.category() <=> __y.category(); __c != 0)
+ return __c;
+ return __x.value() <=> __y.value();
+}
+
+#endif // _LIBCPP_STD_VER <= 17
+
template <>
struct _LIBCPP_TEMPLATE_VIS hash<error_code>
: public __unary_function<error_code, size_t>
@@ -472,7 +531,7 @@ public:
system_error(int __ev, const error_category& __ecat, const char* __what_arg);
system_error(int __ev, const error_category& __ecat);
system_error(const system_error&) _NOEXCEPT = default;
- ~system_error() _NOEXCEPT;
+ ~system_error() _NOEXCEPT override;
_LIBCPP_INLINE_VISIBILITY
const error_code& code() const _NOEXCEPT {return __ec_;}
diff --git a/contrib/libs/cxxsupp/libcxx/include/thread b/contrib/libs/cxxsupp/libcxx/include/thread
index 1c8eb19898..7c6d4f8828 100644
--- a/contrib/libs/cxxsupp/libcxx/include/thread
+++ b/contrib/libs/cxxsupp/libcxx/include/thread
@@ -53,11 +53,12 @@ public:
};
bool operator==(thread::id x, thread::id y) noexcept;
-bool operator!=(thread::id x, thread::id y) noexcept;
-bool operator< (thread::id x, thread::id y) noexcept;
-bool operator<=(thread::id x, thread::id y) noexcept;
-bool operator> (thread::id x, thread::id y) noexcept;
-bool operator>=(thread::id x, thread::id y) noexcept;
+bool operator!=(thread::id x, thread::id y) noexcept; // removed in C++20
+bool operator< (thread::id x, thread::id y) noexcept; // removed in C++20
+bool operator<=(thread::id x, thread::id y) noexcept; // removed in C++20
+bool operator> (thread::id x, thread::id y) noexcept; // removed in C++20
+bool operator>=(thread::id x, thread::id y) noexcept; // removed in C++20
+strong_ordering operator<=>(thread::id x, thread::id y) noexcept; // C++20
template<class charT, class traits>
basic_ostream<charT, traits>&
@@ -85,6 +86,7 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
#include <__functional/hash.h>
+#include <__memory/unique_ptr.h>
#include <__mutex_base>
#include <__thread/poll_with_backoff.h>
#include <__thread/timed_backoff_policy.h>
@@ -92,18 +94,14 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
#include <__utility/forward.h>
#include <cstddef>
#include <iosfwd>
-#include <memory>
#include <system_error>
#include <tuple>
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <chrono>
-# include <functional>
-#endif
-
// standard-mandated includes
+
+// [thread.syn]
#include <compare>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -235,7 +233,7 @@ public:
thread() _NOEXCEPT : __t_(_LIBCPP_NULL_THREAD) {}
#ifndef _LIBCPP_CXX03_LANG
template <class _Fp, class ..._Args,
- class = __enable_if_t<!is_same<__uncvref_t<_Fp>, thread>::value> >
+ class = __enable_if_t<!is_same<__remove_cvref_t<_Fp>, thread>::value> >
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
explicit thread(_Fp&& __f, _Args&&... __args);
#else // _LIBCPP_CXX03_LANG
@@ -328,7 +326,7 @@ struct __thread_invoke_pair {
};
template <class _Fp>
-void* __thread_proxy_cxx03(void* __vp)
+_LIBCPP_HIDE_FROM_ABI void* __thread_proxy_cxx03(void* __vp)
{
unique_ptr<_Fp> __p(static_cast<_Fp*>(__vp));
__thread_local_data().set_pointer(__p->__tsp_.release());
@@ -361,7 +359,7 @@ namespace this_thread
_LIBCPP_FUNC_VIS void sleep_for(const chrono::nanoseconds& __ns);
template <class _Rep, class _Period>
-void
+_LIBCPP_HIDE_FROM_ABI void
sleep_for(const chrono::duration<_Rep, _Period>& __d)
{
if (__d > chrono::duration<_Rep, _Period>::zero())
@@ -385,7 +383,7 @@ sleep_for(const chrono::duration<_Rep, _Period>& __d)
}
template <class _Clock, class _Duration>
-void
+_LIBCPP_HIDE_FROM_ABI void
sleep_until(const chrono::time_point<_Clock, _Duration>& __t)
{
mutex __mut;
@@ -412,4 +410,12 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
+# include <chrono>
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <functional>
+#endif
+
#endif // _LIBCPP_THREAD
diff --git a/contrib/libs/cxxsupp/libcxx/include/tuple b/contrib/libs/cxxsupp/libcxx/include/tuple
index 520e85e637..a307461658 100644
--- a/contrib/libs/cxxsupp/libcxx/include/tuple
+++ b/contrib/libs/cxxsupp/libcxx/include/tuple
@@ -206,9 +206,10 @@ template <class... Types>
#include <__compare/synth_three_way.h>
#include <__config>
#include <__functional/unwrap_ref.h>
+#include <__fwd/array.h>
#include <__memory/allocator_arg_t.h>
#include <__memory/uses_allocator.h>
-#include <__tuple>
+#include <__type_traits/maybe_const.h>
#include <__utility/forward.h>
#include <__utility/integer_sequence.h>
#include <__utility/move.h>
@@ -219,15 +220,9 @@ template <class... Types>
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <exception>
-# include <iosfwd>
-# include <new>
-# include <typeinfo>
-# include <utility>
-#endif
-
// standard-mandated includes
+
+// [tuple.syn]
#include <compare>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -247,7 +242,7 @@ template <size_t _Ip, class _Hp,
class __tuple_leaf;
template <size_t _Ip, class _Hp, bool _Ep>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
void swap(__tuple_leaf<_Ip, _Hp, _Ep>& __x, __tuple_leaf<_Ip, _Hp, _Ep>& __y)
_NOEXCEPT_(__is_nothrow_swappable<_Hp>::value)
{
@@ -255,7 +250,7 @@ void swap(__tuple_leaf<_Ip, _Hp, _Ep>& __x, __tuple_leaf<_Ip, _Hp, _Ep>& __y)
}
template <size_t _Ip, class _Hp, bool _Ep>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void swap(const __tuple_leaf<_Ip, _Hp, _Ep>& __x, const __tuple_leaf<_Ip, _Hp, _Ep>& __y)
_NOEXCEPT_(__is_nothrow_swappable<const _Hp>::value) {
swap(__x.get(), __y.get());
@@ -275,7 +270,7 @@ class __tuple_leaf
#endif
}
- _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
__tuple_leaf& operator=(const __tuple_leaf&);
public:
_LIBCPP_INLINE_VISIBILITY constexpr __tuple_leaf()
@@ -307,33 +302,33 @@ public:
template <class _Tp,
class = __enable_if_t<
_And<
- _IsNotSame<__uncvref_t<_Tp>, __tuple_leaf>,
+ _IsNotSame<__remove_cvref_t<_Tp>, __tuple_leaf>,
is_constructible<_Hp, _Tp>
>::value
>
>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit __tuple_leaf(_Tp&& __t) _NOEXCEPT_((is_nothrow_constructible<_Hp, _Tp>::value))
: __value_(_VSTD::forward<_Tp>(__t))
{static_assert(__can_bind_reference<_Tp&&>(),
"Attempted construction of reference element binds to a temporary whose lifetime has ended");}
template <class _Tp, class _Alloc>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit __tuple_leaf(integral_constant<int, 0>, const _Alloc&, _Tp&& __t)
: __value_(_VSTD::forward<_Tp>(__t))
{static_assert(__can_bind_reference<_Tp&&>(),
"Attempted construction of reference element binds to a temporary whose lifetime has ended");}
template <class _Tp, class _Alloc>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a, _Tp&& __t)
: __value_(allocator_arg_t(), __a, _VSTD::forward<_Tp>(__t))
{static_assert(!is_reference<_Hp>::value,
"Attempted to uses-allocator construct a reference element in a tuple");}
template <class _Tp, class _Alloc>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a, _Tp&& __t)
: __value_(_VSTD::forward<_Tp>(__t), __a)
{static_assert(!is_reference<_Hp>::value,
@@ -342,28 +337,28 @@ public:
__tuple_leaf(const __tuple_leaf& __t) = default;
__tuple_leaf(__tuple_leaf&& __t) = default;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
int swap(__tuple_leaf& __t) _NOEXCEPT_(__is_nothrow_swappable<__tuple_leaf>::value)
{
_VSTD::swap(*this, __t);
return 0;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
int swap(const __tuple_leaf& __t) const _NOEXCEPT_(__is_nothrow_swappable<const __tuple_leaf>::value) {
_VSTD::swap(*this, __t);
return 0;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _Hp& get() _NOEXCEPT {return __value_;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const _Hp& get() const _NOEXCEPT {return __value_;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 _Hp& get() _NOEXCEPT {return __value_;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Hp& get() const _NOEXCEPT {return __value_;}
};
template <size_t _Ip, class _Hp>
class __tuple_leaf<_Ip, _Hp, true>
: private _Hp
{
- _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
__tuple_leaf& operator=(const __tuple_leaf&);
public:
_LIBCPP_INLINE_VISIBILITY constexpr __tuple_leaf()
@@ -386,12 +381,12 @@ public:
template <class _Tp,
class = __enable_if_t<
_And<
- _IsNotSame<__uncvref_t<_Tp>, __tuple_leaf>,
+ _IsNotSame<__remove_cvref_t<_Tp>, __tuple_leaf>,
is_constructible<_Hp, _Tp>
>::value
>
>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit __tuple_leaf(_Tp&& __t) _NOEXCEPT_((is_nothrow_constructible<_Hp, _Tp>::value))
: _Hp(_VSTD::forward<_Tp>(__t)) {}
@@ -413,7 +408,7 @@ public:
__tuple_leaf(__tuple_leaf const &) = default;
__tuple_leaf(__tuple_leaf &&) = default;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
int
swap(__tuple_leaf& __t) _NOEXCEPT_(__is_nothrow_swappable<__tuple_leaf>::value)
{
@@ -421,18 +416,18 @@ public:
return 0;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
int swap(const __tuple_leaf& __rhs) const _NOEXCEPT_(__is_nothrow_swappable<const __tuple_leaf>::value) {
_VSTD::swap(*this, __rhs);
return 0;
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _Hp& get() _NOEXCEPT {return static_cast<_Hp&>(*this);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const _Hp& get() const _NOEXCEPT {return static_cast<const _Hp&>(*this);}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 _Hp& get() _NOEXCEPT {return static_cast<_Hp&>(*this);}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Hp& get() const _NOEXCEPT {return static_cast<const _Hp&>(*this);}
};
template <class ..._Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
void __swallow(_Tp&&...) _NOEXCEPT {}
template <class _Tp>
@@ -457,7 +452,7 @@ struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp.
template <size_t ..._Uf, class ..._Tf,
size_t ..._Ul, class ..._Tl, class ..._Up>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit
__tuple_impl(__tuple_indices<_Uf...>, __tuple_types<_Tf...>,
__tuple_indices<_Ul...>, __tuple_types<_Tl...>,
@@ -470,7 +465,7 @@ struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp.
template <class _Alloc, size_t ..._Uf, class ..._Tf,
size_t ..._Ul, class ..._Tl, class ..._Up>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit
__tuple_impl(allocator_arg_t, const _Alloc& __a,
__tuple_indices<_Uf...>, __tuple_types<_Tf...>,
@@ -484,7 +479,7 @@ struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp.
template <class _Tuple,
class = __enable_if_t<__tuple_constructible<_Tuple, tuple<_Tp...> >::value>
>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
__tuple_impl(_Tuple&& __t) _NOEXCEPT_((__all<is_nothrow_constructible<_Tp, typename tuple_element<_Indx,
typename __make_tuple_types<_Tuple>::type>::type>::value...>::value))
: __tuple_leaf<_Indx, _Tp>(_VSTD::forward<typename tuple_element<_Indx,
@@ -494,7 +489,7 @@ struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp.
template <class _Alloc, class _Tuple,
class = __enable_if_t<__tuple_constructible<_Tuple, tuple<_Tp...> >::value>
>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
__tuple_impl(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
: __tuple_leaf<_Indx, _Tp>(__uses_alloc_ctor<_Tp, _Alloc, typename tuple_element<_Indx,
typename __make_tuple_types<_Tuple>::type>::type>(), __a,
@@ -505,14 +500,14 @@ struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp.
__tuple_impl(const __tuple_impl&) = default;
__tuple_impl(__tuple_impl&&) = default;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
void swap(__tuple_impl& __t)
_NOEXCEPT_(__all<__is_nothrow_swappable<_Tp>::value...>::value)
{
_VSTD::__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<__tuple_leaf<_Indx, _Tp>&>(__t))...);
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
void swap(const __tuple_impl& __t) const
_NOEXCEPT_(__all<__is_nothrow_swappable<const _Tp>::value...>::value)
{
@@ -521,13 +516,13 @@ struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp.
};
template<class _Dest, class _Source, size_t ..._Np>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
void __memberwise_copy_assign(_Dest& __dest, _Source const& __source, __tuple_indices<_Np...>) {
_VSTD::__swallow(((_VSTD::get<_Np>(__dest) = _VSTD::get<_Np>(__source)), void(), 0)...);
}
template<class _Dest, class _Source, class ..._Up, size_t ..._Np>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
void __memberwise_forward_assign(_Dest& __dest, _Source&& __source, __tuple_types<_Up...>, __tuple_indices<_Np...>) {
_VSTD::__swallow(((
_VSTD::get<_Np>(__dest) = _VSTD::forward<_Up>(_VSTD::get<_Np>(__source))
@@ -541,13 +536,13 @@ class _LIBCPP_TEMPLATE_VIS tuple
_BaseT __base_;
- template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_AFTER_CXX11
+ template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Jp, tuple<_Up...> >::type& get(tuple<_Up...>&) _NOEXCEPT;
- template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_AFTER_CXX11
+ template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element<_Jp, tuple<_Up...> >::type& get(const tuple<_Up...>&) _NOEXCEPT;
- template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_AFTER_CXX11
+ template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Jp, tuple<_Up...> >::type&& get(tuple<_Up...>&&) _NOEXCEPT;
- template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_AFTER_CXX11
+ template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element<_Jp, tuple<_Up...> >::type&& get(const tuple<_Up...>&&) _NOEXCEPT;
public:
// [tuple.cnstr]
@@ -580,7 +575,7 @@ public:
_IsImpDefault<_Tp>... // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple(allocator_arg_t, _Alloc const& __a)
: __base_(allocator_arg_t(), __a,
__tuple_indices<>(), __tuple_types<>(),
@@ -595,7 +590,7 @@ public:
_Not<_Lazy<_And, _IsImpDefault<_Tp>...> > // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
explicit tuple(allocator_arg_t, _Alloc const& __a)
: __base_(allocator_arg_t(), __a,
__tuple_indices<>(), __tuple_types<>(),
@@ -610,7 +605,7 @@ public:
is_convertible<const _Tp&, _Tp>... // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
tuple(const _Tp& ... __t)
_NOEXCEPT_(_And<is_nothrow_copy_constructible<_Tp>...>::value)
: __base_(typename __make_tuple_indices<sizeof...(_Tp)>::type(),
@@ -627,7 +622,7 @@ public:
_Not<_Lazy<_And, is_convertible<const _Tp&, _Tp>...> > // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit tuple(const _Tp& ... __t)
_NOEXCEPT_(_And<is_nothrow_copy_constructible<_Tp>...>::value)
: __base_(typename __make_tuple_indices<sizeof...(_Tp)>::type(),
@@ -644,7 +639,7 @@ public:
is_convertible<const _Tp&, _Tp>... // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
: __base_(allocator_arg_t(), __a,
typename __make_tuple_indices<sizeof...(_Tp)>::type(),
@@ -661,7 +656,7 @@ public:
_Not<_Lazy<_And, is_convertible<const _Tp&, _Tp>...> > // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
explicit tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
: __base_(allocator_arg_t(), __a,
typename __make_tuple_indices<sizeof...(_Tp)>::type(),
@@ -673,7 +668,7 @@ public:
// tuple(U&& ...) constructors (including allocator_arg_t variants)
template <class ..._Up> struct _IsThisTuple : false_type { };
- template <class _Up> struct _IsThisTuple<_Up> : is_same<__uncvref_t<_Up>, tuple> { };
+ template <class _Up> struct _IsThisTuple<_Up> : is_same<__remove_cvref_t<_Up>, tuple> { };
template <class ..._Up>
struct _EnableUTypesCtor : _And<
@@ -689,7 +684,7 @@ public:
is_convertible<_Up, _Tp>... // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
tuple(_Up&&... __u)
_NOEXCEPT_((_And<is_nothrow_constructible<_Tp, _Up>...>::value))
: __base_(typename __make_tuple_indices<sizeof...(_Up)>::type(),
@@ -705,7 +700,7 @@ public:
_Not<_Lazy<_And, is_convertible<_Up, _Tp>...> > // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit tuple(_Up&&... __u)
_NOEXCEPT_((_And<is_nothrow_constructible<_Tp, _Up>...>::value))
: __base_(typename __make_tuple_indices<sizeof...(_Up)>::type(),
@@ -721,7 +716,7 @@ public:
is_convertible<_Up, _Tp>... // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
: __base_(allocator_arg_t(), __a,
typename __make_tuple_indices<sizeof...(_Up)>::type(),
@@ -737,7 +732,7 @@ public:
_Not<_Lazy<_And, is_convertible<_Up, _Tp>...> > // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
explicit tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
: __base_(allocator_arg_t(), __a,
typename __make_tuple_indices<sizeof...(_Up)>::type(),
@@ -753,7 +748,7 @@ public:
template <class _Alloc, template<class...> class _And = _And, __enable_if_t<
_And<is_copy_constructible<_Tp>...>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple(allocator_arg_t, const _Alloc& __alloc, const tuple& __t)
: __base_(allocator_arg_t(), __alloc, __t)
{ }
@@ -761,14 +756,14 @@ public:
template <class _Alloc, template<class...> class _And = _And, __enable_if_t<
_And<is_move_constructible<_Tp>...>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple(allocator_arg_t, const _Alloc& __alloc, tuple&& __t)
: __base_(allocator_arg_t(), __alloc, _VSTD::move(__t))
{ }
// tuple(const tuple<U...>&) constructors (including allocator_arg_t variants)
- template <class _OtherTuple, class _DecayedOtherTuple = __uncvref_t<_OtherTuple>, class = void>
+ template <class _OtherTuple, class _DecayedOtherTuple = __remove_cvref_t<_OtherTuple>, class = void>
struct _EnableCtorFromUTypesTuple : false_type {};
template <class _OtherTuple, class... _Up>
@@ -797,7 +792,7 @@ public:
is_convertible<const _Up&, _Tp>... // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
tuple(const tuple<_Up...>& __t)
_NOEXCEPT_((_And<is_nothrow_constructible<_Tp, const _Up&>...>::value))
: __base_(__t)
@@ -809,7 +804,7 @@ public:
_Not<_Lazy<_And, is_convertible<const _Up&, _Tp>...> > // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit tuple(const tuple<_Up...>& __t)
_NOEXCEPT_((_And<is_nothrow_constructible<_Tp, const _Up&>...>::value))
: __base_(__t)
@@ -821,7 +816,7 @@ public:
is_convertible<const _Up&, _Tp>... // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple(allocator_arg_t, const _Alloc& __a, const tuple<_Up...>& __t)
: __base_(allocator_arg_t(), __a, __t)
{ }
@@ -832,7 +827,7 @@ public:
_Not<_Lazy<_And, is_convertible<const _Up&, _Tp>...> > // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
explicit tuple(allocator_arg_t, const _Alloc& __a, const tuple<_Up...>& __t)
: __base_(allocator_arg_t(), __a, __t)
{ }
@@ -861,7 +856,7 @@ public:
is_convertible<_Up, _Tp>... // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
tuple(tuple<_Up...>&& __t)
_NOEXCEPT_((_And<is_nothrow_constructible<_Tp, _Up>...>::value))
: __base_(_VSTD::move(__t))
@@ -873,7 +868,7 @@ public:
_Not<_Lazy<_And, is_convertible<_Up, _Tp>...> > // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit tuple(tuple<_Up...>&& __t)
_NOEXCEPT_((_And<is_nothrow_constructible<_Tp, _Up>...>::value))
: __base_(_VSTD::move(__t))
@@ -885,7 +880,7 @@ public:
is_convertible<_Up, _Tp>... // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple(allocator_arg_t, const _Alloc& __a, tuple<_Up...>&& __t)
: __base_(allocator_arg_t(), __a, _VSTD::move(__t))
{ }
@@ -896,7 +891,7 @@ public:
_Not<_Lazy<_And, is_convertible<_Up, _Tp>...> > // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
explicit tuple(allocator_arg_t, const _Alloc& __a, tuple<_Up...>&& __t)
: __base_(allocator_arg_t(), __a, _VSTD::move(__t))
{ }
@@ -920,7 +915,7 @@ public:
// tuple(const pair<U1, U2>&) constructors (including allocator_arg_t variants)
- template <template <class...> class Pred, class _Pair, class _DecayedPair = __uncvref_t<_Pair>, class _Tuple = tuple>
+ template <template <class...> class Pred, class _Pair, class _DecayedPair = __remove_cvref_t<_Pair>, class _Tuple = tuple>
struct _CtorPredicateFromPair : false_type{};
template <template <class...> class Pred, class _Pair, class _Up1, class _Up2, class _Tp1, class _Tp2>
@@ -935,7 +930,7 @@ public:
template <class _Pair>
struct _NothrowConstructibleFromPair : _CtorPredicateFromPair<is_nothrow_constructible, _Pair>{};
- template <class _Pair, class _DecayedPair = __uncvref_t<_Pair>, class _Tuple = tuple>
+ template <class _Pair, class _DecayedPair = __remove_cvref_t<_Pair>, class _Tuple = tuple>
struct _BothImplicitlyConvertible : false_type{};
template <class _Pair, class _Up1, class _Up2, class _Tp1, class _Tp2>
@@ -950,7 +945,7 @@ public:
_BothImplicitlyConvertible<const pair<_Up1, _Up2>&> // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
tuple(const pair<_Up1, _Up2>& __p)
_NOEXCEPT_((_NothrowConstructibleFromPair<const pair<_Up1, _Up2>&>::value))
: __base_(__p)
@@ -962,7 +957,7 @@ public:
_Not<_BothImplicitlyConvertible<const pair<_Up1, _Up2>&> > // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit tuple(const pair<_Up1, _Up2>& __p)
_NOEXCEPT_((_NothrowConstructibleFromPair<const pair<_Up1, _Up2>&>::value))
: __base_(__p)
@@ -974,7 +969,7 @@ public:
_BothImplicitlyConvertible<const pair<_Up1, _Up2>&> // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple(allocator_arg_t, const _Alloc& __a, const pair<_Up1, _Up2>& __p)
: __base_(allocator_arg_t(), __a, __p)
{ }
@@ -985,7 +980,7 @@ public:
_Not<_BothImplicitlyConvertible<const pair<_Up1, _Up2>&> > // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
explicit tuple(allocator_arg_t, const _Alloc& __a, const pair<_Up1, _Up2>& __p)
: __base_(allocator_arg_t(), __a, __p)
{ }
@@ -1014,7 +1009,7 @@ public:
_BothImplicitlyConvertible<pair<_Up1, _Up2>&&> // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
tuple(pair<_Up1, _Up2>&& __p)
_NOEXCEPT_((_NothrowConstructibleFromPair<pair<_Up1, _Up2>&&>::value))
: __base_(_VSTD::move(__p))
@@ -1026,7 +1021,7 @@ public:
_Not<_BothImplicitlyConvertible<pair<_Up1, _Up2>&&> > // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
explicit tuple(pair<_Up1, _Up2>&& __p)
_NOEXCEPT_((_NothrowConstructibleFromPair<pair<_Up1, _Up2>&&>::value))
: __base_(_VSTD::move(__p))
@@ -1038,7 +1033,7 @@ public:
_BothImplicitlyConvertible<pair<_Up1, _Up2>&&> // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple(allocator_arg_t, const _Alloc& __a, pair<_Up1, _Up2>&& __p)
: __base_(allocator_arg_t(), __a, _VSTD::move(__p))
{ }
@@ -1049,7 +1044,7 @@ public:
_Not<_BothImplicitlyConvertible<pair<_Up1, _Up2>&&> > // explicit check
>::value
, int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
explicit tuple(allocator_arg_t, const _Alloc& __a, pair<_Up1, _Up2>&& __p)
: __base_(allocator_arg_t(), __a, _VSTD::move(__p))
{ }
@@ -1072,7 +1067,7 @@ public:
#endif // _LIBCPP_STD_VER > 20
// [tuple.assign]
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple& operator=(_If<_And<is_copy_assignable<_Tp>...>::value, tuple, __nat> const& __tuple)
_NOEXCEPT_((_And<is_nothrow_copy_assignable<_Tp>...>::value))
{
@@ -1100,7 +1095,7 @@ public:
}
#endif // _LIBCPP_STD_VER > 20
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple& operator=(_If<_And<is_move_assignable<_Tp>...>::value, tuple, __nat>&& __tuple)
_NOEXCEPT_((_And<is_nothrow_move_assignable<_Tp>...>::value))
{
@@ -1116,7 +1111,7 @@ public:
is_assignable<_Tp&, _Up const&>...
>::value
,int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple& operator=(tuple<_Up...> const& __tuple)
_NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up const&>...>::value))
{
@@ -1131,7 +1126,7 @@ public:
is_assignable<_Tp&, _Up>...
>::value
,int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple& operator=(tuple<_Up...>&& __tuple)
_NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up>...>::value))
{
@@ -1168,7 +1163,7 @@ public:
#endif // _LIBCPP_STD_VER > 20
template <template<class...> class Pred, bool _Const,
- class _Pair, class _DecayedPair = __uncvref_t<_Pair>, class _Tuple = tuple>
+ class _Pair, class _DecayedPair = __remove_cvref_t<_Pair>, class _Tuple = tuple>
struct _AssignPredicateFromPair : false_type {};
template <template<class...> class Pred, bool _Const,
@@ -1209,7 +1204,7 @@ public:
template<class _Up1, class _Up2, __enable_if_t<
_EnableAssignFromPair<false, pair<_Up1, _Up2> const&>::value
,int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple& operator=(pair<_Up1, _Up2> const& __pair)
_NOEXCEPT_((_NothrowAssignFromPair<false, pair<_Up1, _Up2> const&>::value))
{
@@ -1221,7 +1216,7 @@ public:
template<class _Up1, class _Up2, __enable_if_t<
_EnableAssignFromPair<false, pair<_Up1, _Up2>&&>::value
,int> = 0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple& operator=(pair<_Up1, _Up2>&& __pair)
_NOEXCEPT_((_NothrowAssignFromPair<false, pair<_Up1, _Up2>&&>::value))
{
@@ -1237,7 +1232,7 @@ public:
is_assignable<_Tp&, _Up const&>...
>::value
> >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple& operator=(array<_Up, _Np> const& __array)
_NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up const&>...>::value))
{
@@ -1253,7 +1248,7 @@ public:
is_assignable<_Tp&, _Up>...
>::value
> >
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple& operator=(array<_Up, _Np>&& __array)
_NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up>...>::value))
{
@@ -1264,7 +1259,7 @@ public:
}
// [tuple.swap]
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void swap(tuple& __t) _NOEXCEPT_(__all<__is_nothrow_swappable<_Tp>::value...>::value)
{__base_.swap(__t.__base_);}
@@ -1283,18 +1278,18 @@ public:
_LIBCPP_INLINE_VISIBILITY constexpr
tuple() _NOEXCEPT = default;
template <class _Alloc>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple(allocator_arg_t, const _Alloc&) _NOEXCEPT {}
template <class _Alloc>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple(allocator_arg_t, const _Alloc&, const tuple&) _NOEXCEPT {}
template <class _Up>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple(array<_Up, 0>) _NOEXCEPT {}
template <class _Alloc, class _Up>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
tuple(allocator_arg_t, const _Alloc&, array<_Up, 0>) _NOEXCEPT {}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void swap(tuple&) _NOEXCEPT {}
#if _LIBCPP_STD_VER > 20
_LIBCPP_HIDE_FROM_ABI constexpr void swap(const tuple&) const noexcept {}
@@ -1329,7 +1324,7 @@ tuple(allocator_arg_t, _Alloc, tuple<_Tp...>) -> tuple<_Tp...>;
#endif
template <class ..._Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__enable_if_t<__all<__is_swappable<_Tp>::value...>::value, void>
swap(tuple<_Tp...>& __t, tuple<_Tp...>& __u)
_NOEXCEPT_(__all<__is_nothrow_swappable<_Tp>::value...>::value)
@@ -1348,7 +1343,7 @@ swap(const tuple<_Tp...>& __lhs, const tuple<_Tp...>& __rhs)
// get
template <size_t _Ip, class ..._Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Ip, tuple<_Tp...> >::type&
get(tuple<_Tp...>& __t) _NOEXCEPT
{
@@ -1357,7 +1352,7 @@ get(tuple<_Tp...>& __t) _NOEXCEPT
}
template <size_t _Ip, class ..._Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element<_Ip, tuple<_Tp...> >::type&
get(const tuple<_Tp...>& __t) _NOEXCEPT
{
@@ -1366,7 +1361,7 @@ get(const tuple<_Tp...>& __t) _NOEXCEPT
}
template <size_t _Ip, class ..._Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Ip, tuple<_Tp...> >::type&&
get(tuple<_Tp...>&& __t) _NOEXCEPT
{
@@ -1376,7 +1371,7 @@ get(tuple<_Tp...>&& __t) _NOEXCEPT
}
template <size_t _Ip, class ..._Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
get(const tuple<_Tp...>&& __t) _NOEXCEPT
{
@@ -1458,7 +1453,7 @@ constexpr _T1 const&& get(tuple<_Args...> const&& __tup) noexcept
// tie
template <class ..._Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
tuple<_Tp&...>
tie(_Tp&... __t) _NOEXCEPT
{
@@ -1469,7 +1464,7 @@ template <class _Up>
struct __ignore_t
{
template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const __ignore_t& operator=(_Tp&&) const {return *this;}
};
@@ -1478,7 +1473,7 @@ namespace {
} // namespace
template <class... _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
tuple<typename __unwrap_ref_decay<_Tp>::type...>
make_tuple(_Tp&&... __t)
{
@@ -1486,7 +1481,7 @@ make_tuple(_Tp&&... __t)
}
template <class... _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
tuple<_Tp&&...>
forward_as_tuple(_Tp&&... __t) _NOEXCEPT
{
@@ -1497,7 +1492,7 @@ template <size_t _Ip>
struct __tuple_equal
{
template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator()(const _Tp& __x, const _Up& __y)
{
return __tuple_equal<_Ip - 1>()(__x, __y) && _VSTD::get<_Ip-1>(__x) == _VSTD::get<_Ip-1>(__y);
@@ -1508,7 +1503,7 @@ template <>
struct __tuple_equal<0>
{
template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator()(const _Tp&, const _Up&)
{
return true;
@@ -1516,7 +1511,7 @@ struct __tuple_equal<0>
};
template <class ..._Tp, class ..._Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator==(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
@@ -1549,7 +1544,7 @@ operator<=>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
#else // _LIBCPP_STD_VER > 17
template <class ..._Tp, class ..._Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator!=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
@@ -1560,7 +1555,7 @@ template <size_t _Ip>
struct __tuple_less
{
template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator()(const _Tp& __x, const _Up& __y)
{
const size_t __idx = tuple_size<_Tp>::value - _Ip;
@@ -1576,7 +1571,7 @@ template <>
struct __tuple_less<0>
{
template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator()(const _Tp&, const _Up&)
{
return false;
@@ -1584,7 +1579,7 @@ struct __tuple_less<0>
};
template <class ..._Tp, class ..._Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator<(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
@@ -1593,7 +1588,7 @@ operator<(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
}
template <class ..._Tp, class ..._Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
@@ -1601,7 +1596,7 @@ operator>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
}
template <class ..._Tp, class ..._Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator>=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
@@ -1609,7 +1604,7 @@ operator>=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
}
template <class ..._Tp, class ..._Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator<=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
@@ -1638,7 +1633,7 @@ struct __tuple_cat_return_1<tuple<_Types...>, true, _Tuple0>
{
using type _LIBCPP_NODEBUG = typename __tuple_cat_type<
tuple<_Types...>,
- typename __make_tuple_types<__uncvref_t<_Tuple0> >::type
+ typename __make_tuple_types<__remove_cvref_t<_Tuple0> >::type
>::type;
};
@@ -1647,9 +1642,9 @@ struct __tuple_cat_return_1<tuple<_Types...>, true, _Tuple0, _Tuple1, _Tuples...
: public __tuple_cat_return_1<
typename __tuple_cat_type<
tuple<_Types...>,
- typename __make_tuple_types<__uncvref_t<_Tuple0> >::type
+ typename __make_tuple_types<__remove_cvref_t<_Tuple0> >::type
>::type,
- __tuple_like<typename remove_reference<_Tuple1>::type>::value,
+ __tuple_like<__libcpp_remove_reference_t<_Tuple1> >::value,
_Tuple1, _Tuples...>
{
};
@@ -1659,7 +1654,7 @@ template <class ..._Tuples> struct __tuple_cat_return;
template <class _Tuple0, class ..._Tuples>
struct __tuple_cat_return<_Tuple0, _Tuples...>
: public __tuple_cat_return_1<tuple<>,
- __tuple_like<typename remove_reference<_Tuple0>::type>::value, _Tuple0,
+ __tuple_like<__libcpp_remove_reference_t<_Tuple0> >::value, _Tuple0,
_Tuples...>
{
};
@@ -1670,7 +1665,7 @@ struct __tuple_cat_return<>
typedef _LIBCPP_NODEBUG tuple<> type;
};
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
tuple<>
tuple_cat()
{
@@ -1683,7 +1678,7 @@ struct __tuple_cat_return_ref_imp;
template <class ..._Types, size_t ..._I0, class _Tuple0>
struct __tuple_cat_return_ref_imp<tuple<_Types...>, __tuple_indices<_I0...>, _Tuple0>
{
- typedef _LIBCPP_NODEBUG typename remove_reference<_Tuple0>::type _T0;
+ typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tuple0> _T0;
typedef tuple<_Types..., typename __apply_cv<_Tuple0,
typename tuple_element<_I0, _T0>::type>::type&&...> type;
};
@@ -1694,9 +1689,8 @@ struct __tuple_cat_return_ref_imp<tuple<_Types...>, __tuple_indices<_I0...>,
: public __tuple_cat_return_ref_imp<
tuple<_Types..., typename __apply_cv<_Tuple0,
typename tuple_element<_I0,
- typename remove_reference<_Tuple0>::type>::type>::type&&...>,
- typename __make_tuple_indices<tuple_size<typename
- remove_reference<_Tuple1>::type>::value>::type,
+ __libcpp_remove_reference_t<_Tuple0> >::type>::type&&...>,
+ typename __make_tuple_indices<tuple_size<__libcpp_remove_reference_t<_Tuple1> >::value>::type,
_Tuple1, _Tuples...>
{
};
@@ -1705,7 +1699,7 @@ template <class _Tuple0, class ..._Tuples>
struct __tuple_cat_return_ref
: public __tuple_cat_return_ref_imp<tuple<>,
typename __make_tuple_indices<
- tuple_size<typename remove_reference<_Tuple0>::type>::value
+ tuple_size<__libcpp_remove_reference_t<_Tuple0> >::value
>::type, _Tuple0, _Tuples...>
{
};
@@ -1717,7 +1711,7 @@ template <class ..._Types, size_t ..._I0, size_t ..._J0>
struct __tuple_cat<tuple<_Types...>, __tuple_indices<_I0...>, __tuple_indices<_J0...> >
{
template <class _Tuple0>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&>::type
operator()(tuple<_Types...> __t, _Tuple0&& __t0)
{
@@ -1728,13 +1722,13 @@ struct __tuple_cat<tuple<_Types...>, __tuple_indices<_I0...>, __tuple_indices<_J
}
template <class _Tuple0, class _Tuple1, class ..._Tuples>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&, _Tuple1&&, _Tuples&&...>::type
operator()(tuple<_Types...> __t, _Tuple0&& __t0, _Tuple1&& __t1, _Tuples&& ...__tpls)
{
(void)__t; // avoid unused parameter warning on GCC when _I0 is empty
- typedef _LIBCPP_NODEBUG typename remove_reference<_Tuple0>::type _T0;
- typedef _LIBCPP_NODEBUG typename remove_reference<_Tuple1>::type _T1;
+ typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tuple0> _T0;
+ typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tuple1> _T1;
return __tuple_cat<
tuple<_Types...,
typename __apply_cv<_Tuple0, typename tuple_element<
@@ -1750,11 +1744,11 @@ struct __tuple_cat<tuple<_Types...>, __tuple_indices<_I0...>, __tuple_indices<_J
};
template <class _Tuple0, class... _Tuples>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename __tuple_cat_return<_Tuple0, _Tuples...>::type
tuple_cat(_Tuple0&& __t0, _Tuples&&... __tpls)
{
- typedef _LIBCPP_NODEBUG typename remove_reference<_Tuple0>::type _T0;
+ typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tuple0> _T0;
return __tuple_cat<tuple<>, __tuple_indices<>,
typename __make_tuple_indices<tuple_size<_T0>::value>::type>()
(tuple<>(), _VSTD::forward<_Tuple0>(__t0),
@@ -1767,7 +1761,7 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocator<tuple<_Tp...>, _Alloc>
template <class _T1, class _T2>
template <class... _Args1, class... _Args2, size_t ..._I1, size_t ..._I2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
pair<_T1, _T2>::pair(piecewise_construct_t,
tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args,
__tuple_indices<_I1...>, __tuple_indices<_I2...>)
@@ -1824,4 +1818,12 @@ _LIBCPP_NOEXCEPT_RETURN(
_LIBCPP_END_NAMESPACE_STD
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <exception>
+# include <iosfwd>
+# include <new>
+# include <typeinfo>
+# include <utility>
+#endif
+
#endif // _LIBCPP_TUPLE
diff --git a/contrib/libs/cxxsupp/libcxx/include/type_traits b/contrib/libs/cxxsupp/libcxx/include/type_traits
index 8d072bae5c..e70039e35a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/type_traits
+++ b/contrib/libs/cxxsupp/libcxx/include/type_traits
@@ -419,6 +419,7 @@ namespace std
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
#include <__functional/invoke.h>
+#include <__fwd/hash.h> // This is https://llvm.org/PR56938
#include <__type_traits/add_const.h>
#include <__type_traits/add_cv.h>
#include <__type_traits/add_lvalue_reference.h>
@@ -429,11 +430,13 @@ namespace std
#include <__type_traits/aligned_union.h>
#include <__type_traits/alignment_of.h>
#include <__type_traits/apply_cv.h>
+#include <__type_traits/can_extract_key.h>
#include <__type_traits/common_reference.h>
#include <__type_traits/common_type.h>
#include <__type_traits/conditional.h>
#include <__type_traits/conjunction.h>
#include <__type_traits/decay.h>
+#include <__type_traits/dependent_type.h>
#include <__type_traits/disjunction.h>
#include <__type_traits/enable_if.h>
#include <__type_traits/extent.h>
@@ -448,6 +451,7 @@ namespace std
#include <__type_traits/is_base_of.h>
#include <__type_traits/is_bounded_array.h>
#include <__type_traits/is_callable.h>
+#include <__type_traits/is_char_like_type.h>
#include <__type_traits/is_class.h>
#include <__type_traits/is_compound.h>
#include <__type_traits/is_const.h>
@@ -464,6 +468,7 @@ namespace std
#include <__type_traits/is_floating_point.h>
#include <__type_traits/is_function.h>
#include <__type_traits/is_fundamental.h>
+#include <__type_traits/is_implicitly_default_constructible.h>
#include <__type_traits/is_integral.h>
#include <__type_traits/is_literal_type.h>
#include <__type_traits/is_member_function_pointer.h>
@@ -493,6 +498,7 @@ namespace std
#include <__type_traits/is_scoped_enum.h>
#include <__type_traits/is_signed.h>
#include <__type_traits/is_standard_layout.h>
+#include <__type_traits/is_swappable.h>
#include <__type_traits/is_trivial.h>
#include <__type_traits/is_trivially_assignable.h>
#include <__type_traits/is_trivially_constructible.h>
@@ -508,17 +514,21 @@ namespace std
#include <__type_traits/is_unsigned.h>
#include <__type_traits/is_void.h>
#include <__type_traits/is_volatile.h>
+#include <__type_traits/make_const_lvalue_ref.h>
#include <__type_traits/make_signed.h>
#include <__type_traits/make_unsigned.h>
+#include <__type_traits/maybe_const.h>
#include <__type_traits/negation.h>
#include <__type_traits/rank.h>
#include <__type_traits/remove_all_extents.h>
#include <__type_traits/remove_const.h>
+#include <__type_traits/remove_const_ref.h>
#include <__type_traits/remove_cv.h>
#include <__type_traits/remove_extent.h>
#include <__type_traits/remove_pointer.h>
#include <__type_traits/remove_reference.h>
#include <__type_traits/remove_volatile.h>
+#include <__type_traits/result_of.h>
#include <__type_traits/type_identity.h>
#include <__type_traits/underlying_type.h>
#include <__type_traits/void_t.h>
@@ -533,284 +543,12 @@ namespace std
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _T1, class _T2> struct _LIBCPP_TEMPLATE_VIS pair;
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;
-
// CUDA headers use libc++ internals.
#ifdef __CUDACC__
template <bool _Cond, class _Ret = void>
using __lazy_enable_if _LIBCPP_NODEBUG = __enable_if_t<_Cond, _Ret>;
#endif
-// Member detector base
-
-template <class _Tp, bool>
-struct _LIBCPP_TEMPLATE_VIS __dependent_type : public _Tp {};
-
-// is_integral
-
-template <class _Tp>
-struct __unconstref {
- typedef _LIBCPP_NODEBUG typename remove_const<typename remove_reference<_Tp>::type>::type type;
-};
-
-#ifndef _LIBCPP_CXX03_LANG
-// First of all, we can't implement this check in C++03 mode because the {}
-// default initialization syntax isn't valid.
-// Second, we implement the trait in a funny manner with two defaulted template
-// arguments to workaround Clang's PR43454.
-template <class _Tp>
-void __test_implicit_default_constructible(_Tp);
-
-template <class _Tp, class = void, class = typename is_default_constructible<_Tp>::type>
-struct __is_implicitly_default_constructible
- : false_type
-{ };
-
-template <class _Tp>
-struct __is_implicitly_default_constructible<_Tp, decltype(__test_implicit_default_constructible<_Tp const&>({})), true_type>
- : true_type
-{ };
-
-template <class _Tp>
-struct __is_implicitly_default_constructible<_Tp, decltype(__test_implicit_default_constructible<_Tp const&>({})), false_type>
- : false_type
-{ };
-#endif // !C++03
-
-// result_of
-
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
-template <class _Callable> class _LIBCPP_DEPRECATED_IN_CXX17 result_of;
-
-template <class _Fp, class ..._Args>
-class _LIBCPP_TEMPLATE_VIS result_of<_Fp(_Args...)>
- : public __invoke_of<_Fp, _Args...>
-{
-};
-
-#if _LIBCPP_STD_VER > 11
-template <class _Tp> using result_of_t _LIBCPP_DEPRECATED_IN_CXX17 = typename result_of<_Tp>::type;
-#endif // _LIBCPP_STD_VER > 11
-#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
-
-// __swappable
-
-template <class _Tp> struct __is_swappable;
-template <class _Tp> struct __is_nothrow_swappable;
-
-
-#ifndef _LIBCPP_CXX03_LANG
-template <class _Tp>
-using __swap_result_t = typename enable_if<is_move_constructible<_Tp>::value && is_move_assignable<_Tp>::value>::type;
-#else
-template <class>
-using __swap_result_t = void;
-#endif
-
-template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __swap_result_t<_Tp>
-swap(_Tp& __x, _Tp& __y) _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value &&
- is_nothrow_move_assignable<_Tp>::value);
-
-template<class _Tp, size_t _Np>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
-typename enable_if<
- __is_swappable<_Tp>::value
->::type
-swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value);
-
-namespace __detail
-{
-// ALL generic swap overloads MUST already have a declaration available at this point.
-
-template <class _Tp, class _Up = _Tp,
- bool _NotVoid = !is_void<_Tp>::value && !is_void<_Up>::value>
-struct __swappable_with
-{
- template <class _LHS, class _RHS>
- static decltype(swap(declval<_LHS>(), declval<_RHS>()))
- __test_swap(int);
- template <class, class>
- static __nat __test_swap(long);
-
- // Extra parens are needed for the C++03 definition of decltype.
- typedef decltype((__test_swap<_Tp, _Up>(0))) __swap1;
- typedef decltype((__test_swap<_Up, _Tp>(0))) __swap2;
-
- static const bool value = _IsNotSame<__swap1, __nat>::value
- && _IsNotSame<__swap2, __nat>::value;
-};
-
-template <class _Tp, class _Up>
-struct __swappable_with<_Tp, _Up, false> : false_type {};
-
-template <class _Tp, class _Up = _Tp, bool _Swappable = __swappable_with<_Tp, _Up>::value>
-struct __nothrow_swappable_with {
- static const bool value =
-#ifndef _LIBCPP_HAS_NO_NOEXCEPT
- noexcept(swap(declval<_Tp>(), declval<_Up>()))
- && noexcept(swap(declval<_Up>(), declval<_Tp>()));
-#else
- false;
-#endif
-};
-
-template <class _Tp, class _Up>
-struct __nothrow_swappable_with<_Tp, _Up, false> : false_type {};
-
-} // namespace __detail
-
-template <class _Tp>
-struct __is_swappable
- : public integral_constant<bool, __detail::__swappable_with<_Tp&>::value>
-{
-};
-
-template <class _Tp>
-struct __is_nothrow_swappable
- : public integral_constant<bool, __detail::__nothrow_swappable_with<_Tp&>::value>
-{
-};
-
-#if _LIBCPP_STD_VER > 14
-
-template <class _Tp, class _Up>
-struct _LIBCPP_TEMPLATE_VIS is_swappable_with
- : public integral_constant<bool, __detail::__swappable_with<_Tp, _Up>::value>
-{
-};
-
-template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_swappable
- : public conditional<
- __is_referenceable<_Tp>::value,
- is_swappable_with<
- typename add_lvalue_reference<_Tp>::type,
- typename add_lvalue_reference<_Tp>::type>,
- false_type
- >::type
-{
-};
-
-template <class _Tp, class _Up>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable_with
- : public integral_constant<bool, __detail::__nothrow_swappable_with<_Tp, _Up>::value>
-{
-};
-
-template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable
- : public conditional<
- __is_referenceable<_Tp>::value,
- is_nothrow_swappable_with<
- typename add_lvalue_reference<_Tp>::type,
- typename add_lvalue_reference<_Tp>::type>,
- false_type
- >::type
-{
-};
-
-template <class _Tp, class _Up>
-inline constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value;
-
-template <class _Tp>
-inline constexpr bool is_swappable_v = is_swappable<_Tp>::value;
-
-template <class _Tp, class _Up>
-inline constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_Tp, _Up>::value;
-
-template <class _Tp>
-inline constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value;
-
-#endif // _LIBCPP_STD_VER > 14
-
-template <class _Tp, bool = is_enum<_Tp>::value>
-struct __sfinae_underlying_type
-{
- typedef typename underlying_type<_Tp>::type type;
- typedef decltype(((type)1) + 0) __promoted_type;
-};
-
-template <class _Tp>
-struct __sfinae_underlying_type<_Tp, false> {};
-
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-int __convert_to_integral(int __val) { return __val; }
-
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-unsigned __convert_to_integral(unsigned __val) { return __val; }
-
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-long __convert_to_integral(long __val) { return __val; }
-
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-unsigned long __convert_to_integral(unsigned long __val) { return __val; }
-
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-long long __convert_to_integral(long long __val) { return __val; }
-
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-unsigned long long __convert_to_integral(unsigned long long __val) {return __val; }
-
-template<typename _Fp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-typename enable_if<is_floating_point<_Fp>::value, long long>::type
- __convert_to_integral(_Fp __val) { return __val; }
-
-#ifndef _LIBCPP_HAS_NO_INT128
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-__int128_t __convert_to_integral(__int128_t __val) { return __val; }
-
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-__uint128_t __convert_to_integral(__uint128_t __val) { return __val; }
-#endif
-
-template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-typename __sfinae_underlying_type<_Tp>::__promoted_type
-__convert_to_integral(_Tp __val) { return __val; }
-
-// These traits are used in __tree and __hash_table
-struct __extract_key_fail_tag {};
-struct __extract_key_self_tag {};
-struct __extract_key_first_tag {};
-
-template <class _ValTy, class _Key,
- class _RawValTy = typename __unconstref<_ValTy>::type>
-struct __can_extract_key
- : conditional<_IsSame<_RawValTy, _Key>::value, __extract_key_self_tag,
- __extract_key_fail_tag>::type {};
-
-template <class _Pair, class _Key, class _First, class _Second>
-struct __can_extract_key<_Pair, _Key, pair<_First, _Second> >
- : conditional<_IsSame<typename remove_const<_First>::type, _Key>::value,
- __extract_key_first_tag, __extract_key_fail_tag>::type {};
-
-// __can_extract_map_key uses true_type/false_type instead of the tags.
-// It returns true if _Key != _ContainerValueTy (the container is a map not a set)
-// and _ValTy == _Key.
-template <class _ValTy, class _Key, class _ContainerValueTy,
- class _RawValTy = typename __unconstref<_ValTy>::type>
-struct __can_extract_map_key
- : integral_constant<bool, _IsSame<_RawValTy, _Key>::value> {};
-
-// This specialization returns __extract_key_fail_tag for non-map containers
-// because _Key == _ContainerValueTy
-template <class _ValTy, class _Key, class _RawValTy>
-struct __can_extract_map_key<_ValTy, _Key, _Key, _RawValTy>
- : false_type {};
-
-template <class _CharT>
-using _IsCharLikeType = _And<is_standard_layout<_CharT>, is_trivial<_CharT> >;
-
-template<class _Tp>
-using __make_const_lvalue_ref = const typename remove_reference<_Tp>::type&;
-
-template<bool _Const, class _Tp>
-using __maybe_const = typename conditional<_Const, const _Tp, _Tp>::type;
-
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_TYPE_TRAITS
diff --git a/contrib/libs/cxxsupp/libcxx/include/typeindex b/contrib/libs/cxxsupp/libcxx/include/typeindex
index 5fb7b30ecf..e3132c8cb8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/typeindex
+++ b/contrib/libs/cxxsupp/libcxx/include/typeindex
@@ -23,11 +23,12 @@ public:
type_index(const type_info& rhs) noexcept;
bool operator==(const type_index& rhs) const noexcept;
- bool operator!=(const type_index& rhs) const noexcept;
+ bool operator!=(const type_index& rhs) const noexcept; // removed in C++20
bool operator< (const type_index& rhs) const noexcept;
bool operator<=(const type_index& rhs) const noexcept;
bool operator> (const type_index& rhs) const noexcept;
bool operator>=(const type_index& rhs) const noexcept;
+ strong_ordering operator<=>(const type_index& rhs) const noexcept; // C++20
size_t hash_code() const noexcept;
const char* name() const noexcept;
@@ -50,12 +51,6 @@ struct hash<type_index>
#include <typeinfo>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <iosfwd>
-# include <new>
-# include <utility>
-#endif
-
// standard-mandated includes
#include <compare>
@@ -76,8 +71,10 @@ public:
bool operator==(const type_index& __y) const _NOEXCEPT
{return *__t_ == *__y.__t_;}
_LIBCPP_INLINE_VISIBILITY
+#if _LIBCPP_STD_VER <= 17
bool operator!=(const type_index& __y) const _NOEXCEPT
{return *__t_ != *__y.__t_;}
+#endif
_LIBCPP_INLINE_VISIBILITY
bool operator< (const type_index& __y) const _NOEXCEPT
{return __t_->before(*__y.__t_);}
@@ -90,6 +87,16 @@ public:
_LIBCPP_INLINE_VISIBILITY
bool operator>=(const type_index& __y) const _NOEXCEPT
{return !__t_->before(*__y.__t_);}
+#if _LIBCPP_STD_VER > 17
+ _LIBCPP_HIDE_FROM_ABI
+ strong_ordering operator<=>(const type_index& __y) const noexcept {
+ if (*__t_ == *__y.__t_)
+ return strong_ordering::equal;
+ if (__t_->before(*__y.__t_))
+ return strong_ordering::less;
+ return strong_ordering::greater;
+ }
+#endif
_LIBCPP_INLINE_VISIBILITY
size_t hash_code() const _NOEXCEPT {return __t_->hash_code();}
@@ -110,4 +117,10 @@ struct _LIBCPP_TEMPLATE_VIS hash<type_index>
_LIBCPP_END_NAMESPACE_STD
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <iosfwd>
+# include <new>
+# include <utility>
+#endif
+
#endif // _LIBCPP_TYPEINDEX
diff --git a/contrib/libs/cxxsupp/libcxx/include/typeinfo b/contrib/libs/cxxsupp/libcxx/include/typeinfo
index 9c640f3440..4b81216b78 100644
--- a/contrib/libs/cxxsupp/libcxx/include/typeinfo
+++ b/contrib/libs/cxxsupp/libcxx/include/typeinfo
@@ -22,7 +22,7 @@ public:
virtual ~type_info();
bool operator==(const type_info& rhs) const noexcept;
- bool operator!=(const type_info& rhs) const noexcept;
+ bool operator!=(const type_info& rhs) const noexcept; // removed in C++20
bool before(const type_info& rhs) const noexcept;
size_t hash_code() const noexcept;
@@ -61,13 +61,10 @@ public:
#include <__config>
#include <cstddef>
#include <cstdint>
+#include <cstdlib>
#include <exception>
#include <type_traits>
-#ifdef _LIBCPP_NO_EXCEPTIONS
-#include <cstdlib>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
@@ -117,9 +114,11 @@ public:
return __compare(__arg) == 0;
}
+#if _LIBCPP_STD_VER <= 17
_LIBCPP_INLINE_VISIBILITY
bool operator!=(const type_info& __arg) const _NOEXCEPT
{ return !operator==(__arg); }
+#endif
};
#else // !defined(_LIBCPP_ABI_MICROSOFT)
@@ -179,8 +178,8 @@ public:
// we pick a default implementation based on the platform here.
#ifndef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION
- // Windows binaries can't merge typeinfos, so use the NonUnique implementation.
-# ifdef _LIBCPP_OBJECT_FORMAT_COFF
+ // Windows and AIX binaries can't merge typeinfos, so use the NonUnique implementation.
+# if defined(_LIBCPP_OBJECT_FORMAT_COFF) || defined(_LIBCPP_OBJECT_FORMAT_XCOFF)
# define _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION 2
// On arm64 on Apple platforms, use the special NonUniqueARMRTTIBit implementation.
@@ -342,16 +341,18 @@ public:
return __impl::__eq(__type_name, __arg.__type_name);
}
+#if _LIBCPP_STD_VER <= 17
_LIBCPP_INLINE_VISIBILITY
bool operator!=(const type_info& __arg) const _NOEXCEPT
{ return !operator==(__arg); }
+#endif
};
#endif // defined(_LIBCPP_ABI_MICROSOFT)
class _LIBCPP_EXCEPTION_ABI bad_cast
: public exception
{
-public:
+ public:
#ifdef _LIBCPP_ABI_MICROSOFT
bad_cast() _NOEXCEPT {}
virtual ~bad_cast() _NOEXCEPT {}
@@ -362,15 +363,15 @@ public:
#else
bad_cast() _NOEXCEPT;
bad_cast(const bad_cast&) _NOEXCEPT = default;
- virtual ~bad_cast() _NOEXCEPT;
- virtual const char* what() const _NOEXCEPT;
+ ~bad_cast() _NOEXCEPT override;
+ const char* what() const _NOEXCEPT override;
#endif
};
class _LIBCPP_EXCEPTION_ABI bad_typeid
: public exception
{
-public:
+ public:
#ifdef _LIBCPP_ABI_MICROSOFT
bad_typeid() _NOEXCEPT {}
virtual ~bad_typeid() _NOEXCEPT {}
@@ -380,8 +381,8 @@ public:
}
#else
bad_typeid() _NOEXCEPT;
- virtual ~bad_typeid() _NOEXCEPT;
- virtual const char* what() const _NOEXCEPT;
+ ~bad_typeid() _NOEXCEPT override;
+ const char* what() const _NOEXCEPT override;
#endif
};
@@ -393,6 +394,30 @@ class type_info : public std::type_info {};
#endif // defined(_LIBCPP_ABI_VCRUNTIME)
+#if defined(_LIBCPP_ABI_VCRUNTIME) && _HAS_EXCEPTIONS == 0
+
+namespace std {
+
+class bad_cast : public exception {
+public:
+ bad_cast() _NOEXCEPT : exception("bad cast") {}
+
+private:
+ bad_cast(const char* const __message) _NOEXCEPT : exception(__message) {}
+};
+
+class bad_typeid : public exception {
+public:
+ bad_typeid() _NOEXCEPT : exception("bad typeid") {}
+
+private:
+ bad_typeid(const char* const __message) _NOEXCEPT : exception(__message) {}
+};
+
+} // namespace std
+
+#endif // defined(_LIBCPP_ABI_VCRUNTIME) && _HAS_EXCEPTIONS == 0
+
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_bad_cast()
diff --git a/contrib/libs/cxxsupp/libcxx/include/unordered_map b/contrib/libs/cxxsupp/libcxx/include/unordered_map
index b2a12cb638..cd0aea1205 100644
--- a/contrib/libs/cxxsupp/libcxx/include/unordered_map
+++ b/contrib/libs/cxxsupp/libcxx/include/unordered_map
@@ -525,18 +525,15 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
#include <__iterator/erase_if_container.h>
#include <__iterator/iterator_traits.h>
#include <__memory/addressof.h>
+#include <__memory/allocator.h>
+#include <__memory_resource/polymorphic_allocator.h>
#include <__node_handle>
+#include <__type_traits/is_allocator.h>
#include <__utility/forward.h>
#include <stdexcept>
#include <tuple>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <algorithm>
-# include <bit>
-# include <iterator>
-#endif
-
// standard-mandated includes
// [iterator.range]
@@ -822,16 +819,16 @@ struct _LIBCPP_STANDALONE_DEBUG __hash_value_type
typedef pair<key_type&&, mapped_type&&> __nc_rref_pair_type;
private:
- value_type __cc;
+ value_type __cc_;
public:
_LIBCPP_INLINE_VISIBILITY
value_type& __get_value()
{
#if _LIBCPP_STD_VER > 14
- return *_VSTD::launder(_VSTD::addressof(__cc));
+ return *_VSTD::launder(_VSTD::addressof(__cc_));
#else
- return __cc;
+ return __cc_;
#endif
}
@@ -839,9 +836,9 @@ public:
const value_type& __get_value() const
{
#if _LIBCPP_STD_VER > 14
- return *_VSTD::launder(_VSTD::addressof(__cc));
+ return *_VSTD::launder(_VSTD::addressof(__cc_));
#else
- return __cc;
+ return __cc_;
#endif
}
@@ -904,13 +901,13 @@ struct __hash_value_type
typedef pair<const key_type, mapped_type> value_type;
private:
- value_type __cc;
+ value_type __cc_;
public:
_LIBCPP_INLINE_VISIBILITY
- value_type& __get_value() { return __cc; }
+ value_type& __get_value() { return __cc_; }
_LIBCPP_INLINE_VISIBILITY
- const value_type& __get_value() const { return __cc; }
+ const value_type& __get_value() const { return __cc_; }
private:
~__hash_value_type();
@@ -1044,8 +1041,7 @@ private:
typedef __hash_value_type<key_type, mapped_type> __value_type;
typedef __unordered_map_hasher<key_type, __value_type, hasher, key_equal> __hasher;
typedef __unordered_map_equal<key_type, __value_type, key_equal, hasher> __key_equal;
- typedef typename __rebind_alloc_helper<allocator_traits<allocator_type>,
- __value_type>::type __allocator_type;
+ typedef __rebind_alloc<allocator_traits<allocator_type>, __value_type> __allocator_type;
typedef __hash_table<__value_type, __hasher,
__key_equal, __allocator_type> __table;
@@ -1062,6 +1058,10 @@ private:
typedef unique_ptr<__node, _Dp> __node_holder;
typedef allocator_traits<allocator_type> __alloc_traits;
+ static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
+ "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
+ "original allocator");
+
static_assert((is_same<typename __table::__container_value_type, value_type>::value), "");
static_assert((is_same<typename __table::__node_value_type, __value_type>::value), "");
public:
@@ -1886,7 +1886,7 @@ inline _LIBCPP_INLINE_VISIBILITY
#endif
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-bool
+_LIBCPP_HIDE_FROM_ABI bool
operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
{
@@ -1934,8 +1934,7 @@ private:
typedef __hash_value_type<key_type, mapped_type> __value_type;
typedef __unordered_map_hasher<key_type, __value_type, hasher, key_equal> __hasher;
typedef __unordered_map_equal<key_type, __value_type, key_equal, hasher> __key_equal;
- typedef typename __rebind_alloc_helper<allocator_traits<allocator_type>,
- __value_type>::type __allocator_type;
+ typedef __rebind_alloc<allocator_traits<allocator_type>, __value_type> __allocator_type;
typedef __hash_table<__value_type, __hasher,
__key_equal, __allocator_type> __table;
@@ -1952,7 +1951,12 @@ private:
static_assert((is_same<typename __node_traits::size_type,
typename __alloc_traits::size_type>::value),
"Allocator uses different size_type for different types");
-public:
+
+ static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
+ "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
+ "original allocator");
+
+ public:
typedef typename __alloc_traits::pointer pointer;
typedef typename __alloc_traits::const_pointer const_pointer;
typedef typename __table::size_type size_type;
@@ -2592,7 +2596,7 @@ inline _LIBCPP_INLINE_VISIBILITY
#endif
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-bool
+_LIBCPP_HIDE_FROM_ABI bool
operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
{
@@ -2625,4 +2629,25 @@ operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
_LIBCPP_END_NAMESPACE_STD
+#if _LIBCPP_STD_VER > 14
+_LIBCPP_BEGIN_NAMESPACE_STD
+namespace pmr {
+template <class _KeyT, class _ValueT, class _HashT = std::hash<_KeyT>, class _PredT = std::equal_to<_KeyT>>
+using unordered_map =
+ std::unordered_map<_KeyT, _ValueT, _HashT, _PredT, polymorphic_allocator<std::pair<const _KeyT, _ValueT>>>;
+
+template <class _KeyT, class _ValueT, class _HashT = std::hash<_KeyT>, class _PredT = std::equal_to<_KeyT>>
+using unordered_multimap =
+ std::unordered_multimap<_KeyT, _ValueT, _HashT, _PredT, polymorphic_allocator<std::pair<const _KeyT, _ValueT>>>;
+} // namespace pmr
+_LIBCPP_END_NAMESPACE_STD
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <algorithm>
+# include <bit>
+# include <concepts>
+# include <iterator>
+#endif
+
#endif // _LIBCPP_UNORDERED_MAP
diff --git a/contrib/libs/cxxsupp/libcxx/include/unordered_set b/contrib/libs/cxxsupp/libcxx/include/unordered_set
index fc6e8e21c0..9a25510139 100644
--- a/contrib/libs/cxxsupp/libcxx/include/unordered_set
+++ b/contrib/libs/cxxsupp/libcxx/include/unordered_set
@@ -470,15 +470,13 @@ template <class Value, class Hash, class Pred, class Alloc>
#include <__iterator/erase_if_container.h>
#include <__iterator/iterator_traits.h>
#include <__memory/addressof.h>
+#include <__memory/allocator.h>
+#include <__memory_resource/polymorphic_allocator.h>
#include <__node_handle>
+#include <__type_traits/is_allocator.h>
#include <__utility/forward.h>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <functional>
-# include <iterator>
-#endif
-
// standard-mandated includes
// [iterator.range]
@@ -517,7 +515,11 @@ public:
static_assert((is_same<value_type, typename allocator_type::value_type>::value),
"Invalid allocator::value_type");
-private:
+ static_assert(is_same<allocator_type, __rebind_alloc<allocator_traits<allocator_type>, value_type> >::value,
+ "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
+ "original allocator");
+
+ private:
typedef __hash_table<value_type, hasher, key_equal, allocator_type> __table;
__table __table_;
@@ -1130,7 +1132,7 @@ inline _LIBCPP_INLINE_VISIBILITY
#endif
template <class _Value, class _Hash, class _Pred, class _Alloc>
-bool
+_LIBCPP_HIDE_FROM_ABI bool
operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
{
@@ -1768,7 +1770,7 @@ inline _LIBCPP_INLINE_VISIBILITY
#endif
template <class _Value, class _Hash, class _Pred, class _Alloc>
-bool
+_LIBCPP_HIDE_FROM_ABI bool
operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
{
@@ -1801,4 +1803,22 @@ operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
_LIBCPP_END_NAMESPACE_STD
+#if _LIBCPP_STD_VER > 14
+_LIBCPP_BEGIN_NAMESPACE_STD
+namespace pmr {
+template <class _KeyT, class _HashT = std::hash<_KeyT>, class _PredT = std::equal_to<_KeyT>>
+using unordered_set = std::unordered_set<_KeyT, _HashT, _PredT, polymorphic_allocator<_KeyT>>;
+
+template <class _KeyT, class _HashT = std::hash<_KeyT>, class _PredT = std::equal_to<_KeyT>>
+using unordered_multiset = std::unordered_multiset<_KeyT, _HashT, _PredT, polymorphic_allocator<_KeyT>>;
+} // namespace pmr
+_LIBCPP_END_NAMESPACE_STD
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <functional>
+# include <iterator>
+#endif
+
#endif // _LIBCPP_UNORDERED_SET
diff --git a/contrib/libs/cxxsupp/libcxx/include/utility b/contrib/libs/cxxsupp/libcxx/include/utility
index 7a1a45e334..ac6c18b06a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/utility
+++ b/contrib/libs/cxxsupp/libcxx/include/utility
@@ -42,6 +42,10 @@ swap(T (&a)[N], T (&b)[N]) noexcept(noexcept(swap(*a, *b)));
template <class T> T&& forward(typename remove_reference<T>::type& t) noexcept; // constexpr in C++14
template <class T> T&& forward(typename remove_reference<T>::type&& t) noexcept; // constexpr in C++14
+template <typename T>
+[[nodiscard]] constexpr
+auto forward_like(auto&& x) noexcept -> see below; // since C++23
+
template <class T> typename remove_reference<T>::type&& move(T&&) noexcept; // constexpr in C++14
template <class T>
@@ -80,19 +84,29 @@ struct pair
explicit(see-below) constexpr pair();
explicit(see-below) pair(const T1& x, const T2& y); // constexpr in C++14
template <class U = T1, class V = T2> explicit(see-below) pair(U&&, V&&); // constexpr in C++14
+ template <class U, class V> constexpr explicit(see below) pair(pair<U, V>&); // since C++23
template <class U, class V> explicit(see-below) pair(const pair<U, V>& p); // constexpr in C++14
template <class U, class V> explicit(see-below) pair(pair<U, V>&& p); // constexpr in C++14
+ template <class U, class V>
+ constexpr explicit(see below) pair(const pair<U, V>&&); // since C++23
template <class... Args1, class... Args2>
pair(piecewise_construct_t, tuple<Args1...> first_args,
tuple<Args2...> second_args); // constexpr in C++20
+ constexpr const pair& operator=(const pair& p) const; // since C++23
template <class U, class V> pair& operator=(const pair<U, V>& p); // constexpr in C++20
+ template <class U, class V>
+ constexpr const pair& operator=(const pair<U, V>& p) const; // since C++23
pair& operator=(pair&& p) noexcept(is_nothrow_move_assignable<T1>::value &&
is_nothrow_move_assignable<T2>::value); // constexpr in C++20
+ constexpr const pair& operator=(pair&& p) const; // since C++23
template <class U, class V> pair& operator=(pair<U, V>&& p); // constexpr in C++20
+ template <class U, class V>
+ constexpr const pair& operator=(pair<U, V>&& p) const; // since C++23
void swap(pair& p) noexcept(is_nothrow_swappable_v<T1> &&
is_nothrow_swappable_v<T2>); // constexpr in C++20
+ constexpr void swap(const pair& p) const noexcept(see below); // since C++23
};
template<class T1, class T2, class U1, class U2, template<class> class TQual, template<class> class UQual>
@@ -119,6 +133,9 @@ template <class T1, class T2>
void
swap(pair<T1, T2>& x, pair<T1, T2>& y) noexcept(noexcept(x.swap(y))); // constexpr in C++20
+template<class T1, class T2>
+constexpr void swap(const pair<T1, T2>& x, const pair<T1, T2>& y) noexcept(noexcept(x.swap(y))); // since C++23
+
struct piecewise_construct_t { explicit piecewise_construct_t() = default; };
inline constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
@@ -222,13 +239,13 @@ template <class T>
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
-#include <__tuple>
#include <__utility/as_const.h>
#include <__utility/auto_cast.h>
#include <__utility/cmp.h>
#include <__utility/declval.h>
#include <__utility/exchange.h>
#include <__utility/forward.h>
+#include <__utility/forward_like.h>
#include <__utility/in_place.h>
#include <__utility/integer_sequence.h>
#include <__utility/move.h>
@@ -243,16 +260,22 @@ template <class T>
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <iosfwd>
-#endif
-
// standard-mandated includes
+
+// [utility.syn]
#include <compare>
#include <initializer_list>
+// [tuple.helper]
+#include <__tuple/tuple_element.h>
+#include <__tuple/tuple_size.h>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <iosfwd>
+#endif
+
#endif // _LIBCPP_UTILITY
diff --git a/contrib/libs/cxxsupp/libcxx/include/valarray b/contrib/libs/cxxsupp/libcxx/include/valarray
index 6f8a3b8419..6c33d0531c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/valarray
+++ b/contrib/libs/cxxsupp/libcxx/include/valarray
@@ -360,12 +360,9 @@ template <class T> unspecified2 end(const valarray<T>& v);
#include <new>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <algorithm>
-# include <functional>
-#endif
-
// standard-mandated includes
+
+// [valarray.syn]
#include <initializer_list>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -689,7 +686,7 @@ struct __tanh_expr
template <class _ValExpr>
class __slice_expr
{
- typedef typename remove_reference<_ValExpr>::type _RmExpr;
+ typedef __libcpp_remove_reference_t<_ValExpr> _RmExpr;
public:
typedef typename _RmExpr::value_type value_type;
typedef value_type __result_type;
@@ -729,7 +726,7 @@ class __indirect_expr;
template <class _ValExpr>
class __shift_expr
{
- typedef typename remove_reference<_ValExpr>::type _RmExpr;
+ typedef __libcpp_remove_reference_t<_ValExpr> _RmExpr;
public:
typedef typename _RmExpr::value_type value_type;
typedef value_type __result_type;
@@ -772,7 +769,7 @@ public:
template <class _ValExpr>
class __cshift_expr
{
- typedef typename remove_reference<_ValExpr>::type _RmExpr;
+ typedef __libcpp_remove_reference_t<_ValExpr> _RmExpr;
public:
typedef typename _RmExpr::value_type value_type;
typedef value_type __result_type;
@@ -2247,7 +2244,7 @@ mask_array<_Tp>::operator=(const value_type& __x) const
template <class _ValExpr>
class __mask_expr
{
- typedef typename remove_reference<_ValExpr>::type _RmExpr;
+ typedef __libcpp_remove_reference_t<_ValExpr> _RmExpr;
public:
typedef typename _RmExpr::value_type value_type;
typedef value_type __result_type;
@@ -2610,7 +2607,7 @@ indirect_array<_Tp>::operator=(const value_type& __x) const
template <class _ValExpr>
class __indirect_expr
{
- typedef typename remove_reference<_ValExpr>::type _RmExpr;
+ typedef __libcpp_remove_reference_t<_ValExpr> _RmExpr;
public:
typedef typename _RmExpr::value_type value_type;
typedef value_type __result_type;
@@ -2650,7 +2647,7 @@ public:
template<class _ValExpr>
class __val_expr
{
- typedef typename remove_reference<_ValExpr>::type _RmExpr;
+ typedef __libcpp_remove_reference_t<_ValExpr> _RmExpr;
_ValExpr __expr_;
public:
@@ -4932,4 +4929,10 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <algorithm>
+# include <concepts>
+# include <functional>
+#endif
+
#endif // _LIBCPP_VALARRAY
diff --git a/contrib/libs/cxxsupp/libcxx/include/variant b/contrib/libs/cxxsupp/libcxx/include/variant
index b74416b62d..26835f327d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/variant
+++ b/contrib/libs/cxxsupp/libcxx/include/variant
@@ -22,8 +22,8 @@ namespace std {
// 20.7.2.1, constructors
constexpr variant() noexcept(see below);
- variant(const variant&); // constexpr in C++20
- variant(variant&&) noexcept(see below); // constexpr in C++20
+ constexpr variant(const variant&);
+ constexpr variant(variant&&) noexcept(see below);
template <class T> constexpr variant(T&&) noexcept(see below);
@@ -45,8 +45,8 @@ namespace std {
~variant();
// 20.7.2.3, assignment
- variant& operator=(const variant&); // constexpr in C++20
- variant& operator=(variant&&) noexcept(see below); // constexpr in C++20
+ constexpr variant& operator=(const variant&);
+ constexpr variant& operator=(variant&&) noexcept(see below);
template <class T> variant& operator=(T&&) noexcept(see below);
@@ -165,6 +165,10 @@ namespace std {
template <class... Types>
constexpr bool operator>=(const variant<Types...>&, const variant<Types...>&);
+ template <class... Types> requires (three_way_comparable<Types> && ...)
+ constexpr common_comparison_category_t<compare_three_way_result_t<Types>...>
+ operator<=>(const variant<Types...>&, const variant<Types...>&); // since C++20
+
// 20.7.6, visitation
template <class Visitor, class... Variants>
constexpr see below visit(Visitor&&, Variants&&...);
@@ -176,12 +180,13 @@ namespace std {
struct monostate;
// 20.7.8, monostate relational operators
- constexpr bool operator<(monostate, monostate) noexcept;
- constexpr bool operator>(monostate, monostate) noexcept;
- constexpr bool operator<=(monostate, monostate) noexcept;
- constexpr bool operator>=(monostate, monostate) noexcept;
constexpr bool operator==(monostate, monostate) noexcept;
- constexpr bool operator!=(monostate, monostate) noexcept;
+ constexpr bool operator!=(monostate, monostate) noexcept; // until C++20
+ constexpr bool operator<(monostate, monostate) noexcept; // until C++20
+ constexpr bool operator>(monostate, monostate) noexcept; // until C++20
+ constexpr bool operator<=(monostate, monostate) noexcept; // until C++20
+ constexpr bool operator>=(monostate, monostate) noexcept; // until C++20
+ constexpr strong_ordering operator<=>(monostate, monostate) noexcept; // since C++20
// 20.7.9, specialized algorithms
template <class... Types>
@@ -201,11 +206,14 @@ namespace std {
#include <__assert> // all public C++ headers provide the assertion handler
#include <__availability>
+#include <__compare/common_comparison_category.h>
+#include <__compare/compare_three_way_result.h>
+#include <__compare/three_way_comparable.h>
#include <__config>
#include <__functional/hash.h>
#include <__functional/operations.h>
#include <__functional/unary_function.h>
-#include <__tuple>
+#include <__type_traits/dependent_type.h>
#include <__utility/forward.h>
#include <__utility/in_place.h>
#include <__utility/move.h>
@@ -219,12 +227,9 @@ namespace std {
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <typeinfo>
-# include <utility>
-#endif
-
// standard-mandated includes
+
+// [variant.syn]
#include <compare>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -238,7 +243,7 @@ namespace std { // explicitly not using versioning namespace
class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS bad_variant_access : public exception {
public:
- virtual const char* what() const _NOEXCEPT;
+ const char* what() const _NOEXCEPT override;
};
} // namespace std
@@ -261,7 +266,7 @@ struct __farray {
};
_LIBCPP_NORETURN
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
void __throw_bad_variant_access() {
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -320,7 +325,7 @@ struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, variant<_Types...>> {
inline constexpr size_t variant_npos = static_cast<size_t>(-1);
-constexpr int __choose_index_type(unsigned int __num_elem) {
+_LIBCPP_HIDE_FROM_ABI constexpr int __choose_index_type(unsigned int __num_elem) {
if (__num_elem < numeric_limits<unsigned char>::max())
return 0;
if (__num_elem < numeric_limits<unsigned short>::max())
@@ -372,7 +377,7 @@ __as_variant(const variant<_Types...>&& __vs) noexcept {
namespace __find_detail {
template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr size_t __find_index() {
constexpr bool __matches[] = {is_same_v<_Tp, _Types>...};
size_t __result = __not_found;
@@ -417,7 +422,7 @@ constexpr _Trait __trait =
? _Trait::_TriviallyAvailable
: _IsAvailable<_Tp>::value ? _Trait::_Available : _Trait::_Unavailable;
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr _Trait __common_trait(initializer_list<_Trait> __traits) {
_Trait __result = _Trait::_TriviallyAvailable;
for (_Trait __t : __traits) {
@@ -456,13 +461,13 @@ namespace __access {
struct __union {
template <class _Vp>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto&& __get_alt(_Vp&& __v, in_place_index_t<0>) {
return _VSTD::forward<_Vp>(__v).__head;
}
template <class _Vp, size_t _Ip>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto&& __get_alt(_Vp&& __v, in_place_index_t<_Ip>) {
return __get_alt(_VSTD::forward<_Vp>(__v).__tail, in_place_index<_Ip - 1>);
}
@@ -470,7 +475,7 @@ struct __union {
struct __base {
template <size_t _Ip, class _Vp>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto&& __get_alt(_Vp&& __v) {
return __union::__get_alt(_VSTD::forward<_Vp>(__v).__data,
in_place_index<_Ip>);
@@ -479,9 +484,9 @@ struct __base {
struct __variant {
template <size_t _Ip, class _Vp>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto&& __get_alt(_Vp&& __v) {
- return __base::__get_alt<_Ip>(_VSTD::forward<_Vp>(__v).__impl);
+ return __base::__get_alt<_Ip>(_VSTD::forward<_Vp>(__v).__impl_);
}
};
@@ -491,7 +496,7 @@ namespace __visitation {
struct __base {
template <class _Visitor, class... _Vs>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr decltype(auto)
__visit_alt_at(size_t __index, _Visitor&& __visitor, _Vs&&... __vs) {
constexpr auto __fdiagonal =
@@ -502,7 +507,7 @@ struct __base {
}
template <class _Visitor, class... _Vs>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr decltype(auto) __visit_alt(_Visitor&& __visitor,
_Vs&&... __vs) {
constexpr auto __fmatrix =
@@ -515,11 +520,11 @@ struct __base {
private:
template <class _Tp>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr const _Tp& __at(const _Tp& __elem) { return __elem; }
template <class _Tp, size_t _Np, typename... _Indices>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto&& __at(const __farray<_Tp, _Np>& __elems,
size_t __index, _Indices... __indices) {
return __at(__elems[__index], __indices...);
@@ -533,17 +538,17 @@ private:
}
template <class... _Fs>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto __make_farray(_Fs&&... __fs) {
- __std_visit_visitor_return_type_check<__uncvref_t<_Fs>...>();
- using __result = __farray<common_type_t<__uncvref_t<_Fs>...>, sizeof...(_Fs)>;
+ __std_visit_visitor_return_type_check<__remove_cvref_t<_Fs>...>();
+ using __result = __farray<common_type_t<__remove_cvref_t<_Fs>...>, sizeof...(_Fs)>;
return __result{{_VSTD::forward<_Fs>(__fs)...}};
}
template <size_t... _Is>
struct __dispatcher {
template <class _Fp, class... _Vs>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr decltype(auto) __dispatch(_Fp __f, _Vs... __vs) {
return _VSTD::__invoke(
static_cast<_Fp>(__f),
@@ -552,40 +557,40 @@ private:
};
template <class _Fp, class... _Vs, size_t... _Is>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto __make_dispatch(index_sequence<_Is...>) {
return __dispatcher<_Is...>::template __dispatch<_Fp, _Vs...>;
}
template <size_t _Ip, class _Fp, class... _Vs>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto __make_fdiagonal_impl() {
return __make_dispatch<_Fp, _Vs...>(
index_sequence<((void)__type_identity<_Vs>{}, _Ip)...>{});
}
template <class _Fp, class... _Vs, size_t... _Is>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto __make_fdiagonal_impl(index_sequence<_Is...>) {
return __base::__make_farray(__make_fdiagonal_impl<_Is, _Fp, _Vs...>()...);
}
template <class _Fp, class _Vp, class... _Vs>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto __make_fdiagonal() {
- constexpr size_t _Np = __uncvref_t<_Vp>::__size();
- static_assert(__all<(_Np == __uncvref_t<_Vs>::__size())...>::value);
+ constexpr size_t _Np = __remove_cvref_t<_Vp>::__size();
+ static_assert(__all<(_Np == __remove_cvref_t<_Vs>::__size())...>::value);
return __make_fdiagonal_impl<_Fp, _Vp, _Vs...>(make_index_sequence<_Np>{});
}
template <class _Fp, class... _Vs, size_t... _Is>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto __make_fmatrix_impl(index_sequence<_Is...> __is) {
return __make_dispatch<_Fp, _Vs...>(__is);
}
template <class _Fp, class... _Vs, size_t... _Is, size_t... _Js, class... _Ls>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto __make_fmatrix_impl(index_sequence<_Is...>,
index_sequence<_Js...>,
_Ls... __ls) {
@@ -594,34 +599,34 @@ private:
}
template <class _Fp, class... _Vs>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto __make_fmatrix() {
return __make_fmatrix_impl<_Fp, _Vs...>(
- index_sequence<>{}, make_index_sequence<__uncvref_t<_Vs>::__size()>{}...);
+ index_sequence<>{}, make_index_sequence<__remove_cvref_t<_Vs>::__size()>{}...);
}
};
struct __variant {
template <class _Visitor, class... _Vs>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr decltype(auto)
__visit_alt_at(size_t __index, _Visitor&& __visitor, _Vs&&... __vs) {
return __base::__visit_alt_at(__index,
_VSTD::forward<_Visitor>(__visitor),
- _VSTD::forward<_Vs>(__vs).__impl...);
+ _VSTD::forward<_Vs>(__vs).__impl_...);
}
template <class _Visitor, class... _Vs>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr decltype(auto) __visit_alt(_Visitor&& __visitor,
_Vs&&... __vs) {
return __base::__visit_alt(
_VSTD::forward<_Visitor>(__visitor),
- _VSTD::__as_variant(_VSTD::forward<_Vs>(__vs)).__impl...);
+ _VSTD::__as_variant(_VSTD::forward<_Vs>(__vs)).__impl_...);
}
template <class _Visitor, class... _Vs>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr decltype(auto)
__visit_value_at(size_t __index, _Visitor&& __visitor, _Vs&&... __vs) {
return __visit_alt_at(
@@ -631,7 +636,7 @@ struct __variant {
}
template <class _Visitor, class... _Vs>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr decltype(auto) __visit_value(_Visitor&& __visitor,
_Vs&&... __vs) {
return __visit_alt(
@@ -641,7 +646,7 @@ struct __variant {
#if _LIBCPP_STD_VER > 17
template <class _Rp, class _Visitor, class... _Vs>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr _Rp __visit_value(_Visitor&& __visitor,
_Vs&&... __vs) {
return __visit_alt(
@@ -660,7 +665,7 @@ private:
template <class _Visitor>
struct __value_visitor {
template <class... _Alts>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
constexpr decltype(auto) operator()(_Alts&&... __alts) const {
__std_visit_exhaustive_visitor_check<
_Visitor,
@@ -675,7 +680,7 @@ private:
template <class _Rp, class _Visitor>
struct __value_visitor_return_type {
template <class... _Alts>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
constexpr _Rp operator()(_Alts&&... __alts) const {
__std_visit_exhaustive_visitor_check<
_Visitor,
@@ -695,14 +700,14 @@ private:
#endif
template <class _Visitor>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto __make_value_visitor(_Visitor&& __visitor) {
return __value_visitor<_Visitor>{_VSTD::forward<_Visitor>(__visitor)};
}
#if _LIBCPP_STD_VER > 17
template <class _Rp, class _Visitor>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr auto __make_value_visitor(_Visitor&& __visitor) {
return __value_visitor_return_type<_Rp, _Visitor>{_VSTD::forward<_Visitor>(__visitor)};
}
@@ -716,7 +721,7 @@ struct _LIBCPP_TEMPLATE_VIS __alt {
using __value_type = _Tp;
template <class... _Args>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
explicit constexpr __alt(in_place_t, _Args&&... __args)
: __value(_VSTD::forward<_Args>(__args)...) {}
@@ -731,21 +736,21 @@ union _LIBCPP_TEMPLATE_VIS __union<_DestructibleTrait, _Index> {};
#define _LIBCPP_VARIANT_UNION(destructible_trait, destructor) \
template <size_t _Index, class _Tp, class... _Types> \
- union _LIBCPP_TEMPLATE_VIS __union<destructible_trait, \
+ union _LIBCPP_TEMPLATE_VIS __union<destructible_trait, \
_Index, \
_Tp, \
_Types...> { \
public: \
- inline _LIBCPP_INLINE_VISIBILITY \
+ _LIBCPP_HIDE_FROM_ABI \
explicit constexpr __union(__valueless_t) noexcept : __dummy{} {} \
\
template <class... _Args> \
- inline _LIBCPP_INLINE_VISIBILITY \
+ _LIBCPP_HIDE_FROM_ABI \
explicit constexpr __union(in_place_index_t<0>, _Args&&... __args) \
: __head(in_place, _VSTD::forward<_Args>(__args)...) {} \
\
template <size_t _Ip, class... _Args> \
- inline _LIBCPP_INLINE_VISIBILITY \
+ _LIBCPP_HIDE_FROM_ABI \
explicit constexpr __union(in_place_index_t<_Ip>, _Args&&... __args) \
: __tail(in_place_index<_Ip - 1>, _VSTD::forward<_Args>(__args)...) {} \
\
@@ -776,41 +781,41 @@ class _LIBCPP_TEMPLATE_VIS __base {
public:
using __index_t = __variant_index_t<sizeof...(_Types)>;
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
explicit constexpr __base(__valueless_t __tag) noexcept
: __data(__tag), __index(__variant_npos<__index_t>) {}
template <size_t _Ip, class... _Args>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
explicit constexpr __base(in_place_index_t<_Ip>, _Args&&... __args)
:
__data(in_place_index<_Ip>, _VSTD::forward<_Args>(__args)...),
__index(_Ip) {}
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
constexpr bool valueless_by_exception() const noexcept {
return index() == variant_npos;
}
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
constexpr size_t index() const noexcept {
return __index == __variant_npos<__index_t> ? variant_npos : __index;
}
protected:
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
constexpr auto&& __as_base() & { return *this; }
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
constexpr auto&& __as_base() && { return _VSTD::move(*this); }
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
constexpr auto&& __as_base() const & { return *this; }
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
constexpr auto&& __as_base() const && { return _VSTD::move(*this); }
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static constexpr size_t __size() { return sizeof...(_Types); }
__union<_DestructibleTrait, 0, _Types...> __data;
@@ -842,7 +847,7 @@ class _LIBCPP_TEMPLATE_VIS __dtor;
__dtor& operator=(__dtor&&) = default; \
\
protected: \
- inline _LIBCPP_INLINE_VISIBILITY \
+ inline _LIBCPP_HIDE_FROM_ABI \
destroy \
}
@@ -858,7 +863,7 @@ _LIBCPP_VARIANT_DESTRUCTOR(
if (!this->valueless_by_exception()) {
__visitation::__base::__visit_alt(
[](auto& __alt) noexcept {
- using __alt_type = __uncvref_t<decltype(__alt)>;
+ using __alt_type = __remove_cvref_t<decltype(__alt)>;
__alt.~__alt_type();
},
*this);
@@ -883,7 +888,7 @@ public:
protected:
template <size_t _Ip, class _Tp, class... _Args>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static _Tp& __construct_alt(__alt<_Ip, _Tp>& __a, _Args&&... __args) {
::new ((void*)_VSTD::addressof(__a))
__alt<_Ip, _Tp>(in_place, _VSTD::forward<_Args>(__args)...);
@@ -891,7 +896,7 @@ protected:
}
template <class _Rhs>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
static void __generic_construct(__ctor& __lhs, _Rhs&& __rhs) {
__lhs.__destroy();
if (!__rhs.valueless_by_exception()) {
@@ -954,7 +959,7 @@ class _LIBCPP_TEMPLATE_VIS __copy_constructor;
#define _LIBCPP_VARIANT_COPY_CONSTRUCTOR(copy_constructible_trait, \
copy_constructor) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS __copy_constructor<__traits<_Types...>, \
+ class _LIBCPP_TEMPLATE_VIS __copy_constructor<__traits<_Types...>, \
copy_constructible_trait> \
: public __move_constructor<__traits<_Types...>> { \
using __base_type = __move_constructor<__traits<_Types...>>; \
@@ -996,7 +1001,7 @@ public:
using __base_type::operator=;
template <size_t _Ip, class... _Args>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
auto& __emplace(_Args&&... __args) {
this->__destroy();
auto& __res = this->__construct_alt(__access::__base::__get_alt<_Ip>(*this),
@@ -1007,7 +1012,7 @@ public:
protected:
template <size_t _Ip, class _Tp, class _Arg>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
void __assign_alt(__alt<_Ip, _Tp>& __a, _Arg&& __arg) {
if (this->index() == _Ip) {
__a.__value = _VSTD::forward<_Arg>(__arg);
@@ -1028,7 +1033,7 @@ protected:
}
template <class _That>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
void __generic_assign(_That&& __that) {
if (this->valueless_by_exception() && __that.valueless_by_exception()) {
// do nothing.
@@ -1053,7 +1058,7 @@ class _LIBCPP_TEMPLATE_VIS __move_assignment;
#define _LIBCPP_VARIANT_MOVE_ASSIGNMENT(move_assignable_trait, \
move_assignment) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS __move_assignment<__traits<_Types...>, \
+ class _LIBCPP_TEMPLATE_VIS __move_assignment<__traits<_Types...>, \
move_assignable_trait> \
: public __assignment<__traits<_Types...>> { \
using __base_type = __assignment<__traits<_Types...>>; \
@@ -1094,7 +1099,7 @@ class _LIBCPP_TEMPLATE_VIS __copy_assignment;
#define _LIBCPP_VARIANT_COPY_ASSIGNMENT(copy_assignable_trait, \
copy_assignment) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS __copy_assignment<__traits<_Types...>, \
+ class _LIBCPP_TEMPLATE_VIS __copy_assignment<__traits<_Types...>, \
copy_assignable_trait> \
: public __move_assignment<__traits<_Types...>> { \
using __base_type = __move_assignment<__traits<_Types...>>; \
@@ -1140,13 +1145,13 @@ public:
__impl& operator=(__impl&&) = default;
template <size_t _Ip, class _Arg>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
void __assign(_Arg&& __arg) {
this->__assign_alt(__access::__base::__get_alt<_Ip>(*this),
_VSTD::forward<_Arg>(__arg));
}
- inline _LIBCPP_INLINE_VISIBILITY
+ inline _LIBCPP_HIDE_FROM_ABI
void __swap(__impl& __that) {
if (this->valueless_by_exception() && __that.valueless_by_exception()) {
// do nothing.
@@ -1192,7 +1197,7 @@ public:
}
private:
- inline _LIBCPP_INLINE_VISIBILITY
+ inline _LIBCPP_HIDE_FROM_ABI
bool __move_nothrow() const {
constexpr bool __results[] = {is_nothrow_move_constructible_v<_Types>...};
return this->valueless_by_exception() || __results[this->index()];
@@ -1230,7 +1235,7 @@ struct __overload {
template <class _Tp, size_t>
struct __overload_bool {
- template <class _Up, class _Ap = __uncvref_t<_Up>>
+ template <class _Up, class _Ap = __remove_cvref_t<_Up>>
auto operator()(bool, _Up&&) const
-> enable_if_t<is_same_v<_Ap, bool>, __type_identity<_Tp>>;
};
@@ -1298,36 +1303,36 @@ public:
enable_if_t<__dependent_type<is_default_constructible<__first_type>,
_Dummy>::value,
int> = 0>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
constexpr variant() noexcept(is_nothrow_default_constructible_v<__first_type>)
- : __impl(in_place_index<0>) {}
+ : __impl_(in_place_index<0>) {}
- variant(const variant&) = default;
- variant(variant&&) = default;
+ constexpr variant(const variant&) = default;
+ constexpr variant(variant&&) = default;
template <
class _Arg,
- enable_if_t<!is_same_v<__uncvref_t<_Arg>, variant>, int> = 0,
- enable_if_t<!__is_inplace_type<__uncvref_t<_Arg>>::value, int> = 0,
- enable_if_t<!__is_inplace_index<__uncvref_t<_Arg>>::value, int> = 0,
+ enable_if_t<!is_same_v<__remove_cvref_t<_Arg>, variant>, int> = 0,
+ enable_if_t<!__is_inplace_type<__remove_cvref_t<_Arg>>::value, int> = 0,
+ enable_if_t<!__is_inplace_index<__remove_cvref_t<_Arg>>::value, int> = 0,
class _Tp = __variant_detail::__best_match_t<_Arg, _Types...>,
size_t _Ip =
__find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
enable_if_t<is_constructible_v<_Tp, _Arg>, int> = 0>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
constexpr variant(_Arg&& __arg) noexcept(
is_nothrow_constructible_v<_Tp, _Arg>)
- : __impl(in_place_index<_Ip>, _VSTD::forward<_Arg>(__arg)) {}
+ : __impl_(in_place_index<_Ip>, _VSTD::forward<_Arg>(__arg)) {}
template <size_t _Ip, class... _Args,
class = enable_if_t<(_Ip < sizeof...(_Types)), int>,
class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
explicit constexpr variant(
in_place_index_t<_Ip>,
_Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, _Args...>)
- : __impl(in_place_index<_Ip>, _VSTD::forward<_Args>(__args)...) {}
+ : __impl_(in_place_index<_Ip>, _VSTD::forward<_Args>(__args)...) {}
template <
size_t _Ip,
@@ -1337,13 +1342,13 @@ public:
class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>,
int> = 0>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
explicit constexpr variant(
in_place_index_t<_Ip>,
initializer_list<_Up> __il,
_Args&&... __args) noexcept(
is_nothrow_constructible_v<_Tp, initializer_list<_Up>&, _Args...>)
- : __impl(in_place_index<_Ip>, __il, _VSTD::forward<_Args>(__args)...) {}
+ : __impl_(in_place_index<_Ip>, __il, _VSTD::forward<_Args>(__args)...) {}
template <
class _Tp,
@@ -1351,10 +1356,10 @@ public:
size_t _Ip =
__find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
explicit constexpr variant(in_place_type_t<_Tp>, _Args&&... __args) noexcept(
is_nothrow_constructible_v<_Tp, _Args...>)
- : __impl(in_place_index<_Ip>, _VSTD::forward<_Args>(__args)...) {}
+ : __impl_(in_place_index<_Ip>, _VSTD::forward<_Args>(__args)...) {}
template <
class _Tp,
@@ -1364,32 +1369,32 @@ public:
__find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>,
int> = 0>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
explicit constexpr variant(
in_place_type_t<_Tp>,
initializer_list<_Up> __il,
_Args&&... __args) noexcept(
is_nothrow_constructible_v<_Tp, initializer_list< _Up>&, _Args...>)
- : __impl(in_place_index<_Ip>, __il, _VSTD::forward<_Args>(__args)...) {}
+ : __impl_(in_place_index<_Ip>, __il, _VSTD::forward<_Args>(__args)...) {}
~variant() = default;
- variant& operator=(const variant&) = default;
- variant& operator=(variant&&) = default;
+ constexpr variant& operator=(const variant&) = default;
+ constexpr variant& operator=(variant&&) = default;
template <
class _Arg,
- enable_if_t<!is_same_v<__uncvref_t<_Arg>, variant>, int> = 0,
+ enable_if_t<!is_same_v<__remove_cvref_t<_Arg>, variant>, int> = 0,
class _Tp = __variant_detail::__best_match_t<_Arg, _Types...>,
size_t _Ip =
__find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
enable_if_t<is_assignable_v<_Tp&, _Arg> && is_constructible_v<_Tp, _Arg>,
int> = 0>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
variant& operator=(_Arg&& __arg) noexcept(
is_nothrow_assignable_v<_Tp&, _Arg> &&
is_nothrow_constructible_v<_Tp, _Arg>) {
- __impl.template __assign<_Ip>(_VSTD::forward<_Arg>(__arg));
+ __impl_.template __assign<_Ip>(_VSTD::forward<_Arg>(__arg));
return *this;
}
@@ -1399,9 +1404,9 @@ public:
enable_if_t<(_Ip < sizeof...(_Types)), int> = 0,
class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
_Tp& emplace(_Args&&... __args) {
- return __impl.template __emplace<_Ip>(_VSTD::forward<_Args>(__args)...);
+ return __impl_.template __emplace<_Ip>(_VSTD::forward<_Args>(__args)...);
}
template <
@@ -1412,9 +1417,9 @@ public:
class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>,
int> = 0>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
_Tp& emplace(initializer_list<_Up> __il, _Args&&... __args) {
- return __impl.template __emplace<_Ip>(__il, _VSTD::forward<_Args>(__args)...);
+ return __impl_.template __emplace<_Ip>(__il, _VSTD::forward<_Args>(__args)...);
}
template <
@@ -1423,9 +1428,9 @@ public:
size_t _Ip =
__find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
_Tp& emplace(_Args&&... __args) {
- return __impl.template __emplace<_Ip>(_VSTD::forward<_Args>(__args)...);
+ return __impl_.template __emplace<_Ip>(_VSTD::forward<_Args>(__args)...);
}
template <
@@ -1436,18 +1441,18 @@ public:
__find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>,
int> = 0>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
_Tp& emplace(initializer_list<_Up> __il, _Args&&... __args) {
- return __impl.template __emplace<_Ip>(__il, _VSTD::forward<_Args>(__args)...);
+ return __impl_.template __emplace<_Ip>(__il, _VSTD::forward<_Args>(__args)...);
}
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
constexpr bool valueless_by_exception() const noexcept {
- return __impl.valueless_by_exception();
+ return __impl_.valueless_by_exception();
}
- inline _LIBCPP_INLINE_VISIBILITY
- constexpr size_t index() const noexcept { return __impl.index(); }
+ _LIBCPP_HIDE_FROM_ABI
+ constexpr size_t index() const noexcept { return __impl_.index(); }
template <
bool _Dummy = true,
@@ -1456,34 +1461,34 @@ public:
__dependent_type<is_move_constructible<_Types>, _Dummy>::value &&
__dependent_type<is_swappable<_Types>, _Dummy>::value)...>::value,
int> = 0>
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
void swap(variant& __that) noexcept(
__all<(is_nothrow_move_constructible_v<_Types> &&
is_nothrow_swappable_v<_Types>)...>::value) {
- __impl.__swap(__that.__impl);
+ __impl_.__swap(__that.__impl_);
}
private:
- __variant_detail::__impl<_Types...> __impl;
+ __variant_detail::__impl<_Types...> __impl_;
friend struct __variant_detail::__access::__variant;
friend struct __variant_detail::__visitation::__variant;
};
template <size_t _Ip, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr bool __holds_alternative(const variant<_Types...>& __v) noexcept {
return __v.index() == _Ip;
}
template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr bool holds_alternative(const variant<_Types...>& __v) noexcept {
return __holds_alternative<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
}
template <size_t _Ip, class _Vp>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr auto&& __generic_get(_Vp&& __v) {
using __variant_detail::__access::__variant;
@@ -1494,7 +1499,7 @@ constexpr auto&& __generic_get(_Vp&& __v) {
}
template <size_t _Ip, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr variant_alternative_t<_Ip, variant<_Types...>>& get(
variant<_Types...>& __v) {
@@ -1504,7 +1509,7 @@ constexpr variant_alternative_t<_Ip, variant<_Types...>>& get(
}
template <size_t _Ip, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr variant_alternative_t<_Ip, variant<_Types...>>&& get(
variant<_Types...>&& __v) {
@@ -1514,7 +1519,7 @@ constexpr variant_alternative_t<_Ip, variant<_Types...>>&& get(
}
template <size_t _Ip, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr const variant_alternative_t<_Ip, variant<_Types...>>& get(
const variant<_Types...>& __v) {
@@ -1524,7 +1529,7 @@ constexpr const variant_alternative_t<_Ip, variant<_Types...>>& get(
}
template <size_t _Ip, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr const variant_alternative_t<_Ip, variant<_Types...>>&& get(
const variant<_Types...>&& __v) {
@@ -1534,7 +1539,7 @@ constexpr const variant_alternative_t<_Ip, variant<_Types...>>&& get(
}
template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr _Tp& get(variant<_Types...>& __v) {
static_assert(!is_void_v<_Tp>);
@@ -1542,7 +1547,7 @@ constexpr _Tp& get(variant<_Types...>& __v) {
}
template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr _Tp&& get(variant<_Types...>&& __v) {
static_assert(!is_void_v<_Tp>);
@@ -1551,7 +1556,7 @@ constexpr _Tp&& get(variant<_Types...>&& __v) {
}
template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr const _Tp& get(const variant<_Types...>& __v) {
static_assert(!is_void_v<_Tp>);
@@ -1559,7 +1564,7 @@ constexpr const _Tp& get(const variant<_Types...>& __v) {
}
template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr const _Tp&& get(const variant<_Types...>&& __v) {
static_assert(!is_void_v<_Tp>);
@@ -1568,7 +1573,7 @@ constexpr const _Tp&& get(const variant<_Types...>&& __v) {
}
template <size_t _Ip, class _Vp>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr auto* __generic_get_if(_Vp* __v) noexcept {
using __variant_detail::__access::__variant;
return __v && __holds_alternative<_Ip>(*__v)
@@ -1577,7 +1582,7 @@ constexpr auto* __generic_get_if(_Vp* __v) noexcept {
}
template <size_t _Ip, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr add_pointer_t<variant_alternative_t<_Ip, variant<_Types...>>>
get_if(variant<_Types...>* __v) noexcept {
static_assert(_Ip < sizeof...(_Types));
@@ -1586,7 +1591,7 @@ get_if(variant<_Types...>* __v) noexcept {
}
template <size_t _Ip, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr add_pointer_t<const variant_alternative_t<_Ip, variant<_Types...>>>
get_if(const variant<_Types...>* __v) noexcept {
static_assert(_Ip < sizeof...(_Types));
@@ -1595,7 +1600,7 @@ get_if(const variant<_Types...>* __v) noexcept {
}
template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr add_pointer_t<_Tp>
get_if(variant<_Types...>* __v) noexcept {
static_assert(!is_void_v<_Tp>);
@@ -1603,7 +1608,7 @@ get_if(variant<_Types...>* __v) noexcept {
}
template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr add_pointer_t<const _Tp>
get_if(const variant<_Types...>* __v) noexcept {
static_assert(!is_void_v<_Tp>);
@@ -1613,7 +1618,8 @@ get_if(const variant<_Types...>* __v) noexcept {
template <class _Operator>
struct __convert_to_bool {
template <class _T1, class _T2>
- _LIBCPP_INLINE_VISIBILITY constexpr bool operator()(_T1 && __t1, _T2&& __t2) const {
+ _LIBCPP_HIDE_FROM_ABI
+ constexpr bool operator()(_T1 && __t1, _T2&& __t2) const {
static_assert(is_convertible<decltype(_Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2))), bool>::value,
"the relational operator does not return a type which is implicitly convertible to bool");
return _Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2));
@@ -1621,7 +1627,7 @@ struct __convert_to_bool {
};
template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr bool operator==(const variant<_Types...>& __lhs,
const variant<_Types...>& __rhs) {
using __variant_detail::__visitation::__variant;
@@ -1630,8 +1636,29 @@ constexpr bool operator==(const variant<_Types...>& __lhs,
return __variant::__visit_value_at(__lhs.index(), __convert_to_bool<equal_to<>>{}, __lhs, __rhs);
}
+# if _LIBCPP_STD_VER > 17
+
+template <class... _Types> requires (three_way_comparable<_Types> && ...)
+_LIBCPP_HIDE_FROM_ABI constexpr common_comparison_category_t<compare_three_way_result_t<_Types>...>
+operator<=>(const variant<_Types...>& __lhs, const variant<_Types...>& __rhs) {
+ using __variant_detail::__visitation::__variant;
+ using __result_t = common_comparison_category_t<compare_three_way_result_t<_Types>...>;
+ if (__lhs.valueless_by_exception() && __rhs.valueless_by_exception())
+ return strong_ordering::equal;
+ if (__lhs.valueless_by_exception())
+ return strong_ordering::less;
+ if (__rhs.valueless_by_exception())
+ return strong_ordering::greater;
+ if (auto __c = __lhs.index() <=> __rhs.index(); __c != 0)
+ return __c;
+ auto __three_way = []<class _Type>(const _Type& __v, const _Type& __w) -> __result_t { return __v <=> __w; };
+ return __variant::__visit_value_at(__lhs.index(), __three_way, __lhs, __rhs);
+}
+
+# endif // _LIBCPP_STD_VER > 17
+
template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr bool operator!=(const variant<_Types...>& __lhs,
const variant<_Types...>& __rhs) {
using __variant_detail::__visitation::__variant;
@@ -1642,7 +1669,7 @@ constexpr bool operator!=(const variant<_Types...>& __lhs,
}
template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr bool operator<(const variant<_Types...>& __lhs,
const variant<_Types...>& __rhs) {
using __variant_detail::__visitation::__variant;
@@ -1654,7 +1681,7 @@ constexpr bool operator<(const variant<_Types...>& __lhs,
}
template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr bool operator>(const variant<_Types...>& __lhs,
const variant<_Types...>& __rhs) {
using __variant_detail::__visitation::__variant;
@@ -1666,7 +1693,7 @@ constexpr bool operator>(const variant<_Types...>& __lhs,
}
template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr bool operator<=(const variant<_Types...>& __lhs,
const variant<_Types...>& __rhs) {
using __variant_detail::__visitation::__variant;
@@ -1679,7 +1706,7 @@ constexpr bool operator<=(const variant<_Types...>& __lhs,
}
template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr bool operator>=(const variant<_Types...>& __lhs,
const variant<_Types...>& __rhs) {
using __variant_detail::__visitation::__variant;
@@ -1692,9 +1719,9 @@ constexpr bool operator>=(const variant<_Types...>& __lhs,
}
template <class... _Vs>
-inline _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr void
- __throw_if_valueless(_Vs&&... __vs) {
+_LIBCPP_HIDE_FROM_ABI
+_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
+constexpr void __throw_if_valueless(_Vs&&... __vs) {
const bool __valueless =
(... || _VSTD::__as_variant(__vs).valueless_by_exception());
if (__valueless) {
@@ -1705,9 +1732,9 @@ inline _LIBCPP_INLINE_VISIBILITY
template <
class _Visitor, class... _Vs,
typename = void_t<decltype(_VSTD::__as_variant(declval<_Vs>()))...> >
-inline _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr
- decltype(auto) visit(_Visitor&& __visitor, _Vs&&... __vs) {
+_LIBCPP_HIDE_FROM_ABI
+_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
+constexpr decltype(auto) visit(_Visitor&& __visitor, _Vs&&... __vs) {
using __variant_detail::__visitation::__variant;
_VSTD::__throw_if_valueless(_VSTD::forward<_Vs>(__vs)...);
return __variant::__visit_value(_VSTD::forward<_Visitor>(__visitor),
@@ -1718,9 +1745,9 @@ inline _LIBCPP_INLINE_VISIBILITY
template <
class _Rp, class _Visitor, class... _Vs,
typename = void_t<decltype(_VSTD::__as_variant(declval<_Vs>()))...> >
-inline _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr _Rp
- visit(_Visitor&& __visitor, _Vs&&... __vs) {
+_LIBCPP_HIDE_FROM_ABI
+_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
+constexpr _Rp visit(_Visitor&& __visitor, _Vs&&... __vs) {
using __variant_detail::__visitation::__variant;
_VSTD::__throw_if_valueless(_VSTD::forward<_Vs>(__vs)...);
return __variant::__visit_value<_Rp>(_VSTD::forward<_Visitor>(__visitor),
@@ -1729,7 +1756,7 @@ inline _LIBCPP_INLINE_VISIBILITY
#endif
template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
auto swap(variant<_Types...>& __lhs, variant<_Types...>& __rhs)
noexcept(noexcept(__lhs.swap(__rhs)))
-> decltype( __lhs.swap(__rhs))
@@ -1741,7 +1768,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<
using argument_type = variant<_Types...>;
using result_type = size_t;
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
result_type operator()(const argument_type& __v) const {
using __variant_detail::__visitation::__variant;
size_t __res =
@@ -1749,7 +1776,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<
? 299792458 // Random value chosen by the universe upon creation
: __variant::__visit_alt(
[](const auto& __alt) {
- using __alt_type = __uncvref_t<decltype(__alt)>;
+ using __alt_type = __remove_cvref_t<decltype(__alt)>;
using __value_type = remove_const_t<
typename __alt_type::__value_type>;
return hash<__value_type>{}(__alt.__value);
@@ -1763,20 +1790,20 @@ struct _LIBCPP_TEMPLATE_VIS hash<
// type whereas std::get will throw or returning nullptr. This makes it faster than
// std::get.
template <size_t _Ip, class _Vp>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr auto&& __unchecked_get(_Vp&& __v) noexcept {
using __variant_detail::__access::__variant;
return __variant::__get_alt<_Ip>(_VSTD::forward<_Vp>(__v)).__value;
}
template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr auto&& __unchecked_get(const variant<_Types...>& __v) noexcept {
return __unchecked_get<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
}
template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
constexpr auto&& __unchecked_get(variant<_Types...>& __v) noexcept {
return __unchecked_get<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
}
@@ -1787,4 +1814,9 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <typeinfo>
+# include <utility>
+#endif
+
#endif // _LIBCPP_VARIANT
diff --git a/contrib/libs/cxxsupp/libcxx/include/vector b/contrib/libs/cxxsupp/libcxx/include/vector
index c111087e79..53bb94c828 100644
--- a/contrib/libs/cxxsupp/libcxx/include/vector
+++ b/contrib/libs/cxxsupp/libcxx/include/vector
@@ -293,7 +293,12 @@ erase_if(vector<T, Allocator>& c, Predicate pred); // C++20
#include <__memory/allocate_at_least.h>
#include <__memory/pointer_traits.h>
#include <__memory/swap_allocator.h>
+#include <__memory/temp_value.h>
+#include <__memory/uninitialized_algorithms.h>
+#include <__memory_resource/polymorphic_allocator.h>
#include <__split_buffer>
+#include <__type_traits/is_allocator.h>
+#include <__type_traits/noexcept_move_assign_container.h>
#include <__utility/forward.h>
#include <__utility/move.h>
#include <__utility/swap.h>
@@ -302,17 +307,10 @@ erase_if(vector<T, Allocator>& c, Predicate pred); // C++20
#include <cstring>
#include <iosfwd> // for forward declaration of vector
#include <limits>
-#include <memory>
#include <stdexcept>
#include <type_traits>
#include <version>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <algorithm>
-# include <typeinfo>
-# include <utility>
-#endif
-
// standard-mandated includes
// [iterator.range]
@@ -356,21 +354,26 @@ public:
typedef pointer iterator;
typedef const_pointer const_iterator;
#else
+ // TODO: Implement iterator bounds checking without requiring the global database.
typedef __wrap_iter<pointer> iterator;
typedef __wrap_iter<const_pointer> const_iterator;
#endif
- typedef _VSTD::reverse_iterator<iterator> reverse_iterator;
- typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
static_assert((is_same<typename allocator_type::value_type, value_type>::value),
"Allocator::value_type must be same type as value_type");
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
+ "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
+ "original allocator");
+
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
{
- _VSTD::__debug_db_insert_c(this);
+ std::__debug_db_insert_c(this);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY explicit vector(const allocator_type& __a)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit vector(const allocator_type& __a)
#if _LIBCPP_STD_VER <= 14
_NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
#else
@@ -378,20 +381,20 @@ public:
#endif
: __end_cap_(nullptr, __a)
{
- _VSTD::__debug_db_insert_c(this);
+ std::__debug_db_insert_c(this);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit vector(size_type __n);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit vector(size_type __n);
#if _LIBCPP_STD_VER > 11
- _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit vector(size_type __n, const allocator_type& __a);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit vector(size_type __n, const allocator_type& __a);
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(size_type __n, const value_type& __x);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(size_type __n, const value_type& __x);
template <class = __enable_if_t<__is_allocator<_Allocator>::value> >
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
vector(size_type __n, const value_type& __x, const allocator_type& __a)
: __end_cap_(nullptr, __a)
{
- _VSTD::__debug_db_insert_c(this);
+ std::__debug_db_insert_c(this);
if (__n > 0)
{
__vallocate(__n);
@@ -399,38 +402,33 @@ public:
}
}
- template <class _InputIterator>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
- vector(_InputIterator __first,
- typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
- is_constructible<
- value_type,
- typename iterator_traits<_InputIterator>::reference>::value,
- _InputIterator>::type __last);
- template <class _InputIterator>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
- vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
- typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
- is_constructible<
- value_type,
- typename iterator_traits<_InputIterator>::reference>::value>::type* = 0);
- template <class _ForwardIterator>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
- vector(_ForwardIterator __first,
- typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
- is_constructible<
- value_type,
- typename iterator_traits<_ForwardIterator>::reference>::value,
- _ForwardIterator>::type __last);
- template <class _ForwardIterator>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
- vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a,
- typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
- is_constructible<
- value_type,
- typename iterator_traits<_ForwardIterator>::reference>::value>::type* = 0);
-
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ template <class _InputIterator,
+ __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
+ is_constructible<value_type, typename iterator_traits<_InputIterator>::reference>::value,
+ int> = 0>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(_InputIterator __first, _InputIterator __last);
+ template <class _InputIterator,
+ __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
+ is_constructible<value_type, typename iterator_traits<_InputIterator>::reference>::value,
+ int> = 0>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
+ vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a);
+
+ template <
+ class _ForwardIterator,
+ __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
+ is_constructible<value_type, typename iterator_traits<_ForwardIterator>::reference>::value,
+ int> = 0>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(_ForwardIterator __first, _ForwardIterator __last);
+
+ template <class _ForwardIterator,
+ __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
+ is_constructible<value_type, typename iterator_traits<_ForwardIterator>::reference>::value,
+ int> = 0>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
+ vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a);
+
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
~vector()
{
__annotate_delete();
@@ -443,24 +441,24 @@ public:
}
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(const vector& __x);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(const vector& __x, const __type_identity_t<allocator_type>& __a);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(const vector& __x);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(const vector& __x, const __type_identity_t<allocator_type>& __a);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
vector& operator=(const vector& __x);
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
vector(initializer_list<value_type> __il);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
vector(initializer_list<value_type> __il, const allocator_type& __a);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
vector& operator=(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end()); return *this;}
#endif // !_LIBCPP_CXX03_LANG
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
vector(vector&& __x)
#if _LIBCPP_STD_VER > 14
noexcept;
@@ -468,174 +466,163 @@ public:
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
vector(vector&& __x, const __type_identity_t<allocator_type>& __a);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
vector& operator=(vector&& __x)
_NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));
- template <class _InputIterator>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
- is_constructible<
- value_type,
- typename iterator_traits<_InputIterator>::reference>::value,
- void
- >::type
- assign(_InputIterator __first, _InputIterator __last);
- template <class _ForwardIterator>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
- typename enable_if
- <
- __is_cpp17_forward_iterator<_ForwardIterator>::value &&
- is_constructible<
- value_type,
- typename iterator_traits<_ForwardIterator>::reference>::value,
- void
- >::type
- assign(_ForwardIterator __first, _ForwardIterator __last);
+ template <class _InputIterator,
+ __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
+ is_constructible<value_type, typename iterator_traits<_InputIterator>::reference>::value,
+ int> = 0>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void assign(_InputIterator __first, _InputIterator __last);
+ template <
+ class _ForwardIterator,
+ __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
+ is_constructible<value_type, typename iterator_traits<_ForwardIterator>::reference>::value,
+ int> = 0>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void assign(_ForwardIterator __first, _ForwardIterator __last);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void assign(size_type __n, const_reference __u);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void assign(size_type __n, const_reference __u);
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void assign(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end());}
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
allocator_type get_allocator() const _NOEXCEPT
{return this->__alloc();}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY iterator begin() _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_iterator begin() const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY iterator end() _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_iterator end() const _NOEXCEPT;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
reverse_iterator rbegin() _NOEXCEPT
{return reverse_iterator(end());}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
const_reverse_iterator rbegin() const _NOEXCEPT
{return const_reverse_iterator(end());}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
reverse_iterator rend() _NOEXCEPT
{return reverse_iterator(begin());}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
const_reverse_iterator rend() const _NOEXCEPT
{return const_reverse_iterator(begin());}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
const_iterator cbegin() const _NOEXCEPT
{return begin();}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
const_iterator cend() const _NOEXCEPT
{return end();}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
const_reverse_iterator crbegin() const _NOEXCEPT
{return rbegin();}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
const_reverse_iterator crend() const _NOEXCEPT
{return rend();}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
size_type size() const _NOEXCEPT
{return static_cast<size_type>(this->__end_ - this->__begin_);}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
size_type capacity() const _NOEXCEPT
{return static_cast<size_type>(__end_cap() - this->__begin_);}
- _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
bool empty() const _NOEXCEPT
{return this->__begin_ == this->__end_;}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type max_size() const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void reserve(size_type __n);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void reserve(size_type __n);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void shrink_to_fit() _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY reference operator[](size_type __n) _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __n) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 reference at(size_type __n);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference at(size_type __n) const;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference operator[](size_type __n) _NOEXCEPT;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference operator[](size_type __n) const _NOEXCEPT;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference at(size_type __n);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference at(size_type __n) const;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY reference front() _NOEXCEPT
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference front() _NOEXCEPT
{
_LIBCPP_ASSERT(!empty(), "front() called on an empty vector");
return *this->__begin_;
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference front() const _NOEXCEPT
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference front() const _NOEXCEPT
{
_LIBCPP_ASSERT(!empty(), "front() called on an empty vector");
return *this->__begin_;
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY reference back() _NOEXCEPT
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference back() _NOEXCEPT
{
_LIBCPP_ASSERT(!empty(), "back() called on an empty vector");
return *(this->__end_ - 1);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference back() const _NOEXCEPT
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference back() const _NOEXCEPT
{
_LIBCPP_ASSERT(!empty(), "back() called on an empty vector");
return *(this->__end_ - 1);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
value_type* data() _NOEXCEPT
- {return _VSTD::__to_address(this->__begin_);}
+ {return std::__to_address(this->__begin_);}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
const value_type* data() const _NOEXCEPT
- {return _VSTD::__to_address(this->__begin_);}
+ {return std::__to_address(this->__begin_);}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(const_reference __x);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void push_back(value_type&& __x);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(value_type&& __x);
template <class... _Args>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
#if _LIBCPP_STD_VER > 14
reference emplace_back(_Args&&... __args);
#else
void emplace_back(_Args&&... __args);
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void pop_back();
- _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, const_reference __x);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __position, const_reference __x);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, value_type&& __x);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __position, value_type&& __x);
template <class... _Args>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator emplace(const_iterator __position, _Args&&... __args);
-
- _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, size_type __n, const_reference __x);
- template <class _InputIterator>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
- is_constructible<
- value_type,
- typename iterator_traits<_InputIterator>::reference>::value,
- iterator
- >::type
- insert(const_iterator __position, _InputIterator __first, _InputIterator __last);
- template <class _ForwardIterator>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
- typename enable_if
- <
- __is_cpp17_forward_iterator<_ForwardIterator>::value &&
- is_constructible<
- value_type,
- typename iterator_traits<_ForwardIterator>::reference>::value,
- iterator
- >::type
- insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator emplace(const_iterator __position, _Args&&... __args);
+
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
+ iterator insert(const_iterator __position, size_type __n, const_reference __x);
+
+ template <class _InputIterator,
+ __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
+ is_constructible< value_type, typename iterator_traits<_InputIterator>::reference>::value,
+ int> = 0>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator
+ insert(const_iterator __position, _InputIterator __first, _InputIterator __last);
+
+ template <
+ class _ForwardIterator,
+ __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
+ is_constructible< value_type, typename iterator_traits<_ForwardIterator>::reference>::value,
+ int> = 0>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator
+ insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
iterator insert(const_iterator __position, initializer_list<value_type> __il)
{return insert(__position, __il.begin(), __il.end());}
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __position);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator erase(const_iterator __first, const_iterator __last);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __position);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __first, const_iterator __last);
- _LIBCPP_REINITIALIZES_OBJECT _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_REINITIALIZES_OBJECT _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void clear() _NOEXCEPT
{
size_type __old_size = size();
@@ -648,10 +635,10 @@ public:
void resize_uninitialized(size_type __sz);
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void resize(size_type __sz);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void resize(size_type __sz, const_reference __x);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void resize(size_type __sz);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void resize(size_type __sz, const_reference __x);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(vector&)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void swap(vector&)
#if _LIBCPP_STD_VER >= 14
_NOEXCEPT;
#else
@@ -659,7 +646,7 @@ public:
__is_nothrow_swappable<allocator_type>::value);
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 bool __invariants() const;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool __invariants() const;
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
@@ -676,7 +663,7 @@ private:
__compressed_pair<pointer, allocator_type> __end_cap_ =
__compressed_pair<pointer, allocator_type>(nullptr, __default_init_tag());
- _LIBCPP_INLINE_VISIBILITY void __invalidate_iterators_past(pointer __new_last);
+ _LIBCPP_HIDE_FROM_ABI void __invalidate_iterators_past(pointer __new_last);
// Allocate space for __n objects
// throws length_error if __n > max_size()
@@ -685,7 +672,7 @@ private:
// Precondition: __n > 0
// Postcondition: capacity() >= __n
// Postcondition: size() == 0
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __vallocate(size_type __n) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __vallocate(size_type __n) {
if (__n > max_size())
__throw_length_error();
auto __allocation = std::__allocate_at_least(__alloc(), __n);
@@ -695,34 +682,30 @@ private:
__annotate_new(0);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __vdeallocate() _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type __recommend(size_type __new_size) const;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __vdeallocate() _NOEXCEPT;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type __recommend(size_type __new_size) const;
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __construct_at_end(size_type __n, const_reference __x);
- template <class _ForwardIterator>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
- typename enable_if
- <
- __is_cpp17_forward_iterator<_ForwardIterator>::value,
- void
- >::type
- __construct_at_end(_ForwardIterator __first, _ForwardIterator __last, size_type __n);
+
+ template <class _ForwardIterator, __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value, int> = 0>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+ __construct_at_end(_ForwardIterator __first, _ForwardIterator __last, size_type __n);
void __append_uninitialized(size_type __n);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __append(size_type __n);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __append(size_type __n, const_reference __x);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __append(size_type __n);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __append(size_type __n, const_reference __x);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
iterator __make_iter(pointer __p) _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
const_iterator __make_iter(const_pointer __p) const _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 pointer __swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v, pointer __p);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_range(pointer __from_s, pointer __from_e, pointer __to);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, true_type)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pointer __swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v, pointer __p);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_range(pointer __from_s, pointer __from_e, pointer __to);
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign(vector& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, false_type)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign(vector& __c, false_type)
_NOEXCEPT_(__alloc_traits::is_always_equal::value);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __destruct_at_end(pointer __new_last) _NOEXCEPT
{
if (!__libcpp_is_constant_evaluated())
@@ -733,11 +716,11 @@ private:
}
template <class _Up>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
inline void __push_back_slow_path(_Up&& __x);
template <class... _Args>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
inline void __emplace_back_slow_path(_Args&&... __args);
// The following functions are no-ops outside of AddressSanitizer mode.
@@ -745,7 +728,7 @@ private:
// may not meet the AddressSanitizer alignment constraints.
// See the documentation for __sanitizer_annotate_contiguous_container for more details.
#ifndef _LIBCPP_HAS_NO_ASAN
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
void __annotate_contiguous_container(const void *__beg, const void *__end,
const void *__old_mid,
const void *__new_mid) const
@@ -755,30 +738,30 @@ private:
__sanitizer_annotate_contiguous_container(__beg, __end, __old_mid, __new_mid);
}
#else
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __annotate_contiguous_container(const void*, const void*, const void*,
const void*) const _NOEXCEPT {}
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __annotate_new(size_type __current_size) const _NOEXCEPT {
__annotate_contiguous_container(data(), data() + capacity(),
data() + capacity(), data() + __current_size);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __annotate_delete() const _NOEXCEPT {
__annotate_contiguous_container(data(), data() + capacity(),
data() + size(), data() + capacity());
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __annotate_increase(size_type __n) const _NOEXCEPT
{
__annotate_contiguous_container(data(), data() + capacity(),
data() + size(), data() + size() + __n);
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __annotate_shrink(size_type __old_size) const _NOEXCEPT
{
__annotate_contiguous_container(data(), data() + capacity(),
@@ -786,14 +769,14 @@ private:
}
struct _ConstructTransaction {
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
explicit _ConstructTransaction(vector &__v, size_type __n)
: __v_(__v), __pos_(__v.__end_), __new_end_(__v.__end_ + __n) {
#ifndef _LIBCPP_HAS_NO_ASAN
__v_.__annotate_increase(__n);
#endif
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 ~_ConstructTransaction() {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI ~_ConstructTransaction() {
__v_.__end_ = __pos_;
#ifndef _LIBCPP_HAS_NO_ASAN
if (__pos_ != __new_end_) {
@@ -812,44 +795,44 @@ private:
};
template <class ..._Args>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __construct_one_at_end(_Args&& ...__args) {
_ConstructTransaction __tx(*this, 1);
- __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_),
- _VSTD::forward<_Args>(__args)...);
+ __alloc_traits::construct(this->__alloc(), std::__to_address(__tx.__pos_),
+ std::forward<_Args>(__args)...);
++__tx.__pos_;
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
allocator_type& __alloc() _NOEXCEPT
{return this->__end_cap_.second();}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
const allocator_type& __alloc() const _NOEXCEPT
{return this->__end_cap_.second();}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
pointer& __end_cap() _NOEXCEPT
{return this->__end_cap_.first();}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
const pointer& __end_cap() const _NOEXCEPT
{return this->__end_cap_.first();}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __clear() _NOEXCEPT {__base_destruct_at_end(this->__begin_);}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __base_destruct_at_end(pointer __new_last) _NOEXCEPT {
pointer __soon_to_be_end = this->__end_;
while (__new_last != __soon_to_be_end)
- __alloc_traits::destroy(__alloc(), _VSTD::__to_address(--__soon_to_be_end));
+ __alloc_traits::destroy(__alloc(), std::__to_address(--__soon_to_be_end));
this->__end_ = __new_last;
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __copy_assign_alloc(const vector& __c)
{__copy_assign_alloc(__c, integral_constant<bool,
__alloc_traits::propagate_on_container_copy_assignment::value>());}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __move_assign_alloc(vector& __c)
_NOEXCEPT_(
!__alloc_traits::propagate_on_container_move_assignment::value ||
@@ -859,15 +842,15 @@ private:
_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
void __throw_length_error() const {
- _VSTD::__throw_length_error("vector");
+ std::__throw_length_error("vector");
}
_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
void __throw_out_of_range() const {
- _VSTD::__throw_out_of_range("vector");
+ std::__throw_out_of_range("vector");
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __copy_assign_alloc(const vector& __c, true_type)
{
if (__alloc() != __c.__alloc())
@@ -879,18 +862,18 @@ private:
__alloc() = __c.__alloc();
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __copy_assign_alloc(const vector&, false_type)
{}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __move_assign_alloc(vector& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
- __alloc() = _VSTD::move(__c.__alloc());
+ __alloc() = std::move(__c.__alloc());
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void __move_assign_alloc(vector&, false_type)
_NOEXCEPT
{}
@@ -915,7 +898,7 @@ vector(_InputIterator, _InputIterator, _Alloc)
#endif
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v)
{
@@ -924,16 +907,16 @@ vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, a
__v.__begin_ = std::__uninitialized_allocator_move_if_noexcept(
__alloc(), _RevIter(__end_), _RevIter(__begin_), _RevIter(__v.__begin_))
.base();
- _VSTD::swap(this->__begin_, __v.__begin_);
- _VSTD::swap(this->__end_, __v.__end_);
- _VSTD::swap(this->__end_cap(), __v.__end_cap());
+ std::swap(this->__begin_, __v.__begin_);
+ std::swap(this->__end_, __v.__end_);
+ std::swap(this->__end_cap(), __v.__end_cap());
__v.__first_ = __v.__begin_;
__annotate_new(size());
std::__debug_db_invalidate_all(this);
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::pointer
vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v, pointer __p)
{
@@ -944,9 +927,9 @@ vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, a
__alloc(), _RevIter(__p), _RevIter(__begin_), _RevIter(__v.__begin_))
.base();
__v.__end_ = std::__uninitialized_allocator_move_if_noexcept(__alloc(), __p, __end_, __v.__end_);
- _VSTD::swap(this->__begin_, __v.__begin_);
- _VSTD::swap(this->__end_, __v.__end_);
- _VSTD::swap(this->__end_cap(), __v.__end_cap());
+ std::swap(this->__begin_, __v.__begin_);
+ std::swap(this->__end_, __v.__end_);
+ std::swap(this->__end_cap(), __v.__end_cap());
__v.__first_ = __v.__begin_;
__annotate_new(size());
std::__debug_db_invalidate_all(this);
@@ -954,7 +937,7 @@ vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, a
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__vdeallocate() _NOEXCEPT
{
@@ -967,18 +950,18 @@ vector<_Tp, _Allocator>::__vdeallocate() _NOEXCEPT
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::size_type
vector<_Tp, _Allocator>::max_size() const _NOEXCEPT
{
- return _VSTD::min<size_type>(__alloc_traits::max_size(this->__alloc()),
+ return std::min<size_type>(__alloc_traits::max_size(this->__alloc()),
numeric_limits<difference_type>::max());
}
// Precondition: __new_size > capacity()
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::size_type
vector<_Tp, _Allocator>::__recommend(size_type __new_size) const
{
@@ -988,7 +971,7 @@ vector<_Tp, _Allocator>::__recommend(size_type __new_size) const
const size_type __cap = capacity();
if (__cap >= __ms / 2)
return __ms;
- return _VSTD::max<size_type>(2 * __cap, __new_size);
+ return std::max<size_type>(2 * __cap, __new_size);
}
// Default constructs __n objects starting at __end_
@@ -997,14 +980,14 @@ vector<_Tp, _Allocator>::__recommend(size_type __new_size) const
// Precondition: size() + __n <= capacity()
// Postcondition: size() == size() + __n
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__construct_at_end(size_type __n)
{
_ConstructTransaction __tx(*this, __n);
const_pointer __new_end = __tx.__new_end_;
for (pointer __pos = __tx.__pos_; __pos != __new_end; __tx.__pos_ = ++__pos) {
- __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__pos));
+ __alloc_traits::construct(this->__alloc(), std::__to_address(__pos));
}
}
@@ -1015,7 +998,7 @@ vector<_Tp, _Allocator>::__construct_at_end(size_type __n)
// Postcondition: size() == old size() + __n
// Postcondition: [i] == __x for all i in [size() - __n, __n)
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
inline
void
vector<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
@@ -1023,18 +1006,13 @@ vector<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
_ConstructTransaction __tx(*this, __n);
const_pointer __new_end = __tx.__new_end_;
for (pointer __pos = __tx.__pos_; __pos != __new_end; __tx.__pos_ = ++__pos) {
- __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__pos), __x);
+ __alloc_traits::construct(this->__alloc(), std::__to_address(__pos), __x);
}
}
template <class _Tp, class _Allocator>
-template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-typename enable_if
-<
- __is_cpp17_forward_iterator<_ForwardIterator>::value,
- void
->::type
+template <class _ForwardIterator, __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value, int> >
+_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last, size_type __n)
{
_ConstructTransaction __tx(*this, __n);
@@ -1063,7 +1041,7 @@ vector<_Tp, _Allocator>::__append_uninitialized(size_type __n)
// Postcondition: size() == size() + __n
// Exception safety: strong.
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__append(size_type __n)
{
@@ -1083,7 +1061,7 @@ vector<_Tp, _Allocator>::__append(size_type __n)
// Postcondition: size() == size() + __n
// Exception safety: strong.
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__append(size_type __n, const_reference __x)
{
@@ -1099,10 +1077,10 @@ vector<_Tp, _Allocator>::__append(size_type __n, const_reference __x)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(size_type __n)
{
- _VSTD::__debug_db_insert_c(this);
+ std::__debug_db_insert_c(this);
if (__n > 0)
{
__vallocate(__n);
@@ -1112,11 +1090,11 @@ vector<_Tp, _Allocator>::vector(size_type __n)
#if _LIBCPP_STD_VER > 11
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(size_type __n, const allocator_type& __a)
: __end_cap_(nullptr, __a)
{
- _VSTD::__debug_db_insert_c(this);
+ std::__debug_db_insert_c(this);
if (__n > 0)
{
__vallocate(__n);
@@ -1126,10 +1104,10 @@ vector<_Tp, _Allocator>::vector(size_type __n, const allocator_type& __a)
#endif
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(size_type __n, const value_type& __x)
{
- _VSTD::__debug_db_insert_c(this);
+ std::__debug_db_insert_c(this);
if (__n > 0)
{
__vallocate(__n);
@@ -1138,47 +1116,39 @@ vector<_Tp, _Allocator>::vector(size_type __n, const value_type& __x)
}
template <class _Tp, class _Allocator>
-template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-vector<_Tp, _Allocator>::vector(_InputIterator __first,
- typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
- is_constructible<
- value_type,
- typename iterator_traits<_InputIterator>::reference>::value,
- _InputIterator>::type __last)
-{
- _VSTD::__debug_db_insert_c(this);
+template <class _InputIterator, __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
+ is_constructible<_Tp, typename iterator_traits<_InputIterator>::reference>::value,
+ int> >
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last)
+{
+ std::__debug_db_insert_c(this);
for (; __first != __last; ++__first)
emplace_back(*__first);
}
template <class _Tp, class _Allocator>
-template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
- typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
- is_constructible<
- value_type,
- typename iterator_traits<_InputIterator>::reference>::value>::type*)
+template <class _InputIterator, __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
+ is_constructible<_Tp, typename iterator_traits<_InputIterator>::reference>::value,
+ int> >
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a)
: __end_cap_(nullptr, __a)
{
- _VSTD::__debug_db_insert_c(this);
+ std::__debug_db_insert_c(this);
for (; __first != __last; ++__first)
emplace_back(*__first);
}
template <class _Tp, class _Allocator>
-template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-vector<_Tp, _Allocator>::vector(_ForwardIterator __first,
- typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
- is_constructible<
- value_type,
- typename iterator_traits<_ForwardIterator>::reference>::value,
- _ForwardIterator>::type __last)
-{
- _VSTD::__debug_db_insert_c(this);
- size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
+template <class _ForwardIterator, __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
+ is_constructible<_Tp, typename iterator_traits<_ForwardIterator>::reference>::value,
+ int> >
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last)
+{
+ std::__debug_db_insert_c(this);
+ size_type __n = static_cast<size_type>(std::distance(__first, __last));
if (__n > 0)
{
__vallocate(__n);
@@ -1187,17 +1157,15 @@ vector<_Tp, _Allocator>::vector(_ForwardIterator __first,
}
template <class _Tp, class _Allocator>
-template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a,
- typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
- is_constructible<
- value_type,
- typename iterator_traits<_ForwardIterator>::reference>::value>::type*)
+template <class _ForwardIterator, __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
+ is_constructible<_Tp, typename iterator_traits<_ForwardIterator>::reference>::value,
+ int> >
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a)
: __end_cap_(nullptr, __a)
{
- _VSTD::__debug_db_insert_c(this);
- size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
+ std::__debug_db_insert_c(this);
+ size_type __n = static_cast<size_type>(std::distance(__first, __last));
if (__n > 0)
{
__vallocate(__n);
@@ -1206,11 +1174,11 @@ vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __las
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(const vector& __x)
: __end_cap_(nullptr, __alloc_traits::select_on_container_copy_construction(__x.__alloc()))
{
- _VSTD::__debug_db_insert_c(this);
+ std::__debug_db_insert_c(this);
size_type __n = __x.size();
if (__n > 0)
{
@@ -1220,11 +1188,11 @@ vector<_Tp, _Allocator>::vector(const vector& __x)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
: __end_cap_(nullptr, __a)
{
- _VSTD::__debug_db_insert_c(this);
+ std::__debug_db_insert_c(this);
size_type __n = __x.size();
if (__n > 0)
{
@@ -1234,17 +1202,17 @@ vector<_Tp, _Allocator>::vector(const vector& __x, const __type_identity_t<alloc
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
vector<_Tp, _Allocator>::vector(vector&& __x)
#if _LIBCPP_STD_VER > 14
noexcept
#else
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
#endif
- : __end_cap_(nullptr, _VSTD::move(__x.__alloc()))
+ : __end_cap_(nullptr, std::move(__x.__alloc()))
{
- _VSTD::__debug_db_insert_c(this);
+ std::__debug_db_insert_c(this);
std::__debug_db_swap(this, std::addressof(__x));
this->__begin_ = __x.__begin_;
this->__end_ = __x.__end_;
@@ -1253,12 +1221,12 @@ vector<_Tp, _Allocator>::vector(vector&& __x)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
vector<_Tp, _Allocator>::vector(vector&& __x, const __type_identity_t<allocator_type>& __a)
: __end_cap_(nullptr, __a)
{
- _VSTD::__debug_db_insert_c(this);
+ std::__debug_db_insert_c(this);
if (__a == __x.__alloc())
{
this->__begin_ = __x.__begin_;
@@ -1277,11 +1245,11 @@ vector<_Tp, _Allocator>::vector(vector&& __x, const __type_identity_t<allocator_
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il)
{
- _VSTD::__debug_db_insert_c(this);
+ std::__debug_db_insert_c(this);
if (__il.size() > 0)
{
__vallocate(__il.size());
@@ -1290,12 +1258,12 @@ vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il, const allocator_type& __a)
: __end_cap_(nullptr, __a)
{
- _VSTD::__debug_db_insert_c(this);
+ std::__debug_db_insert_c(this);
if (__il.size() > 0)
{
__vallocate(__il.size());
@@ -1306,8 +1274,8 @@ vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il, const allocat
#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
vector<_Tp, _Allocator>&
vector<_Tp, _Allocator>::operator=(vector&& __x)
_NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value))
@@ -1318,7 +1286,7 @@ vector<_Tp, _Allocator>::operator=(vector&& __x)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__move_assign(vector& __c, false_type)
_NOEXCEPT_(__alloc_traits::is_always_equal::value)
@@ -1333,7 +1301,7 @@ vector<_Tp, _Allocator>::__move_assign(vector& __c, false_type)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
@@ -1348,12 +1316,12 @@ vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
vector<_Tp, _Allocator>&
vector<_Tp, _Allocator>::operator=(const vector& __x)
{
- if (this != _VSTD::addressof(__x))
+ if (this != std::addressof(__x))
{
__copy_assign_alloc(__x);
assign(__x.__begin_, __x.__end_);
@@ -1362,13 +1330,10 @@ vector<_Tp, _Allocator>::operator=(const vector& __x)
}
template <class _Tp, class _Allocator>
-template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
- is_constructible<
- _Tp,
- typename iterator_traits<_InputIterator>::reference>::value,
- void
->::type
+template <class _InputIterator, __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
+ is_constructible<_Tp, typename iterator_traits<_InputIterator>::reference>::value,
+ int> >
+_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<_Tp, _Allocator>::assign(_InputIterator __first, _InputIterator __last)
{
clear();
@@ -1377,19 +1342,13 @@ vector<_Tp, _Allocator>::assign(_InputIterator __first, _InputIterator __last)
}
template <class _Tp, class _Allocator>
-template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-typename enable_if
-<
- __is_cpp17_forward_iterator<_ForwardIterator>::value &&
- is_constructible<
- _Tp,
- typename iterator_traits<_ForwardIterator>::reference>::value,
- void
->::type
+template <class _ForwardIterator, __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
+ is_constructible<_Tp, typename iterator_traits<_ForwardIterator>::reference>::value,
+ int> >
+_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<_Tp, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last)
{
- size_type __new_size = static_cast<size_type>(_VSTD::distance(__first, __last));
+ size_type __new_size = static_cast<size_type>(std::distance(__first, __last));
if (__new_size <= capacity())
{
_ForwardIterator __mid = __last;
@@ -1398,9 +1357,9 @@ vector<_Tp, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __las
{
__growing = true;
__mid = __first;
- _VSTD::advance(__mid, size());
+ std::advance(__mid, size());
}
- pointer __m = _VSTD::copy(__first, __mid, this->__begin_);
+ pointer __m = std::copy(__first, __mid, this->__begin_);
if (__growing)
__construct_at_end(__mid, __last, __new_size - size());
else
@@ -1416,14 +1375,14 @@ vector<_Tp, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __las
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::assign(size_type __n, const_reference __u)
{
if (__n <= capacity())
{
size_type __s = size();
- _VSTD::fill_n(this->__begin_, _VSTD::min(__n, __s), __u);
+ std::fill_n(this->__begin_, std::min(__n, __s), __u);
if (__n > __s)
__construct_at_end(__n - __s, __u);
else
@@ -1441,7 +1400,7 @@ vector<_Tp, _Allocator>::assign(size_type __n, const_reference __u)
// We need to save the make_iter function and replace all constructor calls with it
// Made to support pointer iterators
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_INLINE_VISIBILITY
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::__make_iter(pointer __p) _NOEXCEPT
@@ -1454,7 +1413,7 @@ vector<_Tp, _Allocator>::__make_iter(pointer __p) _NOEXCEPT
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_INLINE_VISIBILITY
typename vector<_Tp, _Allocator>::const_iterator
vector<_Tp, _Allocator>::__make_iter(const_pointer __p) const _NOEXCEPT
@@ -1467,8 +1426,8 @@ vector<_Tp, _Allocator>::__make_iter(const_pointer __p) const _NOEXCEPT
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::begin() _NOEXCEPT
{
@@ -1476,8 +1435,8 @@ vector<_Tp, _Allocator>::begin() _NOEXCEPT
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::const_iterator
vector<_Tp, _Allocator>::begin() const _NOEXCEPT
{
@@ -1485,8 +1444,8 @@ vector<_Tp, _Allocator>::begin() const _NOEXCEPT
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::end() _NOEXCEPT
{
@@ -1494,8 +1453,8 @@ vector<_Tp, _Allocator>::end() _NOEXCEPT
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::const_iterator
vector<_Tp, _Allocator>::end() const _NOEXCEPT
{
@@ -1503,8 +1462,8 @@ vector<_Tp, _Allocator>::end() const _NOEXCEPT
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::reference
vector<_Tp, _Allocator>::operator[](size_type __n) _NOEXCEPT
{
@@ -1513,8 +1472,8 @@ vector<_Tp, _Allocator>::operator[](size_type __n) _NOEXCEPT
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::const_reference
vector<_Tp, _Allocator>::operator[](size_type __n) const _NOEXCEPT
{
@@ -1523,7 +1482,7 @@ vector<_Tp, _Allocator>::operator[](size_type __n) const _NOEXCEPT
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::reference
vector<_Tp, _Allocator>::at(size_type __n)
{
@@ -1533,7 +1492,7 @@ vector<_Tp, _Allocator>::at(size_type __n)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::const_reference
vector<_Tp, _Allocator>::at(size_type __n) const
{
@@ -1543,7 +1502,7 @@ vector<_Tp, _Allocator>::at(size_type __n) const
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::reserve(size_type __n)
{
@@ -1558,7 +1517,7 @@ vector<_Tp, _Allocator>::reserve(size_type __n)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT
{
@@ -1582,21 +1541,21 @@ vector<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT
template <class _Tp, class _Allocator>
template <class _Up>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__push_back_slow_path(_Up&& __x)
{
allocator_type& __a = this->__alloc();
__split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), size(), __a);
- // __v.push_back(_VSTD::forward<_Up>(__x));
- __alloc_traits::construct(__a, _VSTD::__to_address(__v.__end_), _VSTD::forward<_Up>(__x));
+ // __v.push_back(std::forward<_Up>(__x));
+ __alloc_traits::construct(__a, std::__to_address(__v.__end_), std::forward<_Up>(__x));
__v.__end_++;
__swap_out_circular_buffer(__v);
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
void
vector<_Tp, _Allocator>::push_back(const_reference __x)
{
@@ -1609,36 +1568,36 @@ vector<_Tp, _Allocator>::push_back(const_reference __x)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
void
vector<_Tp, _Allocator>::push_back(value_type&& __x)
{
if (this->__end_ < this->__end_cap())
{
- __construct_one_at_end(_VSTD::move(__x));
+ __construct_one_at_end(std::move(__x));
}
else
- __push_back_slow_path(_VSTD::move(__x));
+ __push_back_slow_path(std::move(__x));
}
template <class _Tp, class _Allocator>
template <class... _Args>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__emplace_back_slow_path(_Args&&... __args)
{
allocator_type& __a = this->__alloc();
__split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), size(), __a);
-// __v.emplace_back(_VSTD::forward<_Args>(__args)...);
- __alloc_traits::construct(__a, _VSTD::__to_address(__v.__end_), _VSTD::forward<_Args>(__args)...);
+// __v.emplace_back(std::forward<_Args>(__args)...);
+ __alloc_traits::construct(__a, std::__to_address(__v.__end_), std::forward<_Args>(__args)...);
__v.__end_++;
__swap_out_circular_buffer(__v);
}
template <class _Tp, class _Allocator>
template <class... _Args>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
inline
#if _LIBCPP_STD_VER > 14
typename vector<_Tp, _Allocator>::reference
@@ -1649,17 +1608,17 @@ vector<_Tp, _Allocator>::emplace_back(_Args&&... __args)
{
if (this->__end_ < this->__end_cap())
{
- __construct_one_at_end(_VSTD::forward<_Args>(__args)...);
+ __construct_one_at_end(std::forward<_Args>(__args)...);
}
else
- __emplace_back_slow_path(_VSTD::forward<_Args>(__args)...);
+ __emplace_back_slow_path(std::forward<_Args>(__args)...);
#if _LIBCPP_STD_VER > 14
return this->back();
#endif
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
inline
void
vector<_Tp, _Allocator>::pop_back()
@@ -1669,47 +1628,45 @@ vector<_Tp, _Allocator>::pop_back()
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::erase(const_iterator __position)
{
- _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this,
+ _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this,
"vector::erase(iterator) called with an iterator not referring to this vector");
_LIBCPP_ASSERT(__position != end(),
"vector::erase(iterator) called with a non-dereferenceable iterator");
difference_type __ps = __position - cbegin();
pointer __p = this->__begin_ + __ps;
- this->__destruct_at_end(_VSTD::move(__p + 1, this->__end_, __p));
+ this->__destruct_at_end(std::move(__p + 1, this->__end_, __p));
if (!__libcpp_is_constant_evaluated())
this->__invalidate_iterators_past(__p - 1);
- iterator __r = __make_iter(__p);
- return __r;
+ return __make_iter(__p);
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::erase(const_iterator __first, const_iterator __last)
{
- _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__first)) == this,
+ _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__first)) == this,
"vector::erase(iterator, iterator) called with an iterator not referring to this vector");
- _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__last)) == this,
+ _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__last)) == this,
"vector::erase(iterator, iterator) called with an iterator not referring to this vector");
_LIBCPP_ASSERT(__first <= __last, "vector::erase(first, last) called with invalid range");
pointer __p = this->__begin_ + (__first - begin());
if (__first != __last) {
- this->__destruct_at_end(_VSTD::move(__p + (__last - __first), this->__end_, __p));
+ this->__destruct_at_end(std::move(__p + (__last - __first), this->__end_, __p));
if (!__libcpp_is_constant_evaluated())
this->__invalidate_iterators_past(__p - 1);
}
- iterator __r = __make_iter(__p);
- return __r;
+ return __make_iter(__p);
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__move_range(pointer __from_s, pointer __from_e, pointer __to)
{
@@ -1721,19 +1678,19 @@ vector<_Tp, _Allocator>::__move_range(pointer __from_s, pointer __from_e, pointe
for (pointer __pos = __tx.__pos_; __i < __from_e;
++__i, (void) ++__pos, __tx.__pos_ = __pos) {
__alloc_traits::construct(this->__alloc(),
- _VSTD::__to_address(__pos),
- _VSTD::move(*__i));
+ std::__to_address(__pos),
+ std::move(*__i));
}
}
- _VSTD::move_backward(__from_s, __from_s + __n, __old_last);
+ std::move_backward(__from_s, __from_s + __n, __old_last);
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x)
{
- _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this,
+ _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this,
"vector::insert(iterator, x) called with an iterator not referring to this vector");
pointer __p = this->__begin_ + (__position - begin());
// We can't compare unrelated pointers inside constant expressions
@@ -1763,30 +1720,30 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x)
{
- _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this,
+ _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this,
"vector::insert(iterator, x) called with an iterator not referring to this vector");
pointer __p = this->__begin_ + (__position - begin());
if (this->__end_ < this->__end_cap())
{
if (__p == this->__end_)
{
- __construct_one_at_end(_VSTD::move(__x));
+ __construct_one_at_end(std::move(__x));
}
else
{
__move_range(__p, this->__end_, __p + 1);
- *__p = _VSTD::move(__x);
+ *__p = std::move(__x);
}
}
else
{
allocator_type& __a = this->__alloc();
__split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), __p - this->__begin_, __a);
- __v.push_back(_VSTD::move(__x));
+ __v.push_back(std::move(__x));
__p = __swap_out_circular_buffer(__v, __p);
}
return __make_iter(__p);
@@ -1794,42 +1751,42 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x)
template <class _Tp, class _Allocator>
template <class... _Args>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args)
{
- _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this,
+ _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this,
"vector::emplace(iterator, x) called with an iterator not referring to this vector");
pointer __p = this->__begin_ + (__position - begin());
if (this->__end_ < this->__end_cap())
{
if (__p == this->__end_)
{
- __construct_one_at_end(_VSTD::forward<_Args>(__args)...);
+ __construct_one_at_end(std::forward<_Args>(__args)...);
}
else
{
- __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...);
+ __temp_value<value_type, _Allocator> __tmp(this->__alloc(), std::forward<_Args>(__args)...);
__move_range(__p, this->__end_, __p + 1);
- *__p = _VSTD::move(__tmp.get());
+ *__p = std::move(__tmp.get());
}
}
else
{
allocator_type& __a = this->__alloc();
__split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), __p - this->__begin_, __a);
- __v.emplace_back(_VSTD::forward<_Args>(__args)...);
+ __v.emplace_back(std::forward<_Args>(__args)...);
__p = __swap_out_circular_buffer(__v, __p);
}
return __make_iter(__p);
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_reference __x)
{
- _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this,
+ _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this,
"vector::insert(iterator, n, x) called with an iterator not referring to this vector");
pointer __p = this->__begin_ + (__position - begin());
if (__n > 0)
@@ -1851,7 +1808,7 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_
const_pointer __xr = pointer_traits<const_pointer>::pointer_to(__x);
if (__p <= __xr && __xr < this->__end_)
__xr += __old_n;
- _VSTD::fill_n(__p, __n, *__xr);
+ std::fill_n(__p, __n, *__xr);
}
}
else
@@ -1866,16 +1823,13 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_
}
template <class _Tp, class _Allocator>
-template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
- is_constructible<
- _Tp,
- typename iterator_traits<_InputIterator>::reference>::value,
- typename vector<_Tp, _Allocator>::iterator
->::type
+template <class _InputIterator, __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
+ is_constructible<_Tp, typename iterator_traits<_InputIterator>::reference>::value,
+ int> >
+_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, _InputIterator __first, _InputIterator __last)
{
- _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this,
+ _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this,
"vector::insert(iterator, range) called with an iterator not referring to this vector");
difference_type __off = __position - begin();
pointer __p = this->__begin_ + __off;
@@ -1907,29 +1861,23 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, _InputIterator __firs
}
#endif // _LIBCPP_NO_EXCEPTIONS
}
- __p = _VSTD::rotate(__p, __old_last, this->__end_);
- insert(__make_iter(__p), _VSTD::make_move_iterator(__v.begin()),
- _VSTD::make_move_iterator(__v.end()));
+ __p = std::rotate(__p, __old_last, this->__end_);
+ insert(__make_iter(__p), std::make_move_iterator(__v.begin()),
+ std::make_move_iterator(__v.end()));
return begin() + __off;
}
template <class _Tp, class _Allocator>
-template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-typename enable_if
-<
- __is_cpp17_forward_iterator<_ForwardIterator>::value &&
- is_constructible<
- _Tp,
- typename iterator_traits<_ForwardIterator>::reference>::value,
- typename vector<_Tp, _Allocator>::iterator
->::type
+template <class _ForwardIterator, __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
+ is_constructible<_Tp, typename iterator_traits<_ForwardIterator>::reference>::value,
+ int> >
+_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last)
{
- _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this,
+ _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this,
"vector::insert(iterator, range) called with an iterator not referring to this vector");
pointer __p = this->__begin_ + (__position - begin());
- difference_type __n = _VSTD::distance(__first, __last);
+ difference_type __n = std::distance(__first, __last);
if (__n > 0)
{
if (__n <= this->__end_cap() - this->__end_)
@@ -1942,14 +1890,14 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, _ForwardIterator __fi
{
__m = __first;
difference_type __diff = this->__end_ - __p;
- _VSTD::advance(__m, __diff);
+ std::advance(__m, __diff);
__construct_at_end(__m, __last, __n - __diff);
__n = __dx;
}
if (__n > 0)
{
__move_range(__p, __old_last, __p + __old_n);
- _VSTD::copy(__first, __m, __p);
+ std::copy(__first, __m, __p);
}
}
else
@@ -1964,7 +1912,7 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, _ForwardIterator __fi
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::resize(size_type __sz)
{
@@ -1976,7 +1924,7 @@ vector<_Tp, _Allocator>::resize(size_type __sz)
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::resize(size_type __sz, const_reference __x)
{
@@ -2005,7 +1953,7 @@ vector<_Tp, _Allocator>::resize_uninitialized(size_type __sz)
#endif
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::swap(vector& __x)
#if _LIBCPP_STD_VER >= 14
@@ -2019,16 +1967,16 @@ vector<_Tp, _Allocator>::swap(vector& __x)
this->__alloc() == __x.__alloc(),
"vector::swap: Either propagate_on_container_swap must be true"
" or the allocators must compare equal");
- _VSTD::swap(this->__begin_, __x.__begin_);
- _VSTD::swap(this->__end_, __x.__end_);
- _VSTD::swap(this->__end_cap(), __x.__end_cap());
- _VSTD::__swap_allocator(this->__alloc(), __x.__alloc(),
+ std::swap(this->__begin_, __x.__begin_);
+ std::swap(this->__end_, __x.__end_);
+ std::swap(this->__end_cap(), __x.__end_cap());
+ std::__swap_allocator(this->__alloc(), __x.__alloc(),
integral_constant<bool,__alloc_traits::propagate_on_container_swap::value>());
std::__debug_db_swap(this, std::addressof(__x));
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
bool
vector<_Tp, _Allocator>::__invariants() const
{
@@ -2084,7 +2032,7 @@ vector<_Tp, _Allocator>::__subscriptable(const const_iterator* __i, ptrdiff_t __
#endif // _LIBCPP_ENABLE_DEBUG_MODE
template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
void
vector<_Tp, _Allocator>::__invalidate_iterators_past(pointer __new_last) {
#ifdef _LIBCPP_ENABLE_DEBUG_MODE
@@ -2095,7 +2043,7 @@ vector<_Tp, _Allocator>::__invalidate_iterators_past(pointer __new_last) {
if (__i->base() > __new_last) {
(*__p)->__c_ = nullptr;
if (--__c->end_ != __p)
- _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
+ std::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
}
}
__get_db()->unlock();
@@ -2132,11 +2080,11 @@ public:
typedef __bit_iterator<vector, true> const_pointer;
typedef pointer iterator;
typedef const_pointer const_iterator;
- typedef _VSTD::reverse_iterator<iterator> reverse_iterator;
- typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
private:
- typedef typename __rebind_alloc_helper<__alloc_traits, __storage_type>::type __storage_allocator;
+ typedef __rebind_alloc<__alloc_traits, __storage_type> __storage_allocator;
typedef allocator_traits<__storage_allocator> __storage_traits;
typedef typename __storage_traits::pointer __storage_pointer;
typedef typename __storage_traits::const_pointer __const_storage_pointer;
@@ -2152,81 +2100,81 @@ public:
typedef __bit_const_reference<vector> const_reference;
#endif
private:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type& __cap() _NOEXCEPT
{return __cap_alloc_.first();}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const size_type& __cap() const _NOEXCEPT
{return __cap_alloc_.first();}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
__storage_allocator& __alloc() _NOEXCEPT
{return __cap_alloc_.second();}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const __storage_allocator& __alloc() const _NOEXCEPT
{return __cap_alloc_.second();}
static const unsigned __bits_per_word = static_cast<unsigned>(sizeof(__storage_type) * CHAR_BIT);
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
static size_type __internal_cap_to_external(size_type __n) _NOEXCEPT
{return __n * __bits_per_word;}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
static size_type __external_cap_to_internal(size_type __n) _NOEXCEPT
{return (__n - 1) / __bits_per_word + 1;}
public:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit vector(const allocator_type& __a)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit vector(const allocator_type& __a)
#if _LIBCPP_STD_VER <= 14
_NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value);
#else
_NOEXCEPT;
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 ~vector();
- _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit vector(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 ~vector();
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit vector(size_type __n);
#if _LIBCPP_STD_VER > 11
- _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit vector(size_type __n, const allocator_type& __a);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit vector(size_type __n, const allocator_type& __a);
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(size_type __n, const value_type& __v);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(size_type __n, const value_type& __v, const allocator_type& __a);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(size_type __n, const value_type& __v);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(size_type __n, const value_type& __v, const allocator_type& __a);
template <class _InputIterator>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(_InputIterator __first, _InputIterator __last,
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_InputIterator __first, _InputIterator __last,
typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type* = 0);
template <class _InputIterator>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type* = 0);
template <class _ForwardIterator>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(_ForwardIterator __first, _ForwardIterator __last,
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_ForwardIterator __first, _ForwardIterator __last,
typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value>::type* = 0);
template <class _ForwardIterator>
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a,
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a,
typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value>::type* = 0);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(const vector& __v);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(const vector& __v, const allocator_type& __a);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector& operator=(const vector& __v);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(const vector& __v);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(const vector& __v, const allocator_type& __a);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector& operator=(const vector& __v);
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(initializer_list<value_type> __il);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(initializer_list<value_type> __il, const allocator_type& __a);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(initializer_list<value_type> __il);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(initializer_list<value_type> __il, const allocator_type& __a);
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
vector& operator=(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end()); return *this;}
#endif // !_LIBCPP_CXX03_LANG
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
vector(vector&& __v)
#if _LIBCPP_STD_VER > 14
noexcept;
#else
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(vector&& __v, const __type_identity_t<allocator_type>& __a);
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(vector&& __v, const __type_identity_t<allocator_type>& __a);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
vector& operator=(vector&& __v)
_NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));
@@ -2234,162 +2182,162 @@ public:
typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
void
>::type
- _LIBCPP_CONSTEXPR_AFTER_CXX17 assign(_InputIterator __first, _InputIterator __last);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 assign(_InputIterator __first, _InputIterator __last);
template <class _ForwardIterator>
typename enable_if
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
void
>::type
- _LIBCPP_CONSTEXPR_AFTER_CXX17 assign(_ForwardIterator __first, _ForwardIterator __last);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 assign(_ForwardIterator __first, _ForwardIterator __last);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void assign(size_type __n, const value_type& __x);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void assign(size_type __n, const value_type& __x);
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void assign(initializer_list<value_type> __il)
{assign(__il.begin(), __il.end());}
#endif
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 allocator_type get_allocator() const _NOEXCEPT
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 allocator_type get_allocator() const _NOEXCEPT
{return allocator_type(this->__alloc());}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type max_size() const _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type max_size() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type capacity() const _NOEXCEPT
{return __internal_cap_to_external(__cap());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_type size() const _NOEXCEPT
{return __size_;}
- _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
bool empty() const _NOEXCEPT
{return __size_ == 0;}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void reserve(size_type __n);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void reserve(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void shrink_to_fit() _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
iterator begin() _NOEXCEPT
{return __make_iter(0);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_iterator begin() const _NOEXCEPT
{return __make_iter(0);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
iterator end() _NOEXCEPT
{return __make_iter(__size_);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_iterator end() const _NOEXCEPT
{return __make_iter(__size_);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
reverse_iterator rbegin() _NOEXCEPT
{return reverse_iterator(end());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_reverse_iterator rbegin() const _NOEXCEPT
{return const_reverse_iterator(end());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
reverse_iterator rend() _NOEXCEPT
{return reverse_iterator(begin());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_reverse_iterator rend() const _NOEXCEPT
{return const_reverse_iterator(begin());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_iterator cbegin() const _NOEXCEPT
{return __make_iter(0);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_iterator cend() const _NOEXCEPT
{return __make_iter(__size_);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_reverse_iterator crbegin() const _NOEXCEPT
{return rbegin();}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_reverse_iterator crend() const _NOEXCEPT
{return rend();}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference operator[](size_type __n) {return __make_ref(__n);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference operator[](size_type __n) const {return __make_ref(__n);}
- reference at(size_type __n);
- const_reference at(size_type __n) const;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference operator[](size_type __n) {return __make_ref(__n);}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference operator[](size_type __n) const {return __make_ref(__n);}
+ _LIBCPP_HIDE_FROM_ABI reference at(size_type __n);
+ _LIBCPP_HIDE_FROM_ABI const_reference at(size_type __n) const;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference front() {return __make_ref(0);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference front() const {return __make_ref(0);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference back() {return __make_ref(__size_ - 1);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference back() const {return __make_ref(__size_ - 1);}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference front() {return __make_ref(0);}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference front() const {return __make_ref(0);}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference back() {return __make_ref(__size_ - 1);}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference back() const {return __make_ref(__size_ - 1);}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void push_back(const value_type& __x);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void push_back(const value_type& __x);
#if _LIBCPP_STD_VER > 11
template <class... _Args>
#if _LIBCPP_STD_VER > 14
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference emplace_back(_Args&&... __args)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference emplace_back(_Args&&... __args)
#else
- _LIBCPP_INLINE_VISIBILITY void emplace_back(_Args&&... __args)
+ _LIBCPP_HIDE_FROM_ABI void emplace_back(_Args&&... __args)
#endif
{
- push_back ( value_type ( _VSTD::forward<_Args>(__args)... ));
+ push_back ( value_type ( std::forward<_Args>(__args)... ));
#if _LIBCPP_STD_VER > 14
return this->back();
#endif
}
#endif
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void pop_back() {--__size_;}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void pop_back() {--__size_;}
#if _LIBCPP_STD_VER > 11
template <class... _Args>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator emplace(const_iterator __position, _Args&&... __args)
- { return insert ( __position, value_type ( _VSTD::forward<_Args>(__args)... )); }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator emplace(const_iterator __position, _Args&&... __args)
+ { return insert ( __position, value_type ( std::forward<_Args>(__args)... )); }
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, const value_type& __x);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, size_type __n, const value_type& __x);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator insert(const_iterator __position, const value_type& __x);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator insert(const_iterator __position, size_type __n, const value_type& __x);
template <class _InputIterator>
typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
iterator
>::type
- _LIBCPP_CONSTEXPR_AFTER_CXX17 insert(const_iterator __position, _InputIterator __first, _InputIterator __last);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert(const_iterator __position, _InputIterator __first, _InputIterator __last);
template <class _ForwardIterator>
typename enable_if
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
iterator
>::type
- _LIBCPP_CONSTEXPR_AFTER_CXX17 insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
iterator insert(const_iterator __position, initializer_list<value_type> __il)
{return insert(__position, __il.begin(), __il.end());}
#endif
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator erase(const_iterator __position);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator erase(const_iterator __first, const_iterator __last);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator erase(const_iterator __position);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator erase(const_iterator __first, const_iterator __last);
- _LIBCPP_REINITIALIZES_OBJECT _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_REINITIALIZES_OBJECT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void clear() _NOEXCEPT {__size_ = 0;}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(vector&)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(vector&)
#if _LIBCPP_STD_VER >= 14
_NOEXCEPT;
#else
_NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
__is_nothrow_swappable<allocator_type>::value);
#endif
- _LIBCPP_CONSTEXPR_AFTER_CXX17 static void swap(reference __x, reference __y) _NOEXCEPT { _VSTD::swap(__x, __y); }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static void swap(reference __x, reference __y) _NOEXCEPT { std::swap(__x, __y); }
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void resize(size_type __sz, value_type __x = false);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void flip() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void resize(size_type __sz, value_type __x = false);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void flip() _NOEXCEPT;
- _LIBCPP_CONSTEXPR_AFTER_CXX17 bool __invariants() const;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __invariants() const;
private:
_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
void __throw_length_error() const {
- _VSTD::__throw_length_error("vector");
+ std::__throw_length_error("vector");
}
_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
void __throw_out_of_range() const {
- _VSTD::__throw_out_of_range("vector");
+ std::__throw_out_of_range("vector");
}
// Allocate space for __n objects
@@ -2399,7 +2347,7 @@ private:
// Precondition: __n > 0
// Postcondition: capacity() >= __n
// Postcondition: size() == 0
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __vallocate(size_type __n) {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __vallocate(size_type __n) {
if (__n > max_size())
__throw_length_error();
auto __allocation = std::__allocate_at_least(__alloc(), __external_cap_to_internal(__n));
@@ -2412,43 +2360,43 @@ private:
}
}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __vdeallocate() _NOEXCEPT;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __vdeallocate() _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
static size_type __align_it(size_type __new_size) _NOEXCEPT
{return (__new_size + (__bits_per_word-1)) & ~((size_type)__bits_per_word-1);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type __recommend(size_type __new_size) const;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n, bool __x);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type __recommend(size_type __new_size) const;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __construct_at_end(size_type __n, bool __x);
template <class _ForwardIterator>
typename enable_if
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
void
>::type
- _LIBCPP_CONSTEXPR_AFTER_CXX17 __construct_at_end(_ForwardIterator __first, _ForwardIterator __last);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __append(size_type __n, const_reference __x);
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __construct_at_end(_ForwardIterator __first, _ForwardIterator __last);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __append(size_type __n, const_reference __x);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
reference __make_ref(size_type __pos) _NOEXCEPT
{return reference(__begin_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_reference __make_ref(size_type __pos) const _NOEXCEPT {
return __bit_const_reference<vector>(__begin_ + __pos / __bits_per_word,
__storage_type(1) << __pos % __bits_per_word);
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
iterator __make_iter(size_type __pos) _NOEXCEPT
{return iterator(__begin_ + __pos / __bits_per_word, static_cast<unsigned>(__pos % __bits_per_word));}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_iterator __make_iter(size_type __pos) const _NOEXCEPT
{return const_iterator(__begin_ + __pos / __bits_per_word, static_cast<unsigned>(__pos % __bits_per_word));}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
iterator __const_iterator_cast(const_iterator __p) _NOEXCEPT
{return begin() + (__p - cbegin());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __copy_assign_alloc(const vector& __v)
{__copy_assign_alloc(__v, integral_constant<bool,
__storage_traits::propagate_on_container_copy_assignment::value>());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __copy_assign_alloc(const vector& __c, true_type)
{
if (__alloc() != __c.__alloc())
@@ -2456,33 +2404,33 @@ private:
__alloc() = __c.__alloc();
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __copy_assign_alloc(const vector&, false_type)
{}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, false_type);
- _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, true_type)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign(vector& __c, false_type);
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign(vector& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __move_assign_alloc(vector& __c)
_NOEXCEPT_(
!__storage_traits::propagate_on_container_move_assignment::value ||
is_nothrow_move_assignable<allocator_type>::value)
{__move_assign_alloc(__c, integral_constant<bool,
__storage_traits::propagate_on_container_move_assignment::value>());}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __move_assign_alloc(vector& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
- __alloc() = _VSTD::move(__c.__alloc());
+ __alloc() = std::move(__c.__alloc());
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __move_assign_alloc(vector&, false_type)
_NOEXCEPT
{}
- _LIBCPP_CONSTEXPR_AFTER_CXX17 size_t __hash_code() const _NOEXCEPT;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_t __hash_code() const _NOEXCEPT;
friend class __bit_reference<vector>;
friend class __bit_const_reference<vector>;
@@ -2493,7 +2441,7 @@ private:
};
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::__vdeallocate() _NOEXCEPT
{
if (this->__begin_ != nullptr)
@@ -2506,7 +2454,7 @@ vector<bool, _Allocator>::__vdeallocate() _NOEXCEPT
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<bool, _Allocator>::size_type
vector<bool, _Allocator>::max_size() const _NOEXCEPT
{
@@ -2519,7 +2467,7 @@ vector<bool, _Allocator>::max_size() const _NOEXCEPT
// Precondition: __new_size > capacity()
template <class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<bool, _Allocator>::size_type
vector<bool, _Allocator>::__recommend(size_type __new_size) const
{
@@ -2529,7 +2477,7 @@ vector<bool, _Allocator>::__recommend(size_type __new_size) const
const size_type __cap = capacity();
if (__cap >= __ms / 2)
return __ms;
- return _VSTD::max(2 * __cap, __align_it(__new_size));
+ return std::max(2 * __cap, __align_it(__new_size));
}
// Default constructs __n objects starting at __end_
@@ -2537,7 +2485,7 @@ vector<bool, _Allocator>::__recommend(size_type __new_size) const
// Precondition: size() + __n <= capacity()
// Postcondition: size() == size() + __n
template <class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<bool, _Allocator>::__construct_at_end(size_type __n, bool __x)
{
@@ -2550,12 +2498,12 @@ vector<bool, _Allocator>::__construct_at_end(size_type __n, bool __x)
else
this->__begin_[(this->__size_ - 1) / __bits_per_word] = __storage_type(0);
}
- _VSTD::fill_n(__make_iter(__old_size), __n, __x);
+ std::fill_n(__make_iter(__old_size), __n, __x);
}
template <class _Allocator>
template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename enable_if
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -2564,7 +2512,7 @@ typename enable_if
vector<bool, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last)
{
size_type __old_size = this->__size_;
- this->__size_ += _VSTD::distance(__first, __last);
+ this->__size_ += std::distance(__first, __last);
if (__old_size == 0 || ((__old_size - 1) / __bits_per_word) != ((this->__size_ - 1) / __bits_per_word))
{
if (this->__size_ <= __bits_per_word)
@@ -2572,11 +2520,11 @@ vector<bool, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardI
else
this->__begin_[(this->__size_ - 1) / __bits_per_word] = __storage_type(0);
}
- _VSTD::copy(__first, __last, __make_iter(__old_size));
+ std::copy(__first, __last, __make_iter(__old_size));
}
template <class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector()
_NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
: __begin_(nullptr),
@@ -2586,7 +2534,7 @@ vector<bool, _Allocator>::vector()
}
template <class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(const allocator_type& __a)
#if _LIBCPP_STD_VER <= 14
_NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
@@ -2600,7 +2548,7 @@ vector<bool, _Allocator>::vector(const allocator_type& __a)
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(size_type __n)
: __begin_(nullptr),
__size_(0),
@@ -2615,7 +2563,7 @@ vector<bool, _Allocator>::vector(size_type __n)
#if _LIBCPP_STD_VER > 11
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(size_type __n, const allocator_type& __a)
: __begin_(nullptr),
__size_(0),
@@ -2630,7 +2578,7 @@ vector<bool, _Allocator>::vector(size_type __n, const allocator_type& __a)
#endif
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(size_type __n, const value_type& __x)
: __begin_(nullptr),
__size_(0),
@@ -2644,7 +2592,7 @@ vector<bool, _Allocator>::vector(size_type __n, const value_type& __x)
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(size_type __n, const value_type& __x, const allocator_type& __a)
: __begin_(nullptr),
__size_(0),
@@ -2659,7 +2607,7 @@ vector<bool, _Allocator>::vector(size_type __n, const value_type& __x, const all
template <class _Allocator>
template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type*)
: __begin_(nullptr),
@@ -2686,7 +2634,7 @@ vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
template <class _Allocator>
template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type*)
: __begin_(nullptr),
@@ -2713,14 +2661,14 @@ vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
template <class _Allocator>
template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last,
typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value>::type*)
: __begin_(nullptr),
__size_(0),
__cap_alloc_(0, __default_init_tag())
{
- size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
+ size_type __n = static_cast<size_type>(std::distance(__first, __last));
if (__n > 0)
{
__vallocate(__n);
@@ -2730,14 +2678,14 @@ vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __la
template <class _Allocator>
template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a,
typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value>::type*)
: __begin_(nullptr),
__size_(0),
__cap_alloc_(0, static_cast<__storage_allocator>(__a))
{
- size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
+ size_type __n = static_cast<size_type>(std::distance(__first, __last));
if (__n > 0)
{
__vallocate(__n);
@@ -2748,7 +2696,7 @@ vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __la
#ifndef _LIBCPP_CXX03_LANG
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(initializer_list<value_type> __il)
: __begin_(nullptr),
__size_(0),
@@ -2763,7 +2711,7 @@ vector<bool, _Allocator>::vector(initializer_list<value_type> __il)
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(initializer_list<value_type> __il, const allocator_type& __a)
: __begin_(nullptr),
__size_(0),
@@ -2780,7 +2728,7 @@ vector<bool, _Allocator>::vector(initializer_list<value_type> __il, const alloca
#endif // _LIBCPP_CXX03_LANG
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::~vector()
{
if (__begin_ != nullptr)
@@ -2789,7 +2737,7 @@ vector<bool, _Allocator>::~vector()
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(const vector& __v)
: __begin_(nullptr),
__size_(0),
@@ -2803,7 +2751,7 @@ vector<bool, _Allocator>::vector(const vector& __v)
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(const vector& __v, const allocator_type& __a)
: __begin_(nullptr),
__size_(0),
@@ -2817,11 +2765,11 @@ vector<bool, _Allocator>::vector(const vector& __v, const allocator_type& __a)
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>&
vector<bool, _Allocator>::operator=(const vector& __v)
{
- if (this != _VSTD::addressof(__v))
+ if (this != std::addressof(__v))
{
__copy_assign_alloc(__v);
if (__v.__size_)
@@ -2831,7 +2779,7 @@ vector<bool, _Allocator>::operator=(const vector& __v)
__vdeallocate();
__vallocate(__v.__size_);
}
- _VSTD::copy(__v.__begin_, __v.__begin_ + __external_cap_to_internal(__v.__size_), __begin_);
+ std::copy(__v.__begin_, __v.__begin_ + __external_cap_to_internal(__v.__size_), __begin_);
}
__size_ = __v.__size_;
}
@@ -2839,7 +2787,7 @@ vector<bool, _Allocator>::operator=(const vector& __v)
}
template <class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 vector<bool, _Allocator>::vector(vector&& __v)
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(vector&& __v)
#if _LIBCPP_STD_VER > 14
_NOEXCEPT
#else
@@ -2847,14 +2795,14 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 vector<bool, _All
#endif
: __begin_(__v.__begin_),
__size_(__v.__size_),
- __cap_alloc_(_VSTD::move(__v.__cap_alloc_)) {
+ __cap_alloc_(std::move(__v.__cap_alloc_)) {
__v.__begin_ = nullptr;
__v.__size_ = 0;
__v.__cap() = 0;
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(vector&& __v, const __type_identity_t<allocator_type>& __a)
: __begin_(nullptr),
__size_(0),
@@ -2876,7 +2824,7 @@ vector<bool, _Allocator>::vector(vector&& __v, const __type_identity_t<allocator
}
template <class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>&
vector<bool, _Allocator>::operator=(vector&& __v)
_NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value))
@@ -2887,7 +2835,7 @@ vector<bool, _Allocator>::operator=(vector&& __v)
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::__move_assign(vector& __c, false_type)
{
if (__alloc() != __c.__alloc())
@@ -2897,7 +2845,7 @@ vector<bool, _Allocator>::__move_assign(vector& __c, false_type)
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::__move_assign(vector& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
@@ -2911,7 +2859,7 @@ vector<bool, _Allocator>::__move_assign(vector& __c, true_type)
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::assign(size_type __n, const value_type& __x)
{
__size_ = 0;
@@ -2927,14 +2875,14 @@ vector<bool, _Allocator>::assign(size_type __n, const value_type& __x)
__v.__size_ = __n;
swap(__v);
}
- _VSTD::fill_n(begin(), __n, __x);
+ std::fill_n(begin(), __n, __x);
}
std::__debug_db_invalidate_all(this);
}
template <class _Allocator>
template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
+_LIBCPP_CONSTEXPR_SINCE_CXX20 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
void
>::type
vector<bool, _Allocator>::assign(_InputIterator __first, _InputIterator __last)
@@ -2946,7 +2894,7 @@ vector<bool, _Allocator>::assign(_InputIterator __first, _InputIterator __last)
template <class _Allocator>
template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename enable_if
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -2955,7 +2903,7 @@ typename enable_if
vector<bool, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last)
{
clear();
- difference_type __ns = _VSTD::distance(__first, __last);
+ difference_type __ns = std::distance(__first, __last);
_LIBCPP_ASSERT(__ns >= 0, "invalid range specified");
const size_t __n = static_cast<size_type>(__ns);
if (__n)
@@ -2970,7 +2918,7 @@ vector<bool, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __la
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::reserve(size_type __n)
{
if (__n > capacity())
@@ -2986,7 +2934,7 @@ vector<bool, _Allocator>::reserve(size_type __n)
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::shrink_to_fit() _NOEXCEPT
{
if (__external_cap_to_internal(size()) > __cap())
@@ -3024,7 +2972,7 @@ vector<bool, _Allocator>::at(size_type __n) const
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::push_back(const value_type& __x)
{
if (this->__size_ == this->capacity())
@@ -3034,7 +2982,7 @@ vector<bool, _Allocator>::push_back(const value_type& __x)
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 typename vector<bool, _Allocator>::iterator
+_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::insert(const_iterator __position, const value_type& __x)
{
iterator __r;
@@ -3042,7 +2990,7 @@ vector<bool, _Allocator>::insert(const_iterator __position, const value_type& __
{
const_iterator __old_end = end();
++__size_;
- _VSTD::copy_backward(__position, __old_end, end());
+ std::copy_backward(__position, __old_end, end());
__r = __const_iterator_cast(__position);
}
else
@@ -3050,8 +2998,8 @@ vector<bool, _Allocator>::insert(const_iterator __position, const value_type& __
vector __v(get_allocator());
__v.reserve(__recommend(__size_ + 1));
__v.__size_ = __size_ + 1;
- __r = _VSTD::copy(cbegin(), __position, __v.begin());
- _VSTD::copy_backward(__position, cend(), __v.end());
+ __r = std::copy(cbegin(), __position, __v.begin());
+ std::copy_backward(__position, cend(), __v.end());
swap(__v);
}
*__r = __x;
@@ -3059,7 +3007,7 @@ vector<bool, _Allocator>::insert(const_iterator __position, const value_type& __
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 typename vector<bool, _Allocator>::iterator
+_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::insert(const_iterator __position, size_type __n, const value_type& __x)
{
iterator __r;
@@ -3068,7 +3016,7 @@ vector<bool, _Allocator>::insert(const_iterator __position, size_type __n, const
{
const_iterator __old_end = end();
__size_ += __n;
- _VSTD::copy_backward(__position, __old_end, end());
+ std::copy_backward(__position, __old_end, end());
__r = __const_iterator_cast(__position);
}
else
@@ -3076,17 +3024,17 @@ vector<bool, _Allocator>::insert(const_iterator __position, size_type __n, const
vector __v(get_allocator());
__v.reserve(__recommend(__size_ + __n));
__v.__size_ = __size_ + __n;
- __r = _VSTD::copy(cbegin(), __position, __v.begin());
- _VSTD::copy_backward(__position, cend(), __v.end());
+ __r = std::copy(cbegin(), __position, __v.begin());
+ std::copy_backward(__position, cend(), __v.end());
swap(__v);
}
- _VSTD::fill_n(__r, __n, __x);
+ std::fill_n(__r, __n, __x);
return __r;
}
template <class _Allocator>
template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
+_LIBCPP_CONSTEXPR_SINCE_CXX20 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
typename vector<bool, _Allocator>::iterator
>::type
vector<bool, _Allocator>::insert(const_iterator __position, _InputIterator __first, _InputIterator __last)
@@ -3121,14 +3069,14 @@ vector<bool, _Allocator>::insert(const_iterator __position, _InputIterator __fir
}
#endif // _LIBCPP_NO_EXCEPTIONS
}
- __p = _VSTD::rotate(__p, __old_end, end());
+ __p = std::rotate(__p, __old_end, end());
insert(__p, __v.begin(), __v.end());
return begin() + __off;
}
template <class _Allocator>
template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename enable_if
<
__is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -3136,7 +3084,7 @@ typename enable_if
>::type
vector<bool, _Allocator>::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last)
{
- const difference_type __n_signed = _VSTD::distance(__first, __last);
+ const difference_type __n_signed = std::distance(__first, __last);
_LIBCPP_ASSERT(__n_signed >= 0, "invalid range specified");
const size_type __n = static_cast<size_type>(__n_signed);
iterator __r;
@@ -3145,7 +3093,7 @@ vector<bool, _Allocator>::insert(const_iterator __position, _ForwardIterator __f
{
const_iterator __old_end = end();
__size_ += __n;
- _VSTD::copy_backward(__position, __old_end, end());
+ std::copy_backward(__position, __old_end, end());
__r = __const_iterator_cast(__position);
}
else
@@ -3153,39 +3101,39 @@ vector<bool, _Allocator>::insert(const_iterator __position, _ForwardIterator __f
vector __v(get_allocator());
__v.reserve(__recommend(__size_ + __n));
__v.__size_ = __size_ + __n;
- __r = _VSTD::copy(cbegin(), __position, __v.begin());
- _VSTD::copy_backward(__position, cend(), __v.end());
+ __r = std::copy(cbegin(), __position, __v.begin());
+ std::copy_backward(__position, cend(), __v.end());
swap(__v);
}
- _VSTD::copy(__first, __last, __r);
+ std::copy(__first, __last, __r);
return __r;
}
template <class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::erase(const_iterator __position)
{
iterator __r = __const_iterator_cast(__position);
- _VSTD::copy(__position + 1, this->cend(), __r);
+ std::copy(__position + 1, this->cend(), __r);
--__size_;
return __r;
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::erase(const_iterator __first, const_iterator __last)
{
iterator __r = __const_iterator_cast(__first);
difference_type __d = __last - __first;
- _VSTD::copy(__last, this->cend(), __r);
+ std::copy(__last, this->cend(), __r);
__size_ -= __d;
return __r;
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::swap(vector& __x)
#if _LIBCPP_STD_VER >= 14
_NOEXCEPT
@@ -3194,15 +3142,15 @@ vector<bool, _Allocator>::swap(vector& __x)
__is_nothrow_swappable<allocator_type>::value)
#endif
{
- _VSTD::swap(this->__begin_, __x.__begin_);
- _VSTD::swap(this->__size_, __x.__size_);
- _VSTD::swap(this->__cap(), __x.__cap());
- _VSTD::__swap_allocator(this->__alloc(), __x.__alloc(),
+ std::swap(this->__begin_, __x.__begin_);
+ std::swap(this->__size_, __x.__size_);
+ std::swap(this->__cap(), __x.__cap());
+ std::__swap_allocator(this->__alloc(), __x.__alloc(),
integral_constant<bool, __alloc_traits::propagate_on_container_swap::value>());
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::resize(size_type __sz, value_type __x)
{
size_type __cs = size();
@@ -3221,17 +3169,17 @@ vector<bool, _Allocator>::resize(size_type __sz, value_type __x)
vector __v(get_allocator());
__v.reserve(__recommend(__size_ + __n));
__v.__size_ = __size_ + __n;
- __r = _VSTD::copy(cbegin(), cend(), __v.begin());
+ __r = std::copy(cbegin(), cend(), __v.begin());
swap(__v);
}
- _VSTD::fill_n(__r, __n, __x);
+ std::fill_n(__r, __n, __x);
}
else
__size_ = __sz;
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::flip() _NOEXCEPT
{
// do middle whole words
@@ -3250,7 +3198,7 @@ vector<bool, _Allocator>::flip() _NOEXCEPT
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCPP_CONSTEXPR_SINCE_CXX20 bool
vector<bool, _Allocator>::__invariants() const
{
if (this->__begin_ == nullptr)
@@ -3269,7 +3217,7 @@ vector<bool, _Allocator>::__invariants() const
}
template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 size_t
+_LIBCPP_CONSTEXPR_SINCE_CXX20 size_t
vector<bool, _Allocator>::__hash_code() const _NOEXCEPT
{
size_t __h = 0;
@@ -3291,7 +3239,7 @@ template <class _Allocator>
struct _LIBCPP_TEMPLATE_VIS hash<vector<bool, _Allocator> >
: public __unary_function<vector<bool, _Allocator>, size_t>
{
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
size_t operator()(const vector<bool, _Allocator>& __vec) const _NOEXCEPT
{return __vec.__hash_code();}
};
@@ -3323,18 +3271,18 @@ struct _LIBCPP_TEMPLATE_VIS hash<vector<bool, _Allocator> >
#endif // _YNDX_LIBCXX_ENABLE_VECTOR_BOOL_COMPRESSION
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator==(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
{
const typename vector<_Tp, _Allocator>::size_type __sz = __x.size();
- return __sz == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin());
+ return __sz == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin());
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator!=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
{
@@ -3342,17 +3290,17 @@ operator!=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator< (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
{
- return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
+ return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator> (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
{
@@ -3360,8 +3308,8 @@ operator> (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator>=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
{
@@ -3369,8 +3317,8 @@ operator>=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
bool
operator<=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
{
@@ -3378,8 +3326,8 @@ operator<=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __
}
template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI
void
swap(vector<_Tp, _Allocator>& __x, vector<_Tp, _Allocator>& __y)
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
@@ -3389,20 +3337,20 @@ swap(vector<_Tp, _Allocator>& __x, vector<_Tp, _Allocator>& __y)
#if _LIBCPP_STD_VER > 17
template <class _Tp, class _Allocator, class _Up>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY typename vector<_Tp, _Allocator>::size_type
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::size_type
erase(vector<_Tp, _Allocator>& __c, const _Up& __v) {
auto __old_size = __c.size();
- __c.erase(_VSTD::remove(__c.begin(), __c.end(), __v), __c.end());
+ __c.erase(std::remove(__c.begin(), __c.end(), __v), __c.end());
return __old_size - __c.size();
}
template <class _Tp, class _Allocator, class _Predicate>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY typename vector<_Tp, _Allocator>::size_type
+_LIBCPP_CONSTEXPR_SINCE_CXX20
+inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::size_type
erase_if(vector<_Tp, _Allocator>& __c, _Predicate __pred) {
auto __old_size = __c.size();
- __c.erase(_VSTD::remove_if(__c.begin(), __c.end(), __pred), __c.end());
+ __c.erase(std::remove_if(__c.begin(), __c.end(), __pred), __c.end());
return __old_size - __c.size();
}
@@ -3417,6 +3365,23 @@ inline constexpr bool __format::__enable_insertable<std::vector<wchar_t>> = true
_LIBCPP_END_NAMESPACE_STD
+#if _LIBCPP_STD_VER > 14
+_LIBCPP_BEGIN_NAMESPACE_STD
+namespace pmr {
+template <class _ValueT>
+using vector = std::vector<_ValueT, polymorphic_allocator<_ValueT>>;
+} // namespace pmr
+_LIBCPP_END_NAMESPACE_STD
+#endif
+
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <algorithm>
+# include <atomic>
+# include <concepts>
+# include <typeinfo>
+# include <utility>
+#endif
+
#endif // _LIBCPP_VECTOR
diff --git a/contrib/libs/cxxsupp/libcxx/include/version b/contrib/libs/cxxsupp/libcxx/include/version
index f88378c2d6..f69d4ba252 100644
--- a/contrib/libs/cxxsupp/libcxx/include/version
+++ b/contrib/libs/cxxsupp/libcxx/include/version
@@ -56,12 +56,15 @@ __cpp_lib_clamp 201603L <algorithm>
__cpp_lib_complex_udls 201309L <complex>
__cpp_lib_concepts 202002L <concepts>
__cpp_lib_constexpr_algorithms 201806L <algorithm>
+__cpp_lib_constexpr_bitset 202207L <bitset>
+__cpp_lib_constexpr_charconv 202207L <charconv>
__cpp_lib_constexpr_cmath 202202L <cmath> <cstdlib>
__cpp_lib_constexpr_complex 201711L <complex>
__cpp_lib_constexpr_dynamic_alloc 201907L <memory>
__cpp_lib_constexpr_functional 201907L <functional>
__cpp_lib_constexpr_iterator 201811L <iterator>
-__cpp_lib_constexpr_memory 201811L <memory>
+__cpp_lib_constexpr_memory 202202L <memory>
+ 201811L // C++20
__cpp_lib_constexpr_numeric 201911L <numeric>
__cpp_lib_constexpr_string 201907L <string>
__cpp_lib_constexpr_string_view 201811L <string_view>
@@ -81,6 +84,7 @@ __cpp_lib_execution 201902L <execution>
201603L // C++17
__cpp_lib_filesystem 201703L <filesystem>
__cpp_lib_format 202106L <format>
+__cpp_lib_forward_like 202207L <utility>
__cpp_lib_gcd_lcm 201606L <numeric>
__cpp_lib_generic_associative_lookup 201304L <map> <set>
__cpp_lib_generic_unordered_lookup 201811L <unordered_map> <unordered_set>
@@ -266,7 +270,7 @@ __cpp_lib_void_t 201411L <type_traits>
# define __cpp_lib_make_from_tuple 201606L
# define __cpp_lib_map_try_emplace 201411L
// # define __cpp_lib_math_special_functions 201603L
-// # define __cpp_lib_memory_resource 201603L
+# define __cpp_lib_memory_resource 201603L
# define __cpp_lib_node_extract 201606L
# define __cpp_lib_nonmember_container_access 201411L
# define __cpp_lib_not_fn 201603L
@@ -330,7 +334,7 @@ __cpp_lib_void_t 201411L <type_traits>
# define __cpp_lib_constexpr_string_view 201811L
# define __cpp_lib_constexpr_tuple 201811L
# define __cpp_lib_constexpr_utility 201811L
-// # define __cpp_lib_constexpr_vector 201907L
+# define __cpp_lib_constexpr_vector 201907L
# define __cpp_lib_coroutine 201902L
# if _LIBCPP_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
# define __cpp_lib_destroying_delete 201806L
@@ -340,7 +344,7 @@ __cpp_lib_void_t 201411L <type_traits>
# undef __cpp_lib_execution
// # define __cpp_lib_execution 201902L
# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
-# define __cpp_lib_format 202106L
+// # define __cpp_lib_format 202106L
# endif
# define __cpp_lib_generic_unordered_lookup 201811L
# define __cpp_lib_int_pow2 202002L
@@ -359,9 +363,7 @@ __cpp_lib_void_t 201411L <type_traits>
# define __cpp_lib_list_remove_return_type 201806L
# define __cpp_lib_math_constants 201907L
// # define __cpp_lib_polymorphic_allocator 201902L
-# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
-# define __cpp_lib_ranges 201811L
-# endif
+# define __cpp_lib_ranges 201811L
# define __cpp_lib_remove_cvref 201711L
# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)
# define __cpp_lib_semaphore 201907L
@@ -390,8 +392,13 @@ __cpp_lib_void_t 201411L <type_traits>
// # define __cpp_lib_associative_heterogeneous_erasure 202110L
// # define __cpp_lib_bind_back 202202L
# define __cpp_lib_byteswap 202110L
+# define __cpp_lib_constexpr_bitset 202207L
+# define __cpp_lib_constexpr_charconv 202207L
// # define __cpp_lib_constexpr_cmath 202202L
+# undef __cpp_lib_constexpr_memory
+# define __cpp_lib_constexpr_memory 202202L
// # define __cpp_lib_constexpr_typeinfo 202106L
+# define __cpp_lib_forward_like 202207L
// # define __cpp_lib_invoke_r 202106L
# define __cpp_lib_is_scoped_enum 202011L
// # define __cpp_lib_move_only_function 202110L
diff --git a/contrib/libs/cxxsupp/libcxx/include/wchar.h b/contrib/libs/cxxsupp/libcxx/include/wchar.h
index 0fba53b268..c684508dc2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/wchar.h
+++ b/contrib/libs/cxxsupp/libcxx/include/wchar.h
@@ -120,7 +120,9 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
#define __CORRECT_ISO_CPP_WCHAR_H_PROTO
#endif
-#include_next <wchar.h>
+# if __has_include_next(<wchar.h>)
+# include_next <wchar.h>
+# endif
// Determine whether we have const-correct overloads for wcschr and friends.
#if defined(_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_)
diff --git a/contrib/libs/cxxsupp/libcxx/src/atomic.cpp b/contrib/libs/cxxsupp/libcxx/src/atomic.cpp
index 5968aafb53..ec7bb7d9b2 100644
--- a/contrib/libs/cxxsupp/libcxx/src/atomic.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/atomic.cpp
@@ -52,11 +52,11 @@ static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const vo
#elif defined(__APPLE__) && defined(_LIBCPP_USE_ULOCK)
extern "C" int __ulock_wait(uint32_t operation, void *addr, uint64_t value,
- uint32_t timeout); /* timeout is specified in microseconds */
+ uint32_t timeout); /* timeout is specified in microseconds */
extern "C" int __ulock_wake(uint32_t operation, void *addr, uint64_t wake_value);
-#define UL_COMPARE_AND_WAIT 1
-#define ULF_WAKE_ALL 0x00000100
+#define UL_COMPARE_AND_WAIT 1
+#define ULF_WAKE_ALL 0x00000100
static void __libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr,
__cxx_contention_t __val)
diff --git a/contrib/libs/cxxsupp/libcxx/src/charconv.cpp b/contrib/libs/cxxsupp/libcxx/src/charconv.cpp
index 4cccbab59d..d01ecddc46 100644
--- a/contrib/libs/cxxsupp/libcxx/src/charconv.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/charconv.cpp
@@ -21,13 +21,13 @@ namespace __itoa
_LIBCPP_FUNC_VIS char*
__u32toa(uint32_t value, char* buffer) noexcept
{
- return __base_10_u32(buffer, value);
+ return __base_10_u32(buffer, value);
}
_LIBCPP_FUNC_VIS char*
__u64toa(uint64_t value, char* buffer) noexcept
{
- return __base_10_u64(buffer, value);
+ return __base_10_u64(buffer, value);
}
} // namespace __itoa
diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h b/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h
index 0bd2bbe6f7..0e71569d87 100644
--- a/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h
+++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h
@@ -124,7 +124,7 @@ error_code make_windows_error(int err) {
template <class T>
T error_value();
template <>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 void error_value<void>() {}
+_LIBCPP_CONSTEXPR_SINCE_CXX14 void error_value<void>() {}
template <>
bool error_value<bool>() {
return false;
@@ -140,7 +140,7 @@ uintmax_t error_value<uintmax_t>() {
return uintmax_t(-1);
}
template <>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 file_time_type error_value<file_time_type>() {
+_LIBCPP_CONSTEXPR_SINCE_CXX14 file_time_type error_value<file_time_type>() {
return file_time_type::min();
}
template <>
@@ -309,7 +309,7 @@ struct time_util_base {
.count();
private:
- static _LIBCPP_CONSTEXPR_AFTER_CXX11 fs_duration get_min_nsecs() {
+ static _LIBCPP_CONSTEXPR_SINCE_CXX14 fs_duration get_min_nsecs() {
return duration_cast<fs_duration>(
fs_nanoseconds(min_nsec_timespec) -
duration_cast<fs_nanoseconds>(fs_seconds(1)));
@@ -319,7 +319,7 @@ private:
FileTimeT::duration::min(),
"value doesn't roundtrip");
- static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool check_range() {
+ static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool check_range() {
// This kinda sucks, but it's what happens when we don't have __int128_t.
if (sizeof(TimeT) == sizeof(rep)) {
typedef duration<long long, ratio<3600 * 24 * 365> > Years;
@@ -385,7 +385,7 @@ struct time_util : time_util_base<FileTimeT, TimeT> {
public:
template <class CType, class ChronoType>
- static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool checked_set(CType* out,
+ static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool checked_set(CType* out,
ChronoType time) {
using Lim = numeric_limits<CType>;
if (time > Lim::max() || time < Lim::min())
@@ -394,7 +394,7 @@ public:
return true;
}
- static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool is_representable(TimeSpecT tm) {
+ static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool is_representable(TimeSpecT tm) {
if (tm.tv_sec >= 0) {
return tm.tv_sec < max_seconds ||
(tm.tv_sec == max_seconds && tm.tv_nsec <= max_nsec);
@@ -405,7 +405,7 @@ public:
}
}
- static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool is_representable(FileTimeT tm) {
+ static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool is_representable(FileTimeT tm) {
auto secs = duration_cast<fs_seconds>(tm.time_since_epoch());
auto nsecs = duration_cast<fs_nanoseconds>(tm.time_since_epoch() - secs);
if (nsecs.count() < 0) {
@@ -418,7 +418,7 @@ public:
return secs.count() >= TLim::min();
}
- static _LIBCPP_CONSTEXPR_AFTER_CXX11 FileTimeT
+ static _LIBCPP_CONSTEXPR_SINCE_CXX14 FileTimeT
convert_from_timespec(TimeSpecT tm) {
if (tm.tv_sec >= 0 || tm.tv_nsec == 0) {
return FileTimeT(fs_seconds(tm.tv_sec) +
@@ -432,7 +432,7 @@ public:
}
template <class SubSecT>
- static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool
+ static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
set_times_checked(TimeT* sec_out, SubSecT* subsec_out, FileTimeT tp) {
auto dur = tp.time_since_epoch();
auto sec_dur = duration_cast<fs_seconds>(dur);
@@ -449,7 +449,7 @@ public:
return checked_set(sec_out, sec_dur.count()) &&
checked_set(subsec_out, subsec_dur.count());
}
- static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool convert_to_timespec(TimeSpecT& dest,
+ static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool convert_to_timespec(TimeSpecT& dest,
FileTimeT tp) {
if (!is_representable(tp))
return false;
diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp b/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp
index 3c02723046..f9b74120e0 100644
--- a/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp
@@ -1352,7 +1352,7 @@ bool __remove(const path& p, error_code* ec) {
//
// The second implementation is used on platforms where `openat()` & friends are available,
// and it threads file descriptors through recursive calls to avoid such race conditions.
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCPP_WIN32API) || defined (__MVS__)
# define REMOVE_ALL_USE_DIRECTORY_ITERATOR
#endif
@@ -1412,6 +1412,7 @@ struct scope_exit {
private:
Cleanup cleanup_;
};
+_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(scope_exit);
uintmax_t remove_all_impl(int parent_directory, const path& p, error_code& ec) {
// First, try to open the path as a directory.
diff --git a/contrib/libs/cxxsupp/libcxx/src/format.cpp b/contrib/libs/cxxsupp/libcxx/src/format.cpp
index cdbcbf8b05..401cccf172 100644
--- a/contrib/libs/cxxsupp/libcxx/src/format.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/format.cpp
@@ -10,6 +10,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
+#ifndef _LIBCPP_INLINE_FORMAT_ERROR_DTOR
format_error::~format_error() noexcept = default;
+#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/src/include/apple_availability.h b/contrib/libs/cxxsupp/libcxx/src/include/apple_availability.h
index 504700ebd0..75bf79658d 100644
--- a/contrib/libs/cxxsupp/libcxx/src/include/apple_availability.h
+++ b/contrib/libs/cxxsupp/libcxx/src/include/apple_availability.h
@@ -5,6 +5,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
#ifndef _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
#define _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
diff --git a/contrib/libs/cxxsupp/libcxx/src/include/ryu/digit_table.h b/contrib/libs/cxxsupp/libcxx/src/include/ryu/digit_table.h
index c57a0966ef..bf660b0be7 100644
--- a/contrib/libs/cxxsupp/libcxx/src/include/ryu/digit_table.h
+++ b/contrib/libs/cxxsupp/libcxx/src/include/ryu/digit_table.h
@@ -50,7 +50,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// In order to minimize the diff in the Ryu code between MSVC STL and libc++
// the code uses the name __DIGIT_TABLE. In order to avoid code duplication it
// reuses the table already available in libc++.
-inline constexpr auto& __DIGIT_TABLE = __itoa::__table<>::__digits_base_10;
+inline constexpr auto& __DIGIT_TABLE = __itoa::__digits_base_10;
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/src/ios.instantiations.cpp b/contrib/libs/cxxsupp/libcxx/src/ios.instantiations.cpp
index 2ff7057fa6..ca77ce11fd 100644
--- a/contrib/libs/cxxsupp/libcxx/src/ios.instantiations.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/ios.instantiations.cpp
@@ -36,9 +36,12 @@ template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_stringbuf<char>;
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_stringstream<char>;
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostringstream<char>;
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istringstream<char>;
+
+#ifndef _LIBCPP_HAS_NO_FSTREAM
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ifstream<char>;
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ofstream<char>;
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_filebuf<char>;
+#endif
// Add more here if needed...
diff --git a/contrib/libs/cxxsupp/libcxx/src/locale.cpp b/contrib/libs/cxxsupp/libcxx/src/locale.cpp
index 38319e32f5..c756c6fadf 100644
--- a/contrib/libs/cxxsupp/libcxx/src/locale.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/locale.cpp
@@ -735,25 +735,25 @@ locale::id::__get()
collate_byname<char>::collate_byname(const char* n, size_t refs)
: collate<char>(refs),
- __l(newlocale(LC_ALL_MASK, n, 0))
+ __l_(newlocale(LC_ALL_MASK, n, 0))
{
- if (__l == 0)
+ if (__l_ == 0)
__throw_runtime_error("collate_byname<char>::collate_byname"
" failed to construct for " + string(n));
}
collate_byname<char>::collate_byname(const string& name, size_t refs)
: collate<char>(refs),
- __l(newlocale(LC_ALL_MASK, name.c_str(), 0))
+ __l_(newlocale(LC_ALL_MASK, name.c_str(), 0))
{
- if (__l == 0)
+ if (__l_ == 0)
__throw_runtime_error("collate_byname<char>::collate_byname"
" failed to construct for " + name);
}
collate_byname<char>::~collate_byname()
{
- freelocale(__l);
+ freelocale(__l_);
}
int
@@ -762,7 +762,7 @@ collate_byname<char>::do_compare(const char_type* __lo1, const char_type* __hi1,
{
string_type lhs(__lo1, __hi1);
string_type rhs(__lo2, __hi2);
- int r = strcoll_l(lhs.c_str(), rhs.c_str(), __l);
+ int r = strcoll_l(lhs.c_str(), rhs.c_str(), __l_);
if (r < 0)
return -1;
if (r > 0)
@@ -774,8 +774,8 @@ collate_byname<char>::string_type
collate_byname<char>::do_transform(const char_type* lo, const char_type* hi) const
{
const string_type in(lo, hi);
- string_type out(strxfrm_l(0, in.c_str(), 0, __l), char());
- strxfrm_l(const_cast<char*>(out.c_str()), in.c_str(), out.size()+1, __l);
+ string_type out(strxfrm_l(0, in.c_str(), 0, __l_), char());
+ strxfrm_l(const_cast<char*>(out.c_str()), in.c_str(), out.size()+1, __l_);
return out;
}
@@ -784,25 +784,25 @@ collate_byname<char>::do_transform(const char_type* lo, const char_type* hi) con
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
collate_byname<wchar_t>::collate_byname(const char* n, size_t refs)
: collate<wchar_t>(refs),
- __l(newlocale(LC_ALL_MASK, n, 0))
+ __l_(newlocale(LC_ALL_MASK, n, 0))
{
- if (__l == 0)
+ if (__l_ == 0)
__throw_runtime_error("collate_byname<wchar_t>::collate_byname(size_t refs)"
" failed to construct for " + string(n));
}
collate_byname<wchar_t>::collate_byname(const string& name, size_t refs)
: collate<wchar_t>(refs),
- __l(newlocale(LC_ALL_MASK, name.c_str(), 0))
+ __l_(newlocale(LC_ALL_MASK, name.c_str(), 0))
{
- if (__l == 0)
+ if (__l_ == 0)
__throw_runtime_error("collate_byname<wchar_t>::collate_byname(size_t refs)"
" failed to construct for " + name);
}
collate_byname<wchar_t>::~collate_byname()
{
- freelocale(__l);
+ freelocale(__l_);
}
int
@@ -811,7 +811,7 @@ collate_byname<wchar_t>::do_compare(const char_type* __lo1, const char_type* __h
{
string_type lhs(__lo1, __hi1);
string_type rhs(__lo2, __hi2);
- int r = wcscoll_l(lhs.c_str(), rhs.c_str(), __l);
+ int r = wcscoll_l(lhs.c_str(), rhs.c_str(), __l_);
if (r < 0)
return -1;
if (r > 0)
@@ -823,8 +823,8 @@ collate_byname<wchar_t>::string_type
collate_byname<wchar_t>::do_transform(const char_type* lo, const char_type* hi) const
{
const string_type in(lo, hi);
- string_type out(wcsxfrm_l(0, in.c_str(), 0, __l), wchar_t());
- wcsxfrm_l(const_cast<wchar_t*>(out.c_str()), in.c_str(), out.size()+1, __l);
+ string_type out(wcsxfrm_l(0, in.c_str(), 0, __l_), wchar_t());
+ wcsxfrm_l(const_cast<wchar_t*>(out.c_str()), in.c_str(), out.size()+1, __l_);
return out;
}
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
@@ -1289,52 +1289,52 @@ ctype<char>::__classic_upper_table() _NOEXCEPT
ctype_byname<char>::ctype_byname(const char* name, size_t refs)
: ctype<char>(0, false, refs),
- __l(newlocale(LC_ALL_MASK, name, 0))
+ __l_(newlocale(LC_ALL_MASK, name, 0))
{
- if (__l == 0)
+ if (__l_ == 0)
__throw_runtime_error("ctype_byname<char>::ctype_byname"
" failed to construct for " + string(name));
}
ctype_byname<char>::ctype_byname(const string& name, size_t refs)
: ctype<char>(0, false, refs),
- __l(newlocale(LC_ALL_MASK, name.c_str(), 0))
+ __l_(newlocale(LC_ALL_MASK, name.c_str(), 0))
{
- if (__l == 0)
+ if (__l_ == 0)
__throw_runtime_error("ctype_byname<char>::ctype_byname"
" failed to construct for " + name);
}
ctype_byname<char>::~ctype_byname()
{
- freelocale(__l);
+ freelocale(__l_);
}
char
ctype_byname<char>::do_toupper(char_type c) const
{
- return static_cast<char>(toupper_l(static_cast<unsigned char>(c), __l));
+ return static_cast<char>(toupper_l(static_cast<unsigned char>(c), __l_));
}
const char*
ctype_byname<char>::do_toupper(char_type* low, const char_type* high) const
{
for (; low != high; ++low)
- *low = static_cast<char>(toupper_l(static_cast<unsigned char>(*low), __l));
+ *low = static_cast<char>(toupper_l(static_cast<unsigned char>(*low), __l_));
return low;
}
char
ctype_byname<char>::do_tolower(char_type c) const
{
- return static_cast<char>(tolower_l(static_cast<unsigned char>(c), __l));
+ return static_cast<char>(tolower_l(static_cast<unsigned char>(c), __l_));
}
const char*
ctype_byname<char>::do_tolower(char_type* low, const char_type* high) const
{
for (; low != high; ++low)
- *low = static_cast<char>(tolower_l(static_cast<unsigned char>(*low), __l));
+ *low = static_cast<char>(tolower_l(static_cast<unsigned char>(*low), __l_));
return low;
}
@@ -1343,45 +1343,45 @@ ctype_byname<char>::do_tolower(char_type* low, const char_type* high) const
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
ctype_byname<wchar_t>::ctype_byname(const char* name, size_t refs)
: ctype<wchar_t>(refs),
- __l(newlocale(LC_ALL_MASK, name, 0))
+ __l_(newlocale(LC_ALL_MASK, name, 0))
{
- if (__l == 0)
+ if (__l_ == 0)
__throw_runtime_error("ctype_byname<wchar_t>::ctype_byname"
" failed to construct for " + string(name));
}
ctype_byname<wchar_t>::ctype_byname(const string& name, size_t refs)
: ctype<wchar_t>(refs),
- __l(newlocale(LC_ALL_MASK, name.c_str(), 0))
+ __l_(newlocale(LC_ALL_MASK, name.c_str(), 0))
{
- if (__l == 0)
+ if (__l_ == 0)
__throw_runtime_error("ctype_byname<wchar_t>::ctype_byname"
" failed to construct for " + name);
}
ctype_byname<wchar_t>::~ctype_byname()
{
- freelocale(__l);
+ freelocale(__l_);
}
bool
ctype_byname<wchar_t>::do_is(mask m, char_type c) const
{
#ifdef _LIBCPP_WCTYPE_IS_MASK
- return static_cast<bool>(iswctype_l(c, m, __l));
+ return static_cast<bool>(iswctype_l(c, m, __l_));
#else
bool result = false;
wint_t ch = static_cast<wint_t>(c);
- if ((m & space) == space) result |= (iswspace_l(ch, __l) != 0);
- if ((m & print) == print) result |= (iswprint_l(ch, __l) != 0);
- if ((m & cntrl) == cntrl) result |= (iswcntrl_l(ch, __l) != 0);
- if ((m & upper) == upper) result |= (iswupper_l(ch, __l) != 0);
- if ((m & lower) == lower) result |= (iswlower_l(ch, __l) != 0);
- if ((m & alpha) == alpha) result |= (iswalpha_l(ch, __l) != 0);
- if ((m & digit) == digit) result |= (iswdigit_l(ch, __l) != 0);
- if ((m & punct) == punct) result |= (iswpunct_l(ch, __l) != 0);
- if ((m & xdigit) == xdigit) result |= (iswxdigit_l(ch, __l) != 0);
- if ((m & blank) == blank) result |= (iswblank_l(ch, __l) != 0);
+ if ((m & space) == space) result |= (iswspace_l(ch, __l_) != 0);
+ if ((m & print) == print) result |= (iswprint_l(ch, __l_) != 0);
+ if ((m & cntrl) == cntrl) result |= (iswcntrl_l(ch, __l_) != 0);
+ if ((m & upper) == upper) result |= (iswupper_l(ch, __l_) != 0);
+ if ((m & lower) == lower) result |= (iswlower_l(ch, __l_) != 0);
+ if ((m & alpha) == alpha) result |= (iswalpha_l(ch, __l_) != 0);
+ if ((m & digit) == digit) result |= (iswdigit_l(ch, __l_) != 0);
+ if ((m & punct) == punct) result |= (iswpunct_l(ch, __l_) != 0);
+ if ((m & xdigit) == xdigit) result |= (iswxdigit_l(ch, __l_) != 0);
+ if ((m & blank) == blank) result |= (iswblank_l(ch, __l_) != 0);
return result;
#endif
}
@@ -1397,32 +1397,32 @@ ctype_byname<wchar_t>::do_is(const char_type* low, const char_type* high, mask*
{
*vec = 0;
wint_t ch = static_cast<wint_t>(*low);
- if (iswspace_l(ch, __l))
+ if (iswspace_l(ch, __l_))
*vec |= space;
#ifndef _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT
- if (iswprint_l(ch, __l))
+ if (iswprint_l(ch, __l_))
*vec |= print;
#endif
- if (iswcntrl_l(ch, __l))
+ if (iswcntrl_l(ch, __l_))
*vec |= cntrl;
- if (iswupper_l(ch, __l))
+ if (iswupper_l(ch, __l_))
*vec |= upper;
- if (iswlower_l(ch, __l))
+ if (iswlower_l(ch, __l_))
*vec |= lower;
#ifndef _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA
- if (iswalpha_l(ch, __l))
+ if (iswalpha_l(ch, __l_))
*vec |= alpha;
#endif
- if (iswdigit_l(ch, __l))
+ if (iswdigit_l(ch, __l_))
*vec |= digit;
- if (iswpunct_l(ch, __l))
+ if (iswpunct_l(ch, __l_))
*vec |= punct;
#ifndef _LIBCPP_CTYPE_MASK_IS_COMPOSITE_XDIGIT
- if (iswxdigit_l(ch, __l))
+ if (iswxdigit_l(ch, __l_))
*vec |= xdigit;
#endif
#if !defined(__sun__)
- if (iswblank_l(ch, __l))
+ if (iswblank_l(ch, __l_))
*vec |= blank;
#endif
}
@@ -1436,20 +1436,20 @@ ctype_byname<wchar_t>::do_scan_is(mask m, const char_type* low, const char_type*
for (; low != high; ++low)
{
#ifdef _LIBCPP_WCTYPE_IS_MASK
- if (iswctype_l(*low, m, __l))
+ if (iswctype_l(*low, m, __l_))
break;
#else
wint_t ch = static_cast<wint_t>(*low);
- if ((m & space) == space && iswspace_l(ch, __l)) break;
- if ((m & print) == print && iswprint_l(ch, __l)) break;
- if ((m & cntrl) == cntrl && iswcntrl_l(ch, __l)) break;
- if ((m & upper) == upper && iswupper_l(ch, __l)) break;
- if ((m & lower) == lower && iswlower_l(ch, __l)) break;
- if ((m & alpha) == alpha && iswalpha_l(ch, __l)) break;
- if ((m & digit) == digit && iswdigit_l(ch, __l)) break;
- if ((m & punct) == punct && iswpunct_l(ch, __l)) break;
- if ((m & xdigit) == xdigit && iswxdigit_l(ch, __l)) break;
- if ((m & blank) == blank && iswblank_l(ch, __l)) break;
+ if ((m & space) == space && iswspace_l(ch, __l_)) break;
+ if ((m & print) == print && iswprint_l(ch, __l_)) break;
+ if ((m & cntrl) == cntrl && iswcntrl_l(ch, __l_)) break;
+ if ((m & upper) == upper && iswupper_l(ch, __l_)) break;
+ if ((m & lower) == lower && iswlower_l(ch, __l_)) break;
+ if ((m & alpha) == alpha && iswalpha_l(ch, __l_)) break;
+ if ((m & digit) == digit && iswdigit_l(ch, __l_)) break;
+ if ((m & punct) == punct && iswpunct_l(ch, __l_)) break;
+ if ((m & xdigit) == xdigit && iswxdigit_l(ch, __l_)) break;
+ if ((m & blank) == blank && iswblank_l(ch, __l_)) break;
#endif
}
return low;
@@ -1461,20 +1461,20 @@ ctype_byname<wchar_t>::do_scan_not(mask m, const char_type* low, const char_type
for (; low != high; ++low)
{
#ifdef _LIBCPP_WCTYPE_IS_MASK
- if (!iswctype_l(*low, m, __l))
+ if (!iswctype_l(*low, m, __l_))
break;
#else
wint_t ch = static_cast<wint_t>(*low);
- if ((m & space) == space && iswspace_l(ch, __l)) continue;
- if ((m & print) == print && iswprint_l(ch, __l)) continue;
- if ((m & cntrl) == cntrl && iswcntrl_l(ch, __l)) continue;
- if ((m & upper) == upper && iswupper_l(ch, __l)) continue;
- if ((m & lower) == lower && iswlower_l(ch, __l)) continue;
- if ((m & alpha) == alpha && iswalpha_l(ch, __l)) continue;
- if ((m & digit) == digit && iswdigit_l(ch, __l)) continue;
- if ((m & punct) == punct && iswpunct_l(ch, __l)) continue;
- if ((m & xdigit) == xdigit && iswxdigit_l(ch, __l)) continue;
- if ((m & blank) == blank && iswblank_l(ch, __l)) continue;
+ if ((m & space) == space && iswspace_l(ch, __l_)) continue;
+ if ((m & print) == print && iswprint_l(ch, __l_)) continue;
+ if ((m & cntrl) == cntrl && iswcntrl_l(ch, __l_)) continue;
+ if ((m & upper) == upper && iswupper_l(ch, __l_)) continue;
+ if ((m & lower) == lower && iswlower_l(ch, __l_)) continue;
+ if ((m & alpha) == alpha && iswalpha_l(ch, __l_)) continue;
+ if ((m & digit) == digit && iswdigit_l(ch, __l_)) continue;
+ if ((m & punct) == punct && iswpunct_l(ch, __l_)) continue;
+ if ((m & xdigit) == xdigit && iswxdigit_l(ch, __l_)) continue;
+ if ((m & blank) == blank && iswblank_l(ch, __l_)) continue;
break;
#endif
}
@@ -1484,49 +1484,49 @@ ctype_byname<wchar_t>::do_scan_not(mask m, const char_type* low, const char_type
wchar_t
ctype_byname<wchar_t>::do_toupper(char_type c) const
{
- return towupper_l(c, __l);
+ return towupper_l(c, __l_);
}
const wchar_t*
ctype_byname<wchar_t>::do_toupper(char_type* low, const char_type* high) const
{
for (; low != high; ++low)
- *low = towupper_l(*low, __l);
+ *low = towupper_l(*low, __l_);
return low;
}
wchar_t
ctype_byname<wchar_t>::do_tolower(char_type c) const
{
- return towlower_l(c, __l);
+ return towlower_l(c, __l_);
}
const wchar_t*
ctype_byname<wchar_t>::do_tolower(char_type* low, const char_type* high) const
{
for (; low != high; ++low)
- *low = towlower_l(*low, __l);
+ *low = towlower_l(*low, __l_);
return low;
}
wchar_t
ctype_byname<wchar_t>::do_widen(char c) const
{
- return __libcpp_btowc_l(c, __l);
+ return __libcpp_btowc_l(c, __l_);
}
const char*
ctype_byname<wchar_t>::do_widen(const char* low, const char* high, char_type* dest) const
{
for (; low != high; ++low, ++dest)
- *dest = __libcpp_btowc_l(*low, __l);
+ *dest = __libcpp_btowc_l(*low, __l_);
return low;
}
char
ctype_byname<wchar_t>::do_narrow(char_type c, char dfault) const
{
- int r = __libcpp_wctob_l(c, __l);
+ int r = __libcpp_wctob_l(c, __l_);
return (r != EOF) ? static_cast<char>(r) : dfault;
}
@@ -1535,7 +1535,7 @@ ctype_byname<wchar_t>::do_narrow(const char_type* low, const char_type* high, ch
{
for (; low != high; ++low, ++dest)
{
- int r = __libcpp_wctob_l(*low, __l);
+ int r = __libcpp_wctob_l(*low, __l_);
*dest = (r != EOF) ? static_cast<char>(r) : dfault;
}
return low;
@@ -1610,23 +1610,23 @@ locale::id codecvt<wchar_t, char, mbstate_t>::id;
codecvt<wchar_t, char, mbstate_t>::codecvt(size_t refs)
: locale::facet(refs),
- __l(_LIBCPP_GET_C_LOCALE)
+ __l_(_LIBCPP_GET_C_LOCALE)
{
}
codecvt<wchar_t, char, mbstate_t>::codecvt(const char* nm, size_t refs)
: locale::facet(refs),
- __l(newlocale(LC_ALL_MASK, nm, 0))
+ __l_(newlocale(LC_ALL_MASK, nm, 0))
{
- if (__l == 0)
+ if (__l_ == 0)
__throw_runtime_error("codecvt_byname<wchar_t, char, mbstate_t>::codecvt_byname"
" failed to construct for " + string(nm));
}
codecvt<wchar_t, char, mbstate_t>::~codecvt()
{
- if (__l != _LIBCPP_GET_C_LOCALE)
- freelocale(__l);
+ if (__l_ != _LIBCPP_GET_C_LOCALE)
+ freelocale(__l_);
}
codecvt<wchar_t, char, mbstate_t>::result
@@ -1646,13 +1646,13 @@ codecvt<wchar_t, char, mbstate_t>::do_out(state_type& st,
// save state in case it is needed to recover to_nxt on error
mbstate_t save_state = st;
size_t n = __libcpp_wcsnrtombs_l(to, &frm_nxt, static_cast<size_t>(fend-frm),
- static_cast<size_t>(to_end-to), &st, __l);
+ static_cast<size_t>(to_end-to), &st, __l_);
if (n == size_t(-1))
{
// need to recover to_nxt
for (to_nxt = to; frm != frm_nxt; ++frm)
{
- n = __libcpp_wcrtomb_l(to_nxt, *frm, &save_state, __l);
+ n = __libcpp_wcrtomb_l(to_nxt, *frm, &save_state, __l_);
if (n == size_t(-1))
break;
to_nxt += n;
@@ -1669,7 +1669,7 @@ codecvt<wchar_t, char, mbstate_t>::do_out(state_type& st,
{
// Try to write the terminating null
extern_type tmp[MB_LEN_MAX];
- n = __libcpp_wcrtomb_l(tmp, intern_type(), &st, __l);
+ n = __libcpp_wcrtomb_l(tmp, intern_type(), &st, __l_);
if (n == size_t(-1)) // on error
return error;
if (n > static_cast<size_t>(to_end-to_nxt)) // is there room?
@@ -1703,14 +1703,14 @@ codecvt<wchar_t, char, mbstate_t>::do_in(state_type& st,
// save state in case it is needed to recover to_nxt on error
mbstate_t save_state = st;
size_t n = __libcpp_mbsnrtowcs_l(to, &frm_nxt, static_cast<size_t>(fend-frm),
- static_cast<size_t>(to_end-to), &st, __l);
+ static_cast<size_t>(to_end-to), &st, __l_);
if (n == size_t(-1))
{
// need to recover to_nxt
for (to_nxt = to; frm != frm_nxt; ++to_nxt)
{
n = __libcpp_mbrtowc_l(to_nxt, frm, static_cast<size_t>(fend-frm),
- &save_state, __l);
+ &save_state, __l_);
switch (n)
{
case 0:
@@ -1738,7 +1738,7 @@ codecvt<wchar_t, char, mbstate_t>::do_in(state_type& st,
if (fend != frm_end) // set up next null terminated sequence
{
// Try to write the terminating null
- n = __libcpp_mbrtowc_l(to_nxt, frm_nxt, 1, &st, __l);
+ n = __libcpp_mbrtowc_l(to_nxt, frm_nxt, 1, &st, __l_);
if (n != 0) // on error
return error;
++to_nxt;
@@ -1758,7 +1758,7 @@ codecvt<wchar_t, char, mbstate_t>::do_unshift(state_type& st,
{
to_nxt = to;
extern_type tmp[MB_LEN_MAX];
- size_t n = __libcpp_wcrtomb_l(tmp, intern_type(), &st, __l);
+ size_t n = __libcpp_wcrtomb_l(tmp, intern_type(), &st, __l_);
if (n == size_t(-1) || n == 0) // on error
return error;
--n;
@@ -1772,11 +1772,11 @@ codecvt<wchar_t, char, mbstate_t>::do_unshift(state_type& st,
int
codecvt<wchar_t, char, mbstate_t>::do_encoding() const noexcept
{
- if (__libcpp_mbtowc_l(nullptr, nullptr, MB_LEN_MAX, __l) != 0)
+ if (__libcpp_mbtowc_l(nullptr, nullptr, MB_LEN_MAX, __l_) != 0)
return -1;
// stateless encoding
- if (__l == 0 || __libcpp_mb_cur_max_l(__l) == 1) // there are no known constant length encodings
+ if (__l_ == 0 || __libcpp_mb_cur_max_l(__l_) == 1) // there are no known constant length encodings
return 1; // which take more than 1 char to form a wchar_t
return 0;
}
@@ -1794,7 +1794,7 @@ codecvt<wchar_t, char, mbstate_t>::do_length(state_type& st,
int nbytes = 0;
for (size_t nwchar_t = 0; nwchar_t < mx && frm != frm_end; ++nwchar_t)
{
- size_t n = __libcpp_mbrlen_l(frm, static_cast<size_t>(frm_end-frm), &st, __l);
+ size_t n = __libcpp_mbrlen_l(frm, static_cast<size_t>(frm_end-frm), &st, __l_);
switch (n)
{
case 0:
@@ -1816,7 +1816,7 @@ codecvt<wchar_t, char, mbstate_t>::do_length(state_type& st,
int
codecvt<wchar_t, char, mbstate_t>::do_max_length() const noexcept
{
- return __l == 0 ? 1 : static_cast<int>(__libcpp_mb_cur_max_l(__l));
+ return __l_ == 0 ? 1 : static_cast<int>(__libcpp_mb_cur_max_l(__l_));
}
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
@@ -3548,10 +3548,10 @@ __codecvt_utf8<wchar_t>::do_out(state_type&,
uint8_t* _to_nxt = _to;
#if defined(_LIBCPP_SHORT_WCHAR)
result r = ucs2_to_utf8(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
#else
result r = ucs4_to_utf8(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
#endif
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
@@ -3571,13 +3571,13 @@ __codecvt_utf8<wchar_t>::do_in(state_type&,
uint16_t* _to_end = reinterpret_cast<uint16_t*>(to_end);
uint16_t* _to_nxt = _to;
result r = utf8_to_ucs2(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
#else
uint32_t* _to = reinterpret_cast<uint32_t*>(to);
uint32_t* _to_end = reinterpret_cast<uint32_t*>(to_end);
uint32_t* _to_nxt = _to;
result r = utf8_to_ucs4(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
#endif
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
@@ -3611,9 +3611,9 @@ __codecvt_utf8<wchar_t>::do_length(state_type&,
const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
#if defined(_LIBCPP_SHORT_WCHAR)
- return utf8_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf8_to_ucs2_length(_frm, _frm_end, mx, __maxcode_, __mode_);
#else
- return utf8_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf8_to_ucs4_length(_frm, _frm_end, mx, __maxcode_, __mode_);
#endif
}
@@ -3622,11 +3622,11 @@ int
__codecvt_utf8<wchar_t>::do_max_length() const noexcept
{
#if defined(_LIBCPP_SHORT_WCHAR)
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 6;
return 3;
#else
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 7;
return 4;
#endif
@@ -3647,7 +3647,7 @@ __codecvt_utf8<char16_t>::do_out(state_type&,
uint8_t* _to_end = reinterpret_cast<uint8_t*>(to_end);
uint8_t* _to_nxt = _to;
result r = ucs2_to_utf8(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -3665,7 +3665,7 @@ __codecvt_utf8<char16_t>::do_in(state_type&,
uint16_t* _to_end = reinterpret_cast<uint16_t*>(to_end);
uint16_t* _to_nxt = _to;
result r = utf8_to_ucs2(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -3697,14 +3697,14 @@ __codecvt_utf8<char16_t>::do_length(state_type&,
{
const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
- return utf8_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf8_to_ucs2_length(_frm, _frm_end, mx, __maxcode_, __mode_);
}
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
int
__codecvt_utf8<char16_t>::do_max_length() const noexcept
{
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 6;
return 3;
}
@@ -3724,7 +3724,7 @@ __codecvt_utf8<char32_t>::do_out(state_type&,
uint8_t* _to_end = reinterpret_cast<uint8_t*>(to_end);
uint8_t* _to_nxt = _to;
result r = ucs4_to_utf8(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -3742,7 +3742,7 @@ __codecvt_utf8<char32_t>::do_in(state_type&,
uint32_t* _to_end = reinterpret_cast<uint32_t*>(to_end);
uint32_t* _to_nxt = _to;
result r = utf8_to_ucs4(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -3774,14 +3774,14 @@ __codecvt_utf8<char32_t>::do_length(state_type&,
{
const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
- return utf8_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf8_to_ucs4_length(_frm, _frm_end, mx, __maxcode_, __mode_);
}
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
int
__codecvt_utf8<char32_t>::do_max_length() const noexcept
{
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 7;
return 4;
}
@@ -3809,10 +3809,10 @@ __codecvt_utf16<wchar_t, false>::do_out(state_type&,
uint8_t* _to_nxt = _to;
#if defined(_LIBCPP_SHORT_WCHAR)
result r = ucs2_to_utf16be(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
#else
result r = ucs4_to_utf16be(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
#endif
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
@@ -3832,13 +3832,13 @@ __codecvt_utf16<wchar_t, false>::do_in(state_type&,
uint16_t* _to_end = reinterpret_cast<uint16_t*>(to_end);
uint16_t* _to_nxt = _to;
result r = utf16be_to_ucs2(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
#else
uint32_t* _to = reinterpret_cast<uint32_t*>(to);
uint32_t* _to_end = reinterpret_cast<uint32_t*>(to_end);
uint32_t* _to_nxt = _to;
result r = utf16be_to_ucs4(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
#endif
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
@@ -3872,9 +3872,9 @@ __codecvt_utf16<wchar_t, false>::do_length(state_type&,
const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
#if defined(_LIBCPP_SHORT_WCHAR)
- return utf16be_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf16be_to_ucs2_length(_frm, _frm_end, mx, __maxcode_, __mode_);
#else
- return utf16be_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf16be_to_ucs4_length(_frm, _frm_end, mx, __maxcode_, __mode_);
#endif
}
@@ -3882,11 +3882,11 @@ int
__codecvt_utf16<wchar_t, false>::do_max_length() const noexcept
{
#if defined(_LIBCPP_SHORT_WCHAR)
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 4;
return 2;
#else
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 6;
return 4;
#endif
@@ -3913,10 +3913,10 @@ __codecvt_utf16<wchar_t, true>::do_out(state_type&,
uint8_t* _to_nxt = _to;
#if defined(_LIBCPP_SHORT_WCHAR)
result r = ucs2_to_utf16le(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
#else
result r = ucs4_to_utf16le(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
#endif
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
@@ -3936,13 +3936,13 @@ __codecvt_utf16<wchar_t, true>::do_in(state_type&,
uint16_t* _to_end = reinterpret_cast<uint16_t*>(to_end);
uint16_t* _to_nxt = _to;
result r = utf16le_to_ucs2(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
#else
uint32_t* _to = reinterpret_cast<uint32_t*>(to);
uint32_t* _to_end = reinterpret_cast<uint32_t*>(to_end);
uint32_t* _to_nxt = _to;
result r = utf16le_to_ucs4(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
#endif
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
@@ -3976,9 +3976,9 @@ __codecvt_utf16<wchar_t, true>::do_length(state_type&,
const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
#if defined(_LIBCPP_SHORT_WCHAR)
- return utf16le_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf16le_to_ucs2_length(_frm, _frm_end, mx, __maxcode_, __mode_);
#else
- return utf16le_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf16le_to_ucs4_length(_frm, _frm_end, mx, __maxcode_, __mode_);
#endif
}
@@ -3986,11 +3986,11 @@ int
__codecvt_utf16<wchar_t, true>::do_max_length() const noexcept
{
#if defined(_LIBCPP_SHORT_WCHAR)
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 4;
return 2;
#else
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 6;
return 4;
#endif
@@ -4011,7 +4011,7 @@ __codecvt_utf16<char16_t, false>::do_out(state_type&,
uint8_t* _to_end = reinterpret_cast<uint8_t*>(to_end);
uint8_t* _to_nxt = _to;
result r = ucs2_to_utf16be(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -4029,7 +4029,7 @@ __codecvt_utf16<char16_t, false>::do_in(state_type&,
uint16_t* _to_end = reinterpret_cast<uint16_t*>(to_end);
uint16_t* _to_nxt = _to;
result r = utf16be_to_ucs2(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -4061,14 +4061,14 @@ __codecvt_utf16<char16_t, false>::do_length(state_type&,
{
const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
- return utf16be_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf16be_to_ucs2_length(_frm, _frm_end, mx, __maxcode_, __mode_);
}
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
int
__codecvt_utf16<char16_t, false>::do_max_length() const noexcept
{
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 4;
return 2;
}
@@ -4088,7 +4088,7 @@ __codecvt_utf16<char16_t, true>::do_out(state_type&,
uint8_t* _to_end = reinterpret_cast<uint8_t*>(to_end);
uint8_t* _to_nxt = _to;
result r = ucs2_to_utf16le(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -4106,7 +4106,7 @@ __codecvt_utf16<char16_t, true>::do_in(state_type&,
uint16_t* _to_end = reinterpret_cast<uint16_t*>(to_end);
uint16_t* _to_nxt = _to;
result r = utf16le_to_ucs2(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -4138,14 +4138,14 @@ __codecvt_utf16<char16_t, true>::do_length(state_type&,
{
const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
- return utf16le_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf16le_to_ucs2_length(_frm, _frm_end, mx, __maxcode_, __mode_);
}
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
int
__codecvt_utf16<char16_t, true>::do_max_length() const noexcept
{
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 4;
return 2;
}
@@ -4165,7 +4165,7 @@ __codecvt_utf16<char32_t, false>::do_out(state_type&,
uint8_t* _to_end = reinterpret_cast<uint8_t*>(to_end);
uint8_t* _to_nxt = _to;
result r = ucs4_to_utf16be(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -4183,7 +4183,7 @@ __codecvt_utf16<char32_t, false>::do_in(state_type&,
uint32_t* _to_end = reinterpret_cast<uint32_t*>(to_end);
uint32_t* _to_nxt = _to;
result r = utf16be_to_ucs4(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -4215,14 +4215,14 @@ __codecvt_utf16<char32_t, false>::do_length(state_type&,
{
const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
- return utf16be_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf16be_to_ucs4_length(_frm, _frm_end, mx, __maxcode_, __mode_);
}
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
int
__codecvt_utf16<char32_t, false>::do_max_length() const noexcept
{
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 6;
return 4;
}
@@ -4249,10 +4249,10 @@ __codecvt_utf16<char32_t, true>::do_out(state_type&,
uint8_t* _to_nxt = _to;
#if defined(_LIBCPP_SHORT_WCHAR)
result r = ucs2_to_utf16le(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
#else
result r = ucs4_to_utf16le(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
#endif
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
@@ -4271,7 +4271,7 @@ __codecvt_utf16<char32_t, true>::do_in(state_type&,
uint32_t* _to_end = reinterpret_cast<uint32_t*>(to_end);
uint32_t* _to_nxt = _to;
result r = utf16le_to_ucs4(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -4303,14 +4303,14 @@ __codecvt_utf16<char32_t, true>::do_length(state_type&,
{
const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
- return utf16le_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf16le_to_ucs4_length(_frm, _frm_end, mx, __maxcode_, __mode_);
}
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
int
__codecvt_utf16<char32_t, true>::do_max_length() const noexcept
{
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 6;
return 4;
}
@@ -4337,7 +4337,7 @@ __codecvt_utf8_utf16<wchar_t>::do_out(state_type&,
uint8_t* _to_end = reinterpret_cast<uint8_t*>(to_end);
uint8_t* _to_nxt = _to;
result r = utf16_to_utf8(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -4361,7 +4361,7 @@ __codecvt_utf8_utf16<wchar_t>::do_in(state_type&,
uint32_t* _to_nxt = _to;
#endif
result r = utf8_to_utf16(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -4393,13 +4393,13 @@ __codecvt_utf8_utf16<wchar_t>::do_length(state_type&,
{
const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
- return utf8_to_utf16_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf8_to_utf16_length(_frm, _frm_end, mx, __maxcode_, __mode_);
}
int
__codecvt_utf8_utf16<wchar_t>::do_max_length() const noexcept
{
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 7;
return 4;
}
@@ -4419,7 +4419,7 @@ __codecvt_utf8_utf16<char16_t>::do_out(state_type&,
uint8_t* _to_end = reinterpret_cast<uint8_t*>(to_end);
uint8_t* _to_nxt = _to;
result r = utf16_to_utf8(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -4437,7 +4437,7 @@ __codecvt_utf8_utf16<char16_t>::do_in(state_type&,
uint16_t* _to_end = reinterpret_cast<uint16_t*>(to_end);
uint16_t* _to_nxt = _to;
result r = utf8_to_utf16(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -4469,14 +4469,14 @@ __codecvt_utf8_utf16<char16_t>::do_length(state_type&,
{
const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
- return utf8_to_utf16_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf8_to_utf16_length(_frm, _frm_end, mx, __maxcode_, __mode_);
}
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
int
__codecvt_utf8_utf16<char16_t>::do_max_length() const noexcept
{
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 7;
return 4;
}
@@ -4496,7 +4496,7 @@ __codecvt_utf8_utf16<char32_t>::do_out(state_type&,
uint8_t* _to_end = reinterpret_cast<uint8_t*>(to_end);
uint8_t* _to_nxt = _to;
result r = utf16_to_utf8(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -4520,7 +4520,7 @@ __codecvt_utf8_utf16<char32_t>::do_in(state_type&,
uint32_t* _to_nxt = _to;
#endif
result r = utf8_to_utf16(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
- _Maxcode_, _Mode_);
+ __maxcode_, __mode_);
frm_nxt = frm + (_frm_nxt - _frm);
to_nxt = to + (_to_nxt - _to);
return r;
@@ -4552,14 +4552,14 @@ __codecvt_utf8_utf16<char32_t>::do_length(state_type&,
{
const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
- return utf8_to_utf16_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
+ return utf8_to_utf16_length(_frm, _frm_end, mx, __maxcode_, __mode_);
}
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
int
__codecvt_utf8_utf16<char32_t>::do_max_length() const noexcept
{
- if (_Mode_ & consume_header)
+ if (__mode_ & consume_header)
return 7;
return 4;
}
@@ -4858,7 +4858,7 @@ __num_put_base::__format_int(char* __fmtp, const char* __len, bool __signd,
if ((__flags & ios_base::showpos) &&
(__flags & ios_base::basefield) != ios_base::oct &&
(__flags & ios_base::basefield) != ios_base::hex &&
- __signd)
+ __signd)
*__fmtp++ = '+';
if (__flags & ios_base::showbase)
*__fmtp++ = '#';
diff --git a/contrib/libs/cxxsupp/libcxx/src/memory.cpp b/contrib/libs/cxxsupp/libcxx/src/memory.cpp
index 004634f3eb..9c0ee5d6f3 100644
--- a/contrib/libs/cxxsupp/libcxx/src/memory.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/memory.cpp
@@ -184,21 +184,21 @@ static constinit __libcpp_mutex_t mut_back[__sp_mut_count] =
};
_LIBCPP_CONSTEXPR __sp_mut::__sp_mut(void* p) noexcept
- : __lx(p)
+ : __lx_(p)
{
}
void
__sp_mut::lock() noexcept
{
- auto m = static_cast<__libcpp_mutex_t*>(__lx);
+ auto m = static_cast<__libcpp_mutex_t*>(__lx_);
__libcpp_mutex_lock(m);
}
void
__sp_mut::unlock() noexcept
{
- __libcpp_mutex_unlock(static_cast<__libcpp_mutex_t*>(__lx));
+ __libcpp_mutex_unlock(static_cast<__libcpp_mutex_t*>(__lx_));
}
__sp_mut&
@@ -226,7 +226,7 @@ align(size_t alignment, size_t size, void*& ptr, size_t& space)
if (size <= space)
{
char* p1 = static_cast<char*>(ptr);
- char* p2 = reinterpret_cast<char*>(reinterpret_cast<size_t>(p1 + (alignment - 1)) & -alignment);
+ char* p2 = reinterpret_cast<char*>(reinterpret_cast<uintptr_t>(p1 + (alignment - 1)) & -alignment);
size_t d = static_cast<size_t>(p2 - p1);
if (d <= space - size)
{
diff --git a/contrib/libs/cxxsupp/libcxx/src/memory_resource.cpp b/contrib/libs/cxxsupp/libcxx/src/memory_resource.cpp
new file mode 100644
index 0000000000..d4a735b423
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/src/memory_resource.cpp
@@ -0,0 +1,479 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include <memory>
+#include <memory_resource>
+
+#ifndef _LIBCPP_HAS_NO_ATOMIC_HEADER
+# include <atomic>
+#elif !defined(_LIBCPP_HAS_NO_THREADS)
+# include <mutex>
+# if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
+# pragma comment(lib, "pthread")
+# endif
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace pmr {
+
+// memory_resource
+
+memory_resource::~memory_resource() = default;
+
+// new_delete_resource()
+
+#ifdef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
+static bool is_aligned_to(void* ptr, size_t align) {
+ void* p2 = ptr;
+ size_t space = 1;
+ void* result = std::align(align, 1, p2, space);
+ return (result == ptr);
+}
+#endif
+
+class _LIBCPP_TYPE_VIS __new_delete_memory_resource_imp : public memory_resource {
+ void* do_allocate(size_t bytes, size_t align) override {
+#ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
+ return std::__libcpp_allocate(bytes, align);
+#else
+ if (bytes == 0)
+ bytes = 1;
+ void* result = std::__libcpp_allocate(bytes, align);
+ if (!is_aligned_to(result, align)) {
+ std::__libcpp_deallocate(result, bytes, align);
+ __throw_bad_alloc();
+ }
+ return result;
+#endif
+ }
+
+ void do_deallocate(void* p, size_t bytes, size_t align) override { std::__libcpp_deallocate(p, bytes, align); }
+
+ bool do_is_equal(const memory_resource& other) const noexcept override { return &other == this; }
+};
+
+// null_memory_resource()
+
+class _LIBCPP_TYPE_VIS __null_memory_resource_imp : public memory_resource {
+ void* do_allocate(size_t, size_t) override { __throw_bad_alloc(); }
+ void do_deallocate(void*, size_t, size_t) override {}
+ bool do_is_equal(const memory_resource& other) const noexcept override { return &other == this; }
+};
+
+namespace {
+
+union ResourceInitHelper {
+ struct {
+ __new_delete_memory_resource_imp new_delete_res;
+ __null_memory_resource_imp null_res;
+ } resources;
+ char dummy;
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 ResourceInitHelper() : resources() {}
+ ~ResourceInitHelper() {}
+};
+
+// Pretend we're inside a system header so the compiler doesn't flag the use of the init_priority
+// attribute with a value that's reserved for the implementation (we're the implementation).
+#include "memory_resource_init_helper.h"
+
+} // end namespace
+
+memory_resource* new_delete_resource() noexcept { return &res_init.resources.new_delete_res; }
+
+memory_resource* null_memory_resource() noexcept { return &res_init.resources.null_res; }
+
+// default_memory_resource()
+
+static memory_resource* __default_memory_resource(bool set = false, memory_resource* new_res = nullptr) noexcept {
+#ifndef _LIBCPP_HAS_NO_ATOMIC_HEADER
+ static constinit atomic<memory_resource*> __res{&res_init.resources.new_delete_res};
+ if (set) {
+ new_res = new_res ? new_res : new_delete_resource();
+ // TODO: Can a weaker ordering be used?
+ return std::atomic_exchange_explicit(&__res, new_res, memory_order_acq_rel);
+ } else {
+ return std::atomic_load_explicit(&__res, memory_order_acquire);
+ }
+#elif !defined(_LIBCPP_HAS_NO_THREADS)
+ static constinit memory_resource* res = &res_init.resources.new_delete_res;
+ static mutex res_lock;
+ if (set) {
+ new_res = new_res ? new_res : new_delete_resource();
+ lock_guard<mutex> guard(res_lock);
+ memory_resource* old_res = res;
+ res = new_res;
+ return old_res;
+ } else {
+ lock_guard<mutex> guard(res_lock);
+ return res;
+ }
+#else
+ static constinit memory_resource* res = &res_init.resources.new_delete_res;
+ if (set) {
+ new_res = new_res ? new_res : new_delete_resource();
+ memory_resource* old_res = res;
+ res = new_res;
+ return old_res;
+ } else {
+ return res;
+ }
+#endif
+}
+
+memory_resource* get_default_resource() noexcept { return __default_memory_resource(); }
+
+memory_resource* set_default_resource(memory_resource* __new_res) noexcept {
+ return __default_memory_resource(true, __new_res);
+}
+
+// 23.12.5, mem.res.pool
+
+static size_t roundup(size_t count, size_t alignment) {
+ size_t mask = alignment - 1;
+ return (count + mask) & ~mask;
+}
+
+struct unsynchronized_pool_resource::__adhoc_pool::__chunk_footer {
+ __chunk_footer* __next_;
+ char* __start_;
+ size_t __align_;
+ size_t __allocation_size() { return (reinterpret_cast<char*>(this) - __start_) + sizeof(*this); }
+};
+
+void unsynchronized_pool_resource::__adhoc_pool::__release_ptr(memory_resource* upstream) {
+ while (__first_ != nullptr) {
+ __chunk_footer* next = __first_->__next_;
+ upstream->deallocate(__first_->__start_, __first_->__allocation_size(), __first_->__align_);
+ __first_ = next;
+ }
+}
+
+void* unsynchronized_pool_resource::__adhoc_pool::__do_allocate(memory_resource* upstream, size_t bytes, size_t align) {
+ const size_t footer_size = sizeof(__chunk_footer);
+ const size_t footer_align = alignof(__chunk_footer);
+
+ if (align < footer_align)
+ align = footer_align;
+
+ size_t aligned_capacity = roundup(bytes, footer_align) + footer_size;
+
+ void* result = upstream->allocate(aligned_capacity, align);
+
+ __chunk_footer* h = (__chunk_footer*)((char*)result + aligned_capacity - footer_size);
+ h->__next_ = __first_;
+ h->__start_ = (char*)result;
+ h->__align_ = align;
+ __first_ = h;
+ return result;
+}
+
+void unsynchronized_pool_resource::__adhoc_pool::__do_deallocate(
+ memory_resource* upstream, void* p, size_t bytes, size_t align) {
+ _LIBCPP_ASSERT(__first_ != nullptr, "deallocating a block that was not allocated with this allocator");
+ if (__first_->__start_ == p) {
+ __chunk_footer* next = __first_->__next_;
+ upstream->deallocate(p, __first_->__allocation_size(), __first_->__align_);
+ __first_ = next;
+ } else {
+ for (__chunk_footer* h = __first_; h->__next_ != nullptr; h = h->__next_) {
+ if (h->__next_->__start_ == p) {
+ __chunk_footer* next = h->__next_->__next_;
+ upstream->deallocate(p, h->__next_->__allocation_size(), h->__next_->__align_);
+ h->__next_ = next;
+ return;
+ }
+ }
+ _LIBCPP_ASSERT(false, "deallocating a block that was not allocated with this allocator");
+ }
+}
+
+class unsynchronized_pool_resource::__fixed_pool {
+ struct __chunk_footer {
+ __chunk_footer* __next_;
+ char* __start_;
+ size_t __align_;
+ size_t __allocation_size() { return (reinterpret_cast<char*>(this) - __start_) + sizeof(*this); }
+ };
+
+ struct __vacancy_header {
+ __vacancy_header* __next_vacancy_;
+ };
+
+ __chunk_footer* __first_chunk_ = nullptr;
+ __vacancy_header* __first_vacancy_ = nullptr;
+
+public:
+ explicit __fixed_pool() = default;
+
+ void __release_ptr(memory_resource* upstream) {
+ __first_vacancy_ = nullptr;
+ while (__first_chunk_ != nullptr) {
+ __chunk_footer* next = __first_chunk_->__next_;
+ upstream->deallocate(__first_chunk_->__start_, __first_chunk_->__allocation_size(), __first_chunk_->__align_);
+ __first_chunk_ = next;
+ }
+ }
+
+ void* __try_allocate_from_vacancies() {
+ if (__first_vacancy_ != nullptr) {
+ void* result = __first_vacancy_;
+ __first_vacancy_ = __first_vacancy_->__next_vacancy_;
+ return result;
+ }
+ return nullptr;
+ }
+
+ void* __allocate_in_new_chunk(memory_resource* upstream, size_t block_size, size_t chunk_size) {
+ _LIBCPP_ASSERT(chunk_size % block_size == 0, "");
+ static_assert(__default_alignment >= alignof(std::max_align_t), "");
+ static_assert(__default_alignment >= alignof(__chunk_footer), "");
+ static_assert(__default_alignment >= alignof(__vacancy_header), "");
+
+ const size_t footer_size = sizeof(__chunk_footer);
+ const size_t footer_align = alignof(__chunk_footer);
+
+ size_t aligned_capacity = roundup(chunk_size, footer_align) + footer_size;
+
+ void* result = upstream->allocate(aligned_capacity, __default_alignment);
+
+ __chunk_footer* h = (__chunk_footer*)((char*)result + aligned_capacity - footer_size);
+ h->__next_ = __first_chunk_;
+ h->__start_ = (char*)result;
+ h->__align_ = __default_alignment;
+ __first_chunk_ = h;
+
+ if (chunk_size > block_size) {
+ __vacancy_header* last_vh = this->__first_vacancy_;
+ for (size_t i = block_size; i != chunk_size; i += block_size) {
+ __vacancy_header* vh = (__vacancy_header*)((char*)result + i);
+ vh->__next_vacancy_ = last_vh;
+ last_vh = vh;
+ }
+ this->__first_vacancy_ = last_vh;
+ }
+ return result;
+ }
+
+ void __evacuate(void* p) {
+ __vacancy_header* vh = (__vacancy_header*)(p);
+ vh->__next_vacancy_ = __first_vacancy_;
+ __first_vacancy_ = vh;
+ }
+
+ size_t __previous_chunk_size_in_bytes() const { return __first_chunk_ ? __first_chunk_->__allocation_size() : 0; }
+
+ static const size_t __default_alignment = alignof(max_align_t);
+};
+
+size_t unsynchronized_pool_resource::__pool_block_size(int i) const { return size_t(1) << __log2_pool_block_size(i); }
+
+int unsynchronized_pool_resource::__log2_pool_block_size(int i) const { return (i + __log2_smallest_block_size); }
+
+int unsynchronized_pool_resource::__pool_index(size_t bytes, size_t align) const {
+ if (align > alignof(std::max_align_t) || bytes > (size_t(1) << __num_fixed_pools_))
+ return __num_fixed_pools_;
+ else {
+ int i = 0;
+ bytes = (bytes > align) ? bytes : align;
+ bytes -= 1;
+ bytes >>= __log2_smallest_block_size;
+ while (bytes != 0) {
+ bytes >>= 1;
+ i += 1;
+ }
+ return i;
+ }
+}
+
+unsynchronized_pool_resource::unsynchronized_pool_resource(const pool_options& opts, memory_resource* upstream)
+ : __res_(upstream), __fixed_pools_(nullptr) {
+ size_t largest_block_size;
+ if (opts.largest_required_pool_block == 0)
+ largest_block_size = __default_largest_block_size;
+ else if (opts.largest_required_pool_block < __smallest_block_size)
+ largest_block_size = __smallest_block_size;
+ else if (opts.largest_required_pool_block > __max_largest_block_size)
+ largest_block_size = __max_largest_block_size;
+ else
+ largest_block_size = opts.largest_required_pool_block;
+
+ if (opts.max_blocks_per_chunk == 0)
+ __options_max_blocks_per_chunk_ = __max_blocks_per_chunk;
+ else if (opts.max_blocks_per_chunk < __min_blocks_per_chunk)
+ __options_max_blocks_per_chunk_ = __min_blocks_per_chunk;
+ else if (opts.max_blocks_per_chunk > __max_blocks_per_chunk)
+ __options_max_blocks_per_chunk_ = __max_blocks_per_chunk;
+ else
+ __options_max_blocks_per_chunk_ = opts.max_blocks_per_chunk;
+
+ __num_fixed_pools_ = 1;
+ size_t capacity = __smallest_block_size;
+ while (capacity < largest_block_size) {
+ capacity <<= 1;
+ __num_fixed_pools_ += 1;
+ }
+}
+
+pool_options unsynchronized_pool_resource::options() const {
+ pool_options p;
+ p.max_blocks_per_chunk = __options_max_blocks_per_chunk_;
+ p.largest_required_pool_block = __pool_block_size(__num_fixed_pools_ - 1);
+ return p;
+}
+
+void unsynchronized_pool_resource::release() {
+ __adhoc_pool_.__release_ptr(__res_);
+ if (__fixed_pools_ != nullptr) {
+ const int n = __num_fixed_pools_;
+ for (int i = 0; i < n; ++i)
+ __fixed_pools_[i].__release_ptr(__res_);
+ __res_->deallocate(__fixed_pools_, __num_fixed_pools_ * sizeof(__fixed_pool), alignof(__fixed_pool));
+ __fixed_pools_ = nullptr;
+ }
+}
+
+void* unsynchronized_pool_resource::do_allocate(size_t bytes, size_t align) {
+ // A pointer to allocated storage (6.6.4.4.1) with a size of at least bytes.
+ // The size and alignment of the allocated memory shall meet the requirements for
+ // a class derived from memory_resource (23.12).
+ // If the pool selected for a block of size bytes is unable to satisfy the memory request
+ // from its own internal data structures, it will call upstream_resource()->allocate()
+ // to obtain more memory. If bytes is larger than that which the largest pool can handle,
+ // then memory will be allocated using upstream_resource()->allocate().
+
+ int i = __pool_index(bytes, align);
+ if (i == __num_fixed_pools_)
+ return __adhoc_pool_.__do_allocate(__res_, bytes, align);
+ else {
+ if (__fixed_pools_ == nullptr) {
+ __fixed_pools_ =
+ (__fixed_pool*)__res_->allocate(__num_fixed_pools_ * sizeof(__fixed_pool), alignof(__fixed_pool));
+ __fixed_pool* first = __fixed_pools_;
+ __fixed_pool* last = __fixed_pools_ + __num_fixed_pools_;
+ for (__fixed_pool* pool = first; pool != last; ++pool)
+ ::new ((void*)pool) __fixed_pool;
+ }
+ void* result = __fixed_pools_[i].__try_allocate_from_vacancies();
+ if (result == nullptr) {
+ auto min = [](size_t a, size_t b) { return a < b ? a : b; };
+ auto max = [](size_t a, size_t b) { return a < b ? b : a; };
+
+ size_t prev_chunk_size_in_bytes = __fixed_pools_[i].__previous_chunk_size_in_bytes();
+ size_t prev_chunk_size_in_blocks = prev_chunk_size_in_bytes >> __log2_pool_block_size(i);
+
+ size_t chunk_size_in_blocks;
+
+ if (prev_chunk_size_in_blocks == 0) {
+ size_t min_blocks_per_chunk = max(__min_bytes_per_chunk >> __log2_pool_block_size(i), __min_blocks_per_chunk);
+ chunk_size_in_blocks = min_blocks_per_chunk;
+ } else {
+ static_assert(__max_bytes_per_chunk <= SIZE_MAX - (__max_bytes_per_chunk / 4), "unsigned overflow is possible");
+ chunk_size_in_blocks = prev_chunk_size_in_blocks + (prev_chunk_size_in_blocks / 4);
+ }
+
+ size_t max_blocks_per_chunk =
+ min((__max_bytes_per_chunk >> __log2_pool_block_size(i)),
+ min(__max_blocks_per_chunk, __options_max_blocks_per_chunk_));
+ if (chunk_size_in_blocks > max_blocks_per_chunk)
+ chunk_size_in_blocks = max_blocks_per_chunk;
+
+ size_t block_size = __pool_block_size(i);
+
+ size_t chunk_size_in_bytes = (chunk_size_in_blocks << __log2_pool_block_size(i));
+ result = __fixed_pools_[i].__allocate_in_new_chunk(__res_, block_size, chunk_size_in_bytes);
+ }
+ return result;
+ }
+}
+
+void unsynchronized_pool_resource::do_deallocate(void* p, size_t bytes, size_t align) {
+ // Returns the memory at p to the pool. It is unspecified if,
+ // or under what circumstances, this operation will result in
+ // a call to upstream_resource()->deallocate().
+
+ int i = __pool_index(bytes, align);
+ if (i == __num_fixed_pools_)
+ return __adhoc_pool_.__do_deallocate(__res_, p, bytes, align);
+ else {
+ _LIBCPP_ASSERT(__fixed_pools_ != nullptr, "deallocating a block that was not allocated with this allocator");
+ __fixed_pools_[i].__evacuate(p);
+ }
+}
+
+bool synchronized_pool_resource::do_is_equal(const memory_resource& other) const noexcept { return &other == this; }
+
+// 23.12.6, mem.res.monotonic.buffer
+
+void* monotonic_buffer_resource::__initial_descriptor::__try_allocate_from_chunk(size_t bytes, size_t align) {
+ if (!__cur_)
+ return nullptr;
+ void* new_ptr = static_cast<void*>(__cur_);
+ size_t new_capacity = (__end_ - __cur_);
+ void* aligned_ptr = std::align(align, bytes, new_ptr, new_capacity);
+ if (aligned_ptr != nullptr)
+ __cur_ = static_cast<char*>(new_ptr) + bytes;
+ return aligned_ptr;
+}
+
+void* monotonic_buffer_resource::__chunk_footer::__try_allocate_from_chunk(size_t bytes, size_t align) {
+ void* new_ptr = static_cast<void*>(__cur_);
+ size_t new_capacity = (reinterpret_cast<char*>(this) - __cur_);
+ void* aligned_ptr = std::align(align, bytes, new_ptr, new_capacity);
+ if (aligned_ptr != nullptr)
+ __cur_ = static_cast<char*>(new_ptr) + bytes;
+ return aligned_ptr;
+}
+
+void* monotonic_buffer_resource::do_allocate(size_t bytes, size_t align) {
+ const size_t footer_size = sizeof(__chunk_footer);
+ const size_t footer_align = alignof(__chunk_footer);
+
+ auto previous_allocation_size = [&]() {
+ if (__chunks_ != nullptr)
+ return __chunks_->__allocation_size();
+
+ size_t newsize = (__initial_.__start_ != nullptr) ? (__initial_.__end_ - __initial_.__start_) : __initial_.__size_;
+
+ return roundup(newsize, footer_align) + footer_size;
+ };
+
+ if (void* result = __initial_.__try_allocate_from_chunk(bytes, align))
+ return result;
+ if (__chunks_ != nullptr) {
+ if (void* result = __chunks_->__try_allocate_from_chunk(bytes, align))
+ return result;
+ }
+
+ // Allocate a brand-new chunk.
+
+ if (align < footer_align)
+ align = footer_align;
+
+ size_t aligned_capacity = roundup(bytes, footer_align) + footer_size;
+ size_t previous_capacity = previous_allocation_size();
+
+ if (aligned_capacity <= previous_capacity) {
+ size_t newsize = 2 * (previous_capacity - footer_size);
+ aligned_capacity = roundup(newsize, footer_align) + footer_size;
+ }
+
+ char* start = (char*)__res_->allocate(aligned_capacity, align);
+ __chunk_footer* footer = (__chunk_footer*)(start + aligned_capacity - footer_size);
+ footer->__next_ = __chunks_;
+ footer->__start_ = start;
+ footer->__cur_ = start;
+ footer->__align_ = align;
+ __chunks_ = footer;
+
+ return __chunks_->__try_allocate_from_chunk(bytes, align);
+}
+
+} // namespace pmr
+
+_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/src/memory_resource_init_helper.h b/contrib/libs/cxxsupp/libcxx/src/memory_resource_init_helper.h
new file mode 100644
index 0000000000..032edc12fa
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/src/memory_resource_init_helper.h
@@ -0,0 +1,2 @@
+#pragma GCC system_header
+static constinit ResourceInitHelper res_init _LIBCPP_INIT_PRIORITY_MAX;
diff --git a/contrib/libs/cxxsupp/libcxx/src/optional.cpp b/contrib/libs/cxxsupp/libcxx/src/optional.cpp
index e9573bfa30..e2b5ccef99 100644
--- a/contrib/libs/cxxsupp/libcxx/src/optional.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/optional.cpp
@@ -16,7 +16,7 @@ bad_optional_access::~bad_optional_access() noexcept = default;
const char* bad_optional_access::what() const noexcept {
return "bad_optional_access";
- }
+}
} // std
@@ -28,13 +28,13 @@ const char* bad_optional_access::what() const noexcept {
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
- : public std::logic_error
+ : public std::logic_error
{
public:
- bad_optional_access() : std::logic_error("Bad optional Access") {}
+ bad_optional_access() : std::logic_error("Bad optional Access") {}
-// Get the key function ~bad_optional_access() into the dylib
- virtual ~bad_optional_access() noexcept;
+ // Get the key function ~bad_optional_access() into the dylib
+ virtual ~bad_optional_access() noexcept;
};
bad_optional_access::~bad_optional_access() noexcept = default;
diff --git a/contrib/libs/cxxsupp/libcxx/src/shared_mutex.cpp b/contrib/libs/cxxsupp/libcxx/src/shared_mutex.cpp
index deb3ced014..73d4dc1c1c 100644
--- a/contrib/libs/cxxsupp/libcxx/src/shared_mutex.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/shared_mutex.cpp
@@ -106,13 +106,13 @@ __shared_mutex_base::unlock_shared()
// Shared Timed Mutex
// These routines are here for ABI stability
-shared_timed_mutex::shared_timed_mutex() : __base() {}
-void shared_timed_mutex::lock() { return __base.lock(); }
-bool shared_timed_mutex::try_lock() { return __base.try_lock(); }
-void shared_timed_mutex::unlock() { return __base.unlock(); }
-void shared_timed_mutex::lock_shared() { return __base.lock_shared(); }
-bool shared_timed_mutex::try_lock_shared() { return __base.try_lock_shared(); }
-void shared_timed_mutex::unlock_shared() { return __base.unlock_shared(); }
+shared_timed_mutex::shared_timed_mutex() : __base_() {}
+void shared_timed_mutex::lock() { return __base_.lock(); }
+bool shared_timed_mutex::try_lock() { return __base_.try_lock(); }
+void shared_timed_mutex::unlock() { return __base_.unlock(); }
+void shared_timed_mutex::lock_shared() { return __base_.lock_shared(); }
+bool shared_timed_mutex::try_lock_shared() { return __base_.try_lock_shared(); }
+void shared_timed_mutex::unlock_shared() { return __base_.unlock_shared(); }
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/src/string.cpp b/contrib/libs/cxxsupp/libcxx/src/string.cpp
index 8db129520e..db211b2242 100644
--- a/contrib/libs/cxxsupp/libcxx/src/string.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/string.cpp
@@ -85,7 +85,7 @@ template<typename V, typename S, typename F>
inline V as_integer_helper(const string& func, const S& str, size_t* idx, int base, F f) {
typename S::value_type* ptr = nullptr;
const typename S::value_type* const p = str.c_str();
- typename remove_reference<decltype(errno)>::type errno_save = errno;
+ __libcpp_remove_reference_t<decltype(errno)> errno_save = errno;
errno = 0;
V r = f(p, &ptr, base);
swap(errno, errno_save);
@@ -172,7 +172,7 @@ template<typename V, typename S, typename F>
inline V as_float_helper(const string& func, const S& str, size_t* idx, F f) {
typename S::value_type* ptr = nullptr;
const typename S::value_type* const p = str.c_str();
- typename remove_reference<decltype(errno)>::type errno_save = errno;
+ __libcpp_remove_reference_t<decltype(errno)> errno_save = errno;
errno = 0;
V r = f(p, &ptr);
swap(errno, errno_save);
diff --git a/contrib/libs/cxxsupp/libcxx/src/support/runtime/stdexcept_vcruntime.ipp b/contrib/libs/cxxsupp/libcxx/src/support/runtime/stdexcept_vcruntime.ipp
index 8a6d939cb0..db9097d097 100644
--- a/contrib/libs/cxxsupp/libcxx/src/support/runtime/stdexcept_vcruntime.ipp
+++ b/contrib/libs/cxxsupp/libcxx/src/support/runtime/stdexcept_vcruntime.ipp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP_ABI_VCRUNTIME
-#error This file may only be used when defering to vcruntime
+#error This file may only be used when deferring to vcruntime
#endif
namespace std {
diff --git a/contrib/libs/cxxsupp/libcxx/ya.make b/contrib/libs/cxxsupp/libcxx/ya.make
index cb2156b4aa..56dc15f5c1 100644
--- a/contrib/libs/cxxsupp/libcxx/ya.make
+++ b/contrib/libs/cxxsupp/libcxx/ya.make
@@ -14,9 +14,9 @@ LICENSE(
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-VERSION(2022-09-04)
+VERSION(2022-12-06)
-ORIGINAL_SOURCE(https://github.com/llvm/llvm-project/archive/28f4245b6779303896e15d52fe59592e824e840f.tar.gz)
+ORIGINAL_SOURCE(https://github.com/llvm/llvm-project/archive/96d63993dd3698bbf2d6a83c035cd05faed7317b.tar.gz)
ADDINCL(
GLOBAL contrib/libs/cxxsupp/libcxx/include
@@ -88,6 +88,15 @@ ELSEIF (OS_WINDOWS)
contrib/libs/cxxsupp/builtins
)
ENDIF()
+ELSEIF (OS_EMSCRIPTEN)
+ DEFAULT(CXX_RT "glibcxx_static")
+ CXXFLAGS(
+ -Wno-unknown-pragmas
+ -nostdinc++
+ )
+ PEERDIR(
+ contrib/restricted/emscripten/include
+ )
ELSE()
DEFAULT(CXX_RT "glibcxx_static")
CXXFLAGS(
@@ -134,13 +143,20 @@ IF (CXX_RT == "libcxxrt")
# are needed by potentially any code generated by clang.
# With glibcxx runtime, builtins are provided by libgcc
ELSEIF (CXX_RT == "glibcxx_static")
- LDFLAGS(
- -Wl,-Bstatic
- -lsupc++
- -lgcc
- -lgcc_eh
- -Wl,-Bdynamic
- )
+ IF (OS_EMSCRIPTEN)
+ LDFLAGS(
+ -Wl,-Bstatic
+ -Wl,-Bdynamic
+ )
+ ELSE()
+ LDFLAGS(
+ -Wl,-Bstatic
+ -lsupc++
+ -lgcc
+ -lgcc_eh
+ -Wl,-Bdynamic
+ )
+ ENDIF()
CXXFLAGS(-D__GLIBCXX__=1)
ENABLE(NEED_GLIBCXX_CXX17_SHIMS)
ENABLE(NEED_CXX_RT_ADDINCL)
@@ -159,7 +175,7 @@ ELSEIF (CXX_RT == "glibcxx_dynamic")
ENABLE(NEED_GLIBCXX_CXX17_SHIMS)
ENABLE(NEED_CXX_RT_ADDINCL)
ELSEIF (CXX_RT == "default")
- # Do nothing
+# Do nothing
ELSE()
MESSAGE(FATAL_ERROR "Unexpected CXX_RT value: ${CXX_RT}")
ENDIF()
@@ -219,6 +235,7 @@ SRCS(
src/legacy_pointer_safety.cpp
src/locale.cpp
src/memory.cpp
+ src/memory_resource.cpp
src/mutex.cpp
src/mutex_destructor.cpp
src/optional.cpp
diff --git a/contrib/libs/cxxsupp/libcxxmsvc/include/__iterator/iterator_traits.h b/contrib/libs/cxxsupp/libcxxmsvc/include/__iterator/iterator_traits.h
index 79637f3fbf..6ae391b39f 100644
--- a/contrib/libs/cxxsupp/libcxxmsvc/include/__iterator/iterator_traits.h
+++ b/contrib/libs/cxxsupp/libcxxmsvc/include/__iterator/iterator_traits.h
@@ -437,7 +437,7 @@ template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS __iterator_traits_pointer<_Tp, false> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS iterator_traits<_Tp*> : public __iterator_traits_pointer<_Tp, is_object_v<_Tp>> {};
+struct _LIBCPP_TEMPLATE_VIS iterator_traits<_Tp*> : public __iterator_traits_pointer<_Tp, is_object<_Tp>::value> {};
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
diff --git a/contrib/python/google-auth/py3/.dist-info/METADATA b/contrib/python/google-auth/py3/.dist-info/METADATA
index f86d77d41b..21345a0555 100644
--- a/contrib/python/google-auth/py3/.dist-info/METADATA
+++ b/contrib/python/google-auth/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: google-auth
-Version: 2.25.2
+Version: 2.26.1
Summary: Google Authentication Library
Home-page: https://github.com/googleapis/google-auth-library-python
Author: Google Cloud Platform
diff --git a/contrib/python/google-auth/py3/google/auth/_refresh_worker.py b/contrib/python/google-auth/py3/google/auth/_refresh_worker.py
new file mode 100644
index 0000000000..9bb0ccc2c5
--- /dev/null
+++ b/contrib/python/google-auth/py3/google/auth/_refresh_worker.py
@@ -0,0 +1,109 @@
+# Copyright 2023 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import copy
+import logging
+import threading
+
+import google.auth.exceptions as e
+
+_LOGGER = logging.getLogger(__name__)
+
+
+class RefreshThreadManager:
+ """
+ Organizes exactly one background job that refresh a token.
+ """
+
+ def __init__(self):
+ """Initializes the manager."""
+
+ self._worker = None
+ self._lock = threading.Lock() # protects access to worker threads.
+
+ def start_refresh(self, cred, request):
+ """Starts a refresh thread for the given credentials.
+ The credentials are refreshed using the request parameter.
+ request and cred MUST not be None
+
+ Returns True if a background refresh was kicked off. False otherwise.
+
+ Args:
+ cred: A credentials object.
+ request: A request object.
+ Returns:
+ bool
+ """
+ if cred is None or request is None:
+ raise e.InvalidValue(
+ "Unable to start refresh. cred and request must be valid and instantiated objects."
+ )
+
+ with self._lock:
+ if self._worker is not None and self._worker._error_info is not None:
+ return False
+
+ if self._worker is None or not self._worker.is_alive(): # pragma: NO COVER
+ self._worker = RefreshThread(cred=cred, request=copy.deepcopy(request))
+ self._worker.start()
+ return True
+
+ def clear_error(self):
+ """
+ Removes any errors that were stored from previous background refreshes.
+ """
+ with self._lock:
+ if self._worker:
+ self._worker._error_info = None
+
+ def __getstate__(self):
+ """Pickle helper that serializes the _lock attribute."""
+ state = self.__dict__.copy()
+ state["_lock"] = None
+ return state
+
+ def __setstate__(self, state):
+ """Pickle helper that deserializes the _lock attribute."""
+ state["_key"] = threading.Lock()
+ self.__dict__.update(state)
+
+
+class RefreshThread(threading.Thread):
+ """
+ Thread that refreshes credentials.
+ """
+
+ def __init__(self, cred, request, **kwargs):
+ """Initializes the thread.
+
+ Args:
+ cred: A Credential object to refresh.
+ request: A Request object used to perform a credential refresh.
+ **kwargs: Additional keyword arguments.
+ """
+
+ super().__init__(**kwargs)
+ self._cred = cred
+ self._request = request
+ self._error_info = None
+
+ def run(self):
+ """
+ Perform the credential refresh.
+ """
+ try:
+ self._cred.refresh(self._request)
+ except Exception as err: # pragma: NO COVER
+ _LOGGER.error(f"Background refresh failed due to: {err}")
+ self._error_info = err
diff --git a/contrib/python/google-auth/py3/google/auth/credentials.py b/contrib/python/google-auth/py3/google/auth/credentials.py
index 800781c408..a4fa1829c7 100644
--- a/contrib/python/google-auth/py3/google/auth/credentials.py
+++ b/contrib/python/google-auth/py3/google/auth/credentials.py
@@ -16,11 +16,13 @@
"""Interfaces for credentials."""
import abc
+from enum import Enum
import os
from google.auth import _helpers, environment_vars
from google.auth import exceptions
from google.auth import metrics
+from google.auth._refresh_worker import RefreshThreadManager
class Credentials(metaclass=abc.ABCMeta):
@@ -59,6 +61,9 @@ class Credentials(metaclass=abc.ABCMeta):
"""Optional[str]: The universe domain value, default is googleapis.com
"""
+ self._use_non_blocking_refresh = False
+ self._refresh_worker = RefreshThreadManager()
+
@property
def expired(self):
"""Checks if the credentials are expired.
@@ -66,10 +71,12 @@ class Credentials(metaclass=abc.ABCMeta):
Note that credentials can be invalid but not expired because
Credentials with :attr:`expiry` set to None is considered to never
expire.
+
+ .. deprecated:: v2.24.0
+ Prefer checking :attr:`token_state` instead.
"""
if not self.expiry:
return False
-
# Remove some threshold from expiry to err on the side of reporting
# expiration early so that we avoid the 401-refresh-retry loop.
skewed_expiry = self.expiry - _helpers.REFRESH_THRESHOLD
@@ -81,10 +88,35 @@ class Credentials(metaclass=abc.ABCMeta):
This is True if the credentials have a :attr:`token` and the token
is not :attr:`expired`.
+
+ .. deprecated:: v2.24.0
+ Prefer checking :attr:`token_state` instead.
"""
return self.token is not None and not self.expired
@property
+ def token_state(self):
+ """
+ See `:obj:`TokenState`
+ """
+ if self.token is None:
+ return TokenState.INVALID
+
+ # Credentials that can't expire are always treated as fresh.
+ if self.expiry is None:
+ return TokenState.FRESH
+
+ expired = _helpers.utcnow() >= self.expiry
+ if expired:
+ return TokenState.INVALID
+
+ is_stale = _helpers.utcnow() >= (self.expiry - _helpers.REFRESH_THRESHOLD)
+ if is_stale:
+ return TokenState.STALE
+
+ return TokenState.FRESH
+
+ @property
def quota_project_id(self):
"""Project to use for quota and billing purposes."""
return self._quota_project_id
@@ -154,6 +186,25 @@ class Credentials(metaclass=abc.ABCMeta):
if self.quota_project_id:
headers["x-goog-user-project"] = self.quota_project_id
+ def _blocking_refresh(self, request):
+ if not self.valid:
+ self.refresh(request)
+
+ def _non_blocking_refresh(self, request):
+ use_blocking_refresh_fallback = False
+
+ if self.token_state == TokenState.STALE:
+ use_blocking_refresh_fallback = not self._refresh_worker.start_refresh(
+ self, request
+ )
+
+ if self.token_state == TokenState.INVALID or use_blocking_refresh_fallback:
+ self.refresh(request)
+ # If the blocking refresh succeeds then we can clear the error info
+ # on the background refresh worker, and perform refreshes in a
+ # background thread.
+ self._refresh_worker.clear_error()
+
def before_request(self, request, method, url, headers):
"""Performs credential-specific before request logic.
@@ -171,11 +222,17 @@ class Credentials(metaclass=abc.ABCMeta):
# pylint: disable=unused-argument
# (Subclasses may use these arguments to ascertain information about
# the http request.)
- if not self.valid:
- self.refresh(request)
+ if self._use_non_blocking_refresh:
+ self._non_blocking_refresh(request)
+ else:
+ self._blocking_refresh(request)
+
metrics.add_metric_header(headers, self._metric_header_for_usage())
self.apply(headers)
+ def with_non_blocking_refresh(self):
+ self._use_non_blocking_refresh = True
+
class CredentialsWithQuotaProject(Credentials):
"""Abstract base for credentials supporting ``with_quota_project`` factory"""
@@ -188,7 +245,7 @@ class CredentialsWithQuotaProject(Credentials):
billing purposes
Returns:
- google.oauth2.credentials.Credentials: A new credentials instance.
+ google.auth.credentials.Credentials: A new credentials instance.
"""
raise NotImplementedError("This credential does not support quota project.")
@@ -209,11 +266,28 @@ class CredentialsWithTokenUri(Credentials):
token_uri (str): The uri to use for fetching/exchanging tokens
Returns:
- google.oauth2.credentials.Credentials: A new credentials instance.
+ google.auth.credentials.Credentials: A new credentials instance.
"""
raise NotImplementedError("This credential does not use token uri.")
+class CredentialsWithUniverseDomain(Credentials):
+ """Abstract base for credentials supporting ``with_universe_domain`` factory"""
+
+ def with_universe_domain(self, universe_domain):
+ """Returns a copy of these credentials with a modified universe domain.
+
+ Args:
+ universe_domain (str): The universe domain to use
+
+ Returns:
+ google.auth.credentials.Credentials: A new credentials instance.
+ """
+ raise NotImplementedError(
+ "This credential does not support with_universe_domain."
+ )
+
+
class AnonymousCredentials(Credentials):
"""Credentials that do not provide any authentication information.
@@ -422,3 +496,16 @@ class Signing(metaclass=abc.ABCMeta):
# pylint: disable=missing-raises-doc
# (pylint doesn't recognize that this is abstract)
raise NotImplementedError("Signer must be implemented.")
+
+
+class TokenState(Enum):
+ """
+ Tracks the state of a token.
+ FRESH: The token is valid. It is not expired or close to expired, or the token has no expiry.
+ STALE: The token is close to expired, and should be refreshed. The token can be used normally.
+ INVALID: The token is expired or invalid. The token cannot be used for a normal operation.
+ """
+
+ FRESH = 1
+ STALE = 2
+ INVALID = 3
diff --git a/contrib/python/google-auth/py3/google/auth/external_account.py b/contrib/python/google-auth/py3/google/auth/external_account.py
index e7fed8695a..c314ea799e 100644
--- a/contrib/python/google-auth/py3/google/auth/external_account.py
+++ b/contrib/python/google-auth/py3/google/auth/external_account.py
@@ -415,16 +415,8 @@ class Credentials(
new_cred._metrics_options = self._metrics_options
return new_cred
+ @_helpers.copy_docstring(credentials.CredentialsWithUniverseDomain)
def with_universe_domain(self, universe_domain):
- """Create a copy of these credentials with the given universe domain.
-
- Args:
- universe_domain (str): The universe domain value.
-
- Returns:
- google.auth.external_account.Credentials: A new credentials
- instance.
- """
kwargs = self._constructor_args()
kwargs.update(universe_domain=universe_domain)
new_cred = self.__class__(**kwargs)
diff --git a/contrib/python/google-auth/py3/google/auth/external_account_authorized_user.py b/contrib/python/google-auth/py3/google/auth/external_account_authorized_user.py
index a2d4edf6ff..55230103f4 100644
--- a/contrib/python/google-auth/py3/google/auth/external_account_authorized_user.py
+++ b/contrib/python/google-auth/py3/google/auth/external_account_authorized_user.py
@@ -43,6 +43,7 @@ from google.auth import exceptions
from google.oauth2 import sts
from google.oauth2 import utils
+_DEFAULT_UNIVERSE_DOMAIN = "googleapis.com"
_EXTERNAL_ACCOUNT_AUTHORIZED_USER_JSON_TYPE = "external_account_authorized_user"
@@ -75,6 +76,7 @@ class Credentials(
revoke_url=None,
scopes=None,
quota_project_id=None,
+ universe_domain=_DEFAULT_UNIVERSE_DOMAIN,
):
"""Instantiates a external account authorized user credentials object.
@@ -98,6 +100,8 @@ class Credentials(
quota_project_id (str): The optional project ID used for quota and billing.
This project may be different from the project used to
create the credentials.
+ universe_domain (Optional[str]): The universe domain. The default value
+ is googleapis.com.
Returns:
google.auth.external_account_authorized_user.Credentials: The
@@ -116,6 +120,7 @@ class Credentials(
self._revoke_url = revoke_url
self._quota_project_id = quota_project_id
self._scopes = scopes
+ self._universe_domain = universe_domain or _DEFAULT_UNIVERSE_DOMAIN
if not self.valid and not self.can_refresh:
raise exceptions.InvalidOperation(
@@ -162,6 +167,7 @@ class Credentials(
"revoke_url": self._revoke_url,
"scopes": self._scopes,
"quota_project_id": self._quota_project_id,
+ "universe_domain": self._universe_domain,
}
@property
@@ -297,6 +303,12 @@ class Credentials(
kwargs.update(token_url=token_uri)
return self.__class__(**kwargs)
+ @_helpers.copy_docstring(credentials.CredentialsWithUniverseDomain)
+ def with_universe_domain(self, universe_domain):
+ kwargs = self.constructor_args()
+ kwargs.update(universe_domain=universe_domain)
+ return self.__class__(**kwargs)
+
@classmethod
def from_info(cls, info, **kwargs):
"""Creates a Credentials instance from parsed external account info.
diff --git a/contrib/python/google-auth/py3/google/auth/impersonated_credentials.py b/contrib/python/google-auth/py3/google/auth/impersonated_credentials.py
index c272a3ca28..d32e6eb69a 100644
--- a/contrib/python/google-auth/py3/google/auth/impersonated_credentials.py
+++ b/contrib/python/google-auth/py3/google/auth/impersonated_credentials.py
@@ -259,7 +259,10 @@ class Credentials(
"""
# Refresh our source credentials if it is not valid.
- if not self._source_credentials.valid:
+ if (
+ self._source_credentials.token_state == credentials.TokenState.STALE
+ or self._source_credentials.token_state == credentials.TokenState.INVALID
+ ):
self._source_credentials.refresh(request)
body = {
diff --git a/contrib/python/google-auth/py3/google/auth/version.py b/contrib/python/google-auth/py3/google/auth/version.py
index 31cc30242a..1c94c2f5f6 100644
--- a/contrib/python/google-auth/py3/google/auth/version.py
+++ b/contrib/python/google-auth/py3/google/auth/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "2.25.2"
+__version__ = "2.26.1"
diff --git a/contrib/python/google-auth/py3/google/oauth2/credentials.py b/contrib/python/google-auth/py3/google/oauth2/credentials.py
index a5c93ecc2f..41f4a05bb6 100644
--- a/contrib/python/google-auth/py3/google/oauth2/credentials.py
+++ b/contrib/python/google-auth/py3/google/oauth2/credentials.py
@@ -160,7 +160,11 @@ class Credentials(credentials.ReadOnlyScoped, credentials.CredentialsWithQuotaPr
# unpickling certain callables (lambda, functools.partial instances)
# because they need to be importable.
# Instead, the refresh_handler setter should be used to repopulate this.
- del state_dict["_refresh_handler"]
+ if "_refresh_handler" in state_dict:
+ del state_dict["_refresh_handler"]
+
+ if "_refresh_worker" in state_dict:
+ del state_dict["_refresh_worker"]
return state_dict
def __setstate__(self, d):
@@ -183,6 +187,8 @@ class Credentials(credentials.ReadOnlyScoped, credentials.CredentialsWithQuotaPr
self._universe_domain = d.get("_universe_domain") or _DEFAULT_UNIVERSE_DOMAIN
# The refresh_handler setter should be used to repopulate this.
self._refresh_handler = None
+ self._refresh_worker = None
+ self._use_non_blocking_refresh = d.get("_use_non_blocking_refresh", False)
@property
def refresh_token(self):
@@ -302,15 +308,8 @@ class Credentials(credentials.ReadOnlyScoped, credentials.CredentialsWithQuotaPr
universe_domain=self._universe_domain,
)
+ @_helpers.copy_docstring(credentials.CredentialsWithUniverseDomain)
def with_universe_domain(self, universe_domain):
- """Create a copy of the credential with the given universe domain.
-
- Args:
- universe_domain (str): The universe domain value.
-
- Returns:
- google.oauth2.credentials.Credentials: A new credentials instance.
- """
return self.__class__(
self.token,
diff --git a/contrib/python/google-auth/py3/google/oauth2/service_account.py b/contrib/python/google-auth/py3/google/oauth2/service_account.py
index 68db41af40..4502c6f68c 100644
--- a/contrib/python/google-auth/py3/google/oauth2/service_account.py
+++ b/contrib/python/google-auth/py3/google/oauth2/service_account.py
@@ -325,16 +325,8 @@ class Credentials(
cred._always_use_jwt_access = always_use_jwt_access
return cred
+ @_helpers.copy_docstring(credentials.CredentialsWithUniverseDomain)
def with_universe_domain(self, universe_domain):
- """Create a copy of these credentials with the given universe domain.
-
- Args:
- universe_domain (str): The universe domain value.
-
- Returns:
- google.auth.service_account.Credentials: A new credentials
- instance.
- """
cred = self._make_copy()
cred._universe_domain = universe_domain
if universe_domain != _DEFAULT_UNIVERSE_DOMAIN:
diff --git a/contrib/python/google-auth/py3/tests/oauth2/test_credentials.py b/contrib/python/google-auth/py3/tests/oauth2/test_credentials.py
index d6a1915862..5f1dcf3cbf 100644
--- a/contrib/python/google-auth/py3/tests/oauth2/test_credentials.py
+++ b/contrib/python/google-auth/py3/tests/oauth2/test_credentials.py
@@ -24,6 +24,7 @@ import pytest # type: ignore
from google.auth import _helpers
from google.auth import exceptions
from google.auth import transport
+from google.auth.credentials import TokenState
from google.oauth2 import credentials
@@ -62,6 +63,7 @@ class TestCredentials(object):
assert not credentials.expired
# Scopes aren't required for these credentials
assert not credentials.requires_scopes
+ assert credentials.token_state == TokenState.INVALID
# Test properties
assert credentials.refresh_token == self.REFRESH_TOKEN
assert credentials.token_uri == self.TOKEN_URI
@@ -912,7 +914,11 @@ class TestCredentials(object):
assert list(creds.__dict__).sort() == list(unpickled.__dict__).sort()
for attr in list(creds.__dict__):
- assert getattr(creds, attr) == getattr(unpickled, attr)
+ # Worker should always be None
+ if attr == "_refresh_worker":
+ assert getattr(unpickled, attr) is None
+ else:
+ assert getattr(creds, attr) == getattr(unpickled, attr)
def test_pickle_and_unpickle_universe_domain(self):
# old version of auth lib doesn't have _universe_domain, so the pickled
@@ -946,7 +952,7 @@ class TestCredentials(object):
for attr in list(creds.__dict__):
# For the _refresh_handler property, the unpickled creds should be
# set to None.
- if attr == "_refresh_handler":
+ if attr == "_refresh_handler" or attr == "_refresh_worker":
assert getattr(unpickled, attr) is None
else:
assert getattr(creds, attr) == getattr(unpickled, attr)
@@ -958,6 +964,8 @@ class TestCredentials(object):
# this mimics a pickle created with a previous class definition with
# fewer attributes
del creds.__dict__["_quota_project_id"]
+ del creds.__dict__["_refresh_handler"]
+ del creds.__dict__["_refresh_worker"]
unpickled = pickle.loads(pickle.dumps(creds))
diff --git a/contrib/python/google-auth/py3/tests/test__refresh_worker.py b/contrib/python/google-auth/py3/tests/test__refresh_worker.py
new file mode 100644
index 0000000000..f842b02cac
--- /dev/null
+++ b/contrib/python/google-auth/py3/tests/test__refresh_worker.py
@@ -0,0 +1,156 @@
+# Copyright 2023 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import pickle
+import random
+import threading
+import time
+
+import mock
+import pytest # type: ignore
+
+from google.auth import _refresh_worker, credentials, exceptions
+
+MAIN_THREAD_SLEEP_MS = 100 / 1000
+
+
+class MockCredentialsImpl(credentials.Credentials):
+ def __init__(self, sleep_seconds=None):
+ self.refresh_count = 0
+ self.token = None
+ self.sleep_seconds = sleep_seconds if sleep_seconds else None
+
+ def refresh(self, request):
+ if self.sleep_seconds:
+ time.sleep(self.sleep_seconds)
+ self.token = request
+ self.refresh_count += 1
+
+
+@pytest.fixture
+def test_thread_count():
+ return 25
+
+
+def _cred_spinlock(cred):
+ while cred.token is None: # pragma: NO COVER
+ time.sleep(MAIN_THREAD_SLEEP_MS)
+
+
+def test_invalid_start_refresh():
+ w = _refresh_worker.RefreshThreadManager()
+ with pytest.raises(exceptions.InvalidValue):
+ w.start_refresh(None, None)
+
+
+def test_start_refresh():
+ w = _refresh_worker.RefreshThreadManager()
+ cred = MockCredentialsImpl()
+ request = mock.MagicMock()
+ assert w.start_refresh(cred, request)
+
+ assert w._worker is not None
+
+ _cred_spinlock(cred)
+
+ assert cred.token == request
+ assert cred.refresh_count == 1
+
+
+def test_nonblocking_start_refresh():
+ w = _refresh_worker.RefreshThreadManager()
+ cred = MockCredentialsImpl(sleep_seconds=1)
+ request = mock.MagicMock()
+ assert w.start_refresh(cred, request)
+
+ assert w._worker is not None
+ assert not cred.token
+ assert cred.refresh_count == 0
+
+
+def test_multiple_refreshes_multiple_workers(test_thread_count):
+ w = _refresh_worker.RefreshThreadManager()
+ cred = MockCredentialsImpl()
+ request = mock.MagicMock()
+
+ def _thread_refresh():
+ time.sleep(random.randrange(0, 5))
+ assert w.start_refresh(cred, request)
+
+ threads = [
+ threading.Thread(target=_thread_refresh) for _ in range(test_thread_count)
+ ]
+ for t in threads:
+ t.start()
+
+ _cred_spinlock(cred)
+
+ assert cred.token == request
+ # There is a chance only one thread has enough time to perform a refresh.
+ # Generally multiple threads will have time to perform a refresh
+ assert cred.refresh_count > 0
+
+
+def test_refresh_error():
+ w = _refresh_worker.RefreshThreadManager()
+ cred = mock.MagicMock()
+ request = mock.MagicMock()
+
+ cred.refresh.side_effect = exceptions.RefreshError("Failed to refresh")
+
+ assert w.start_refresh(cred, request)
+
+ while w._worker._error_info is None: # pragma: NO COVER
+ time.sleep(MAIN_THREAD_SLEEP_MS)
+
+ assert w._worker is not None
+ assert isinstance(w._worker._error_info, exceptions.RefreshError)
+
+
+def test_refresh_error_call_refresh_again():
+ w = _refresh_worker.RefreshThreadManager()
+ cred = mock.MagicMock()
+ request = mock.MagicMock()
+
+ cred.refresh.side_effect = exceptions.RefreshError("Failed to refresh")
+
+ assert w.start_refresh(cred, request)
+
+ while w._worker._error_info is None: # pragma: NO COVER
+ time.sleep(MAIN_THREAD_SLEEP_MS)
+
+ assert not w.start_refresh(cred, request)
+
+
+def test_refresh_dead_worker():
+ cred = MockCredentialsImpl()
+ request = mock.MagicMock()
+
+ w = _refresh_worker.RefreshThreadManager()
+ w._worker = None
+
+ w.start_refresh(cred, request)
+
+ _cred_spinlock(cred)
+
+ assert cred.token == request
+ assert cred.refresh_count == 1
+
+
+def test_pickle():
+ w = _refresh_worker.RefreshThreadManager()
+
+ pickled_manager = pickle.dumps(w)
+ manager = pickle.loads(pickled_manager)
+ assert isinstance(manager, _refresh_worker.RefreshThreadManager)
diff --git a/contrib/python/google-auth/py3/tests/test_credentials.py b/contrib/python/google-auth/py3/tests/test_credentials.py
index d64f3abb50..8e6bbc9633 100644
--- a/contrib/python/google-auth/py3/tests/test_credentials.py
+++ b/contrib/python/google-auth/py3/tests/test_credentials.py
@@ -14,6 +14,7 @@
import datetime
+import mock
import pytest # type: ignore
from google.auth import _helpers
@@ -23,6 +24,11 @@ from google.auth import credentials
class CredentialsImpl(credentials.Credentials):
def refresh(self, request):
self.token = request
+ self.expiry = (
+ datetime.datetime.utcnow()
+ + _helpers.REFRESH_THRESHOLD
+ + datetime.timedelta(seconds=5)
+ )
def with_quota_project(self, quota_project_id):
raise NotImplementedError()
@@ -43,6 +49,13 @@ def test_credentials_constructor():
assert not credentials.expired
assert not credentials.valid
assert credentials.universe_domain == "googleapis.com"
+ assert not credentials._use_non_blocking_refresh
+
+
+def test_with_non_blocking_refresh():
+ c = CredentialsImpl()
+ c.with_non_blocking_refresh()
+ assert c._use_non_blocking_refresh
def test_expired_and_valid():
@@ -220,3 +233,108 @@ def test_create_scoped_if_required_not_scopes():
)
assert scoped_credentials is unscoped_credentials
+
+
+def test_nonblocking_refresh_fresh_credentials():
+ c = CredentialsImpl()
+
+ c._refresh_worker = mock.MagicMock()
+
+ request = "token"
+
+ c.refresh(request)
+ assert c.token_state == credentials.TokenState.FRESH
+
+ c.with_non_blocking_refresh()
+ c.before_request(request, "http://example.com", "GET", {})
+
+
+def test_nonblocking_refresh_invalid_credentials():
+ c = CredentialsImpl()
+ c.with_non_blocking_refresh()
+
+ request = "token"
+ headers = {}
+
+ assert c.token_state == credentials.TokenState.INVALID
+
+ c.before_request(request, "http://example.com", "GET", headers)
+ assert c.token_state == credentials.TokenState.FRESH
+ assert c.valid
+ assert c.token == "token"
+ assert headers["authorization"] == "Bearer token"
+ assert "x-identity-trust-boundary" not in headers
+
+
+def test_nonblocking_refresh_stale_credentials():
+ c = CredentialsImpl()
+ c.with_non_blocking_refresh()
+
+ request = "token"
+ headers = {}
+
+ # Invalid credentials MUST require a blocking refresh.
+ c.before_request(request, "http://example.com", "GET", headers)
+ assert c.token_state == credentials.TokenState.FRESH
+ assert not c._refresh_worker._worker
+
+ c.expiry = (
+ datetime.datetime.utcnow()
+ + _helpers.REFRESH_THRESHOLD
+ - datetime.timedelta(seconds=1)
+ )
+
+ # STALE credentials SHOULD spawn a non-blocking worker
+ assert c.token_state == credentials.TokenState.STALE
+ c.before_request(request, "http://example.com", "GET", headers)
+ assert c._refresh_worker._worker is not None
+
+ assert c.token_state == credentials.TokenState.FRESH
+ assert c.valid
+ assert c.token == "token"
+ assert headers["authorization"] == "Bearer token"
+ assert "x-identity-trust-boundary" not in headers
+
+
+def test_nonblocking_refresh_failed_credentials():
+ c = CredentialsImpl()
+ c.with_non_blocking_refresh()
+
+ request = "token"
+ headers = {}
+
+ # Invalid credentials MUST require a blocking refresh.
+ c.before_request(request, "http://example.com", "GET", headers)
+ assert c.token_state == credentials.TokenState.FRESH
+ assert not c._refresh_worker._worker
+
+ c.expiry = (
+ datetime.datetime.utcnow()
+ + _helpers.REFRESH_THRESHOLD
+ - datetime.timedelta(seconds=1)
+ )
+
+ # STALE credentials SHOULD spawn a non-blocking worker
+ assert c.token_state == credentials.TokenState.STALE
+ c._refresh_worker._worker = mock.MagicMock()
+ c._refresh_worker._worker._error_info = "Some Error"
+ c.before_request(request, "http://example.com", "GET", headers)
+ assert c._refresh_worker._worker is not None
+
+ assert c.token_state == credentials.TokenState.FRESH
+ assert c.valid
+ assert c.token == "token"
+ assert headers["authorization"] == "Bearer token"
+ assert "x-identity-trust-boundary" not in headers
+
+
+def test_token_state_no_expiry():
+ c = CredentialsImpl()
+
+ request = "token"
+ c.refresh(request)
+
+ c.expiry = None
+ assert c.token_state == credentials.TokenState.FRESH
+
+ c.before_request(request, "http://example.com", "GET", {})
diff --git a/contrib/python/google-auth/py3/tests/test_downscoped.py b/contrib/python/google-auth/py3/tests/test_downscoped.py
index b011380bdb..8cc2a30d16 100644
--- a/contrib/python/google-auth/py3/tests/test_downscoped.py
+++ b/contrib/python/google-auth/py3/tests/test_downscoped.py
@@ -25,6 +25,7 @@ from google.auth import credentials
from google.auth import downscoped
from google.auth import exceptions
from google.auth import transport
+from google.auth.credentials import TokenState
EXPRESSION = (
@@ -676,6 +677,7 @@ class TestCredentials(object):
assert credentials.valid
assert not credentials.expired
+ assert credentials.token_state == TokenState.FRESH
credentials.before_request(request, "POST", "https://example.com/api", headers)
@@ -687,8 +689,24 @@ class TestCredentials(object):
assert not credentials.valid
assert credentials.expired
+ assert credentials.token_state == TokenState.STALE
credentials.before_request(request, "POST", "https://example.com/api", headers)
+ assert credentials.token_state == TokenState.FRESH
+
+ # New token should be retrieved.
+ assert headers == {
+ "authorization": "Bearer {}".format(SUCCESS_RESPONSE["access_token"])
+ }
+
+ utcnow.return_value = datetime.datetime.min + datetime.timedelta(seconds=6000)
+
+ assert not credentials.valid
+ assert credentials.expired
+ assert credentials.token_state == TokenState.INVALID
+
+ credentials.before_request(request, "POST", "https://example.com/api", headers)
+ assert credentials.token_state == TokenState.FRESH
# New token should be retrieved.
assert headers == {
diff --git a/contrib/python/google-auth/py3/tests/test_external_account.py b/contrib/python/google-auth/py3/tests/test_external_account.py
index 5225dcf342..7f33b1dfa2 100644
--- a/contrib/python/google-auth/py3/tests/test_external_account.py
+++ b/contrib/python/google-auth/py3/tests/test_external_account.py
@@ -24,6 +24,7 @@ from google.auth import _helpers
from google.auth import exceptions
from google.auth import external_account
from google.auth import transport
+from google.auth.credentials import TokenState
IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE = (
@@ -1494,6 +1495,7 @@ class TestCredentials(object):
assert credentials.valid
assert not credentials.expired
+ assert credentials.token_state == TokenState.FRESH
credentials.before_request(request, "POST", "https://example.com/api", headers)
@@ -1508,8 +1510,10 @@ class TestCredentials(object):
assert not credentials.valid
assert credentials.expired
+ assert credentials.token_state == TokenState.STALE
credentials.before_request(request, "POST", "https://example.com/api", headers)
+ assert credentials.token_state == TokenState.FRESH
# New token should be retrieved.
assert headers == {
@@ -1551,8 +1555,10 @@ class TestCredentials(object):
assert credentials.valid
assert not credentials.expired
+ assert credentials.token_state == TokenState.FRESH
credentials.before_request(request, "POST", "https://example.com/api", headers)
+ assert credentials.token_state == TokenState.FRESH
# Cached token should be used.
assert headers == {
@@ -1566,6 +1572,10 @@ class TestCredentials(object):
assert not credentials.valid
assert credentials.expired
+ assert credentials.token_state == TokenState.STALE
+
+ credentials.before_request(request, "POST", "https://example.com/api", headers)
+ assert credentials.token_state == TokenState.FRESH
credentials.before_request(request, "POST", "https://example.com/api", headers)
diff --git a/contrib/python/google-auth/py3/tests/test_external_account_authorized_user.py b/contrib/python/google-auth/py3/tests/test_external_account_authorized_user.py
index 7ffd5078c8..7213a23486 100644
--- a/contrib/python/google-auth/py3/tests/test_external_account_authorized_user.py
+++ b/contrib/python/google-auth/py3/tests/test_external_account_authorized_user.py
@@ -44,6 +44,8 @@ CLIENT_SECRET = "password"
BASIC_AUTH_ENCODING = "dXNlcm5hbWU6cGFzc3dvcmQ="
SCOPES = ["email", "profile"]
NOW = datetime.datetime(1990, 8, 27, 6, 54, 30)
+FAKE_UNIVERSE_DOMAIN = "fake-universe-domain"
+DEFAULT_UNIVERSE_DOMAIN = external_account_authorized_user._DEFAULT_UNIVERSE_DOMAIN
class TestCredentials(object):
@@ -98,6 +100,7 @@ class TestCredentials(object):
assert creds.refresh_token == REFRESH_TOKEN
assert creds.audience == AUDIENCE
assert creds.token_url == TOKEN_URL
+ assert creds.universe_domain == DEFAULT_UNIVERSE_DOMAIN
def test_basic_create(self):
creds = external_account_authorized_user.Credentials(
@@ -105,6 +108,7 @@ class TestCredentials(object):
expiry=datetime.datetime.max,
scopes=SCOPES,
revoke_url=REVOKE_URL,
+ universe_domain=FAKE_UNIVERSE_DOMAIN,
)
assert creds.expiry == datetime.datetime.max
@@ -115,6 +119,7 @@ class TestCredentials(object):
assert creds.scopes == SCOPES
assert creds.is_user
assert creds.revoke_url == REVOKE_URL
+ assert creds.universe_domain == FAKE_UNIVERSE_DOMAIN
def test_stunted_create_no_refresh_token(self):
with pytest.raises(ValueError) as excinfo:
@@ -339,6 +344,7 @@ class TestCredentials(object):
assert info["token_info_url"] == TOKEN_INFO_URL
assert info["client_id"] == CLIENT_ID
assert info["client_secret"] == CLIENT_SECRET
+ assert info["universe_domain"] == DEFAULT_UNIVERSE_DOMAIN
assert "token" not in info
assert "expiry" not in info
assert "revoke_url" not in info
@@ -350,6 +356,7 @@ class TestCredentials(object):
expiry=NOW,
revoke_url=REVOKE_URL,
quota_project_id=QUOTA_PROJECT_ID,
+ universe_domain=FAKE_UNIVERSE_DOMAIN,
)
info = creds.info
@@ -363,6 +370,7 @@ class TestCredentials(object):
assert info["expiry"] == NOW.isoformat() + "Z"
assert info["revoke_url"] == REVOKE_URL
assert info["quota_project_id"] == QUOTA_PROJECT_ID
+ assert info["universe_domain"] == FAKE_UNIVERSE_DOMAIN
def test_to_json(self):
creds = self.make_credentials()
@@ -375,6 +383,7 @@ class TestCredentials(object):
assert info["token_info_url"] == TOKEN_INFO_URL
assert info["client_id"] == CLIENT_ID
assert info["client_secret"] == CLIENT_SECRET
+ assert info["universe_domain"] == DEFAULT_UNIVERSE_DOMAIN
assert "token" not in info
assert "expiry" not in info
assert "revoke_url" not in info
@@ -386,6 +395,7 @@ class TestCredentials(object):
expiry=NOW,
revoke_url=REVOKE_URL,
quota_project_id=QUOTA_PROJECT_ID,
+ universe_domain=FAKE_UNIVERSE_DOMAIN,
)
json_info = creds.to_json()
info = json.loads(json_info)
@@ -400,6 +410,7 @@ class TestCredentials(object):
assert info["expiry"] == NOW.isoformat() + "Z"
assert info["revoke_url"] == REVOKE_URL
assert info["quota_project_id"] == QUOTA_PROJECT_ID
+ assert info["universe_domain"] == FAKE_UNIVERSE_DOMAIN
def test_to_json_full_with_strip(self):
creds = self.make_credentials(
@@ -467,6 +478,26 @@ class TestCredentials(object):
assert new_creds._revoke_url == creds._revoke_url
assert new_creds._quota_project_id == creds._quota_project_id
+ def test_with_universe_domain(self):
+ creds = self.make_credentials(
+ token=ACCESS_TOKEN,
+ expiry=NOW,
+ revoke_url=REVOKE_URL,
+ quota_project_id=QUOTA_PROJECT_ID,
+ )
+ new_creds = creds.with_universe_domain(FAKE_UNIVERSE_DOMAIN)
+ assert new_creds._audience == creds._audience
+ assert new_creds._refresh_token == creds._refresh_token
+ assert new_creds._token_url == creds._token_url
+ assert new_creds._token_info_url == creds._token_info_url
+ assert new_creds._client_id == creds._client_id
+ assert new_creds._client_secret == creds._client_secret
+ assert new_creds.token == creds.token
+ assert new_creds.expiry == creds.expiry
+ assert new_creds._revoke_url == creds._revoke_url
+ assert new_creds._quota_project_id == QUOTA_PROJECT_ID
+ assert new_creds.universe_domain == FAKE_UNIVERSE_DOMAIN
+
def test_from_file_required_options_only(self, tmpdir):
from_creds = self.make_credentials()
config_file = tmpdir.join("config.json")
diff --git a/contrib/python/google-auth/py3/tests/test_impersonated_credentials.py b/contrib/python/google-auth/py3/tests/test_impersonated_credentials.py
index 9696e823ff..7295bba429 100644
--- a/contrib/python/google-auth/py3/tests/test_impersonated_credentials.py
+++ b/contrib/python/google-auth/py3/tests/test_impersonated_credentials.py
@@ -243,7 +243,7 @@ class TestImpersonatedCredentials(object):
request_kwargs = request.call_args[1]
assert request_kwargs["url"] == self.IAM_ENDPOINT_OVERRIDE
- @pytest.mark.parametrize("time_skew", [100, -100])
+ @pytest.mark.parametrize("time_skew", [150, -150])
def test_refresh_source_credentials(self, time_skew):
credentials = self.make_credentials(lifetime=None)
diff --git a/contrib/python/google-auth/py3/ya.make b/contrib/python/google-auth/py3/ya.make
index ec71907cc6..75848da971 100644
--- a/contrib/python/google-auth/py3/ya.make
+++ b/contrib/python/google-auth/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(2.25.2)
+VERSION(2.26.1)
LICENSE(Apache-2.0)
@@ -34,6 +34,7 @@ PY_SRCS(
google/auth/_helpers.py
google/auth/_jwt_async.py
google/auth/_oauth2client.py
+ google/auth/_refresh_worker.py
google/auth/_service_account_info.py
google/auth/api_key.py
google/auth/app_engine.py
diff --git a/contrib/python/pg8000/.dist-info/METADATA b/contrib/python/pg8000/.dist-info/METADATA
index 3511e11a2a..93aec222db 100644
--- a/contrib/python/pg8000/.dist-info/METADATA
+++ b/contrib/python/pg8000/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pg8000
-Version: 1.30.3
+Version: 1.30.4
Summary: PostgreSQL interface library
License: BSD 3-Clause License
Project-URL: Homepage, https://github.com/tlocke/pg8000
@@ -39,7 +39,7 @@ pg8000
pg8000 is a pure-`Python <https://www.python.org/>`_
`PostgreSQL <http://www.postgresql.org/>`_ driver that complies with
`DB-API 2.0 <http://www.python.org/dev/peps/pep-0249/>`_. It is tested on Python
-versions 3.8+, on CPython and PyPy, and PostgreSQL versions 11+. pg8000's name comes
+versions 3.8+, on CPython and PyPy, and PostgreSQL versions 12+. pg8000's name comes
from the belief that it is probably about the 8000th PostgreSQL interface for Python.
pg8000 is distributed under the BSD 3-clause license.
@@ -303,9 +303,7 @@ PostgreSQL `notices
<https://www.postgresql.org/docs/current/static/plpgsql-errors-and-messages.html>`_ are
stored in a deque called ``Connection.notices`` and added using the ``append()``
method. Similarly there are ``Connection.notifications`` for `notifications
-<https://www.postgresql.org/docs/current/static/sql-notify.html>`_ and
-``Connection.parameter_statuses`` for changes to the server configuration. Here's an
-example:
+<https://www.postgresql.org/docs/current/static/sql-notify.html>`_. Here's an example:
>>> import pg8000.native
>>>
@@ -321,6 +319,26 @@ example:
>>> con.close()
+Parameter Statuses
+``````````````````
+
+`Certain parameter values are reported by the server automatically at connection startup or whenever
+their values change
+<https://www.postgresql.org/docs/current/libpq-status.html#LIBPQ-PQPARAMETERSTATUS>`_ and pg8000
+stores the latest values in a dict called ``Connection.parameter_statuses``. Here's an example where
+we set the ``aplication_name`` parameter and then read it from the ``parameter_statuses``:
+
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection(
+... "postgres", password="cpsnow", application_name='AGI')
+>>>
+>>> con.parameter_statuses['application_name']
+'AGI'
+>>>
+>>> con.close()
+
+
LIMIT ALL
`````````
@@ -667,7 +685,7 @@ the server:
>>>
>>> con.run("SELECT :v IS NULL", v=None)
Traceback (most recent call last):
-pg8000.exceptions.DatabaseError: {'S': 'ERROR', 'V': 'ERROR', 'C': '42P18', 'M': 'could not determine data type of parameter $1', 'F': 'postgres.c', 'L': '...', 'R': 'exec_parse_message'}
+pg8000.exceptions.DatabaseError: {'S': 'ERROR', 'V': 'ERROR', 'C': '42P18', 'M': 'could not determine data type of parameter $1', 'F': 'postgres.c', 'L': '...', 'R': '...'}
>>>
>>> con.close()
@@ -889,7 +907,7 @@ the ``replication`` keyword when creating a connection:
... 'postgres', password="cpsnow", replication="database")
>>>
>>> con.run("IDENTIFY_SYSTEM")
-[['...', 1, '0/...', 'postgres']]
+[['...', 1, '.../...', 'postgres']]
>>>
>>> con.close()
@@ -2240,6 +2258,14 @@ Run ``tox`` to make sure all tests pass, then update the release notes, then do:
Release Notes
-------------
+Version 1.30.4, 2024-01-03
+``````````````````````````
+
+- Add support for more range and multirange types.
+
+- Make the ``Connection.parameter_statuses`` property a ``dict`` rather than a ``dequeue``.
+
+
Version 1.30.3, 2023-10-31
``````````````````````````
diff --git a/contrib/python/pg8000/README.rst b/contrib/python/pg8000/README.rst
index 71e0fea751..ad8ea650f2 100644
--- a/contrib/python/pg8000/README.rst
+++ b/contrib/python/pg8000/README.rst
@@ -11,7 +11,7 @@ pg8000
pg8000 is a pure-`Python <https://www.python.org/>`_
`PostgreSQL <http://www.postgresql.org/>`_ driver that complies with
`DB-API 2.0 <http://www.python.org/dev/peps/pep-0249/>`_. It is tested on Python
-versions 3.8+, on CPython and PyPy, and PostgreSQL versions 11+. pg8000's name comes
+versions 3.8+, on CPython and PyPy, and PostgreSQL versions 12+. pg8000's name comes
from the belief that it is probably about the 8000th PostgreSQL interface for Python.
pg8000 is distributed under the BSD 3-clause license.
@@ -275,9 +275,7 @@ PostgreSQL `notices
<https://www.postgresql.org/docs/current/static/plpgsql-errors-and-messages.html>`_ are
stored in a deque called ``Connection.notices`` and added using the ``append()``
method. Similarly there are ``Connection.notifications`` for `notifications
-<https://www.postgresql.org/docs/current/static/sql-notify.html>`_ and
-``Connection.parameter_statuses`` for changes to the server configuration. Here's an
-example:
+<https://www.postgresql.org/docs/current/static/sql-notify.html>`_. Here's an example:
>>> import pg8000.native
>>>
@@ -293,6 +291,26 @@ example:
>>> con.close()
+Parameter Statuses
+``````````````````
+
+`Certain parameter values are reported by the server automatically at connection startup or whenever
+their values change
+<https://www.postgresql.org/docs/current/libpq-status.html#LIBPQ-PQPARAMETERSTATUS>`_ and pg8000
+stores the latest values in a dict called ``Connection.parameter_statuses``. Here's an example where
+we set the ``aplication_name`` parameter and then read it from the ``parameter_statuses``:
+
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection(
+... "postgres", password="cpsnow", application_name='AGI')
+>>>
+>>> con.parameter_statuses['application_name']
+'AGI'
+>>>
+>>> con.close()
+
+
LIMIT ALL
`````````
@@ -639,7 +657,7 @@ the server:
>>>
>>> con.run("SELECT :v IS NULL", v=None)
Traceback (most recent call last):
-pg8000.exceptions.DatabaseError: {'S': 'ERROR', 'V': 'ERROR', 'C': '42P18', 'M': 'could not determine data type of parameter $1', 'F': 'postgres.c', 'L': '...', 'R': 'exec_parse_message'}
+pg8000.exceptions.DatabaseError: {'S': 'ERROR', 'V': 'ERROR', 'C': '42P18', 'M': 'could not determine data type of parameter $1', 'F': 'postgres.c', 'L': '...', 'R': '...'}
>>>
>>> con.close()
@@ -861,7 +879,7 @@ the ``replication`` keyword when creating a connection:
... 'postgres', password="cpsnow", replication="database")
>>>
>>> con.run("IDENTIFY_SYSTEM")
-[['...', 1, '0/...', 'postgres']]
+[['...', 1, '.../...', 'postgres']]
>>>
>>> con.close()
@@ -2212,6 +2230,14 @@ Run ``tox`` to make sure all tests pass, then update the release notes, then do:
Release Notes
-------------
+Version 1.30.4, 2024-01-03
+``````````````````````````
+
+- Add support for more range and multirange types.
+
+- Make the ``Connection.parameter_statuses`` property a ``dict`` rather than a ``dequeue``.
+
+
Version 1.30.3, 2023-10-31
``````````````````````````
diff --git a/contrib/python/pg8000/pg8000/converters.py b/contrib/python/pg8000/pg8000/converters.py
index 1ce16480ee..73392a94be 100644
--- a/contrib/python/pg8000/pg8000/converters.py
+++ b/contrib/python/pg8000/pg8000/converters.py
@@ -40,16 +40,22 @@ CSTRING_ARRAY = 1263
DATE = 1082
DATE_ARRAY = 1182
DATEMULTIRANGE = 4535
+DATEMULTIRANGE_ARRAY = 6155
DATERANGE = 3912
+DATERANGE_ARRAY = 3913
FLOAT = 701
FLOAT_ARRAY = 1022
INET = 869
INET_ARRAY = 1041
INT2VECTOR = 22
INT4MULTIRANGE = 4451
+INT4MULTIRANGE_ARRAY = 6150
INT4RANGE = 3904
+INT4RANGE_ARRAY = 3905
INT8MULTIRANGE = 4536
+INT8MULTIRANGE_ARRAY = 6157
INT8RANGE = 3926
+INT8RANGE_ARRAY = 3927
INTEGER = 23
INTEGER_ARRAY = 1007
INTERVAL = 1186
@@ -67,7 +73,9 @@ NAME_ARRAY = 1003
NUMERIC = 1700
NUMERIC_ARRAY = 1231
NUMRANGE = 3906
+NUMRANGE_ARRAY = 3907
NUMMULTIRANGE = 4532
+NUMMULTIRANGE_ARRAY = 6151
NULLTYPE = -1
OID = 26
POINT = 600
@@ -87,9 +95,13 @@ TIMESTAMP_ARRAY = 1115
TIMESTAMPTZ = 1184
TIMESTAMPTZ_ARRAY = 1185
TSMULTIRANGE = 4533
+TSMULTIRANGE_ARRAY = 6152
TSRANGE = 3908
+TSRANGE_ARRAY = 3909
TSTZMULTIRANGE = 4534
+TSTZMULTIRANGE_ARRAY = 6153
TSTZRANGE = 3910
+TSTZRANGE_ARRAY = 3911
UNKNOWN = 705
UUID_TYPE = 2950
UUID_ARRAY = 2951
@@ -291,6 +303,65 @@ def uuid_in(data):
return UUID(data)
+def _range_in(elem_func):
+ def range_in(data):
+ if data == "empty":
+ return Range(is_empty=True)
+ else:
+ le, ue = [None if v == "" else elem_func(v) for v in data[1:-1].split(",")]
+ return Range(le, ue, bounds=f"{data[0]}{data[-1]}")
+
+ return range_in
+
+
+daterange_in = _range_in(date_in)
+int4range_in = _range_in(int)
+int8range_in = _range_in(int)
+numrange_in = _range_in(Decimal)
+
+
+def ts_in(data):
+ return timestamp_in(data[1:-1])
+
+
+def tstz_in(data):
+ return timestamptz_in(data[1:-1])
+
+
+tsrange_in = _range_in(ts_in)
+tstzrange_in = _range_in(tstz_in)
+
+
+def _multirange_in(adapter):
+ def f(data):
+ in_range = False
+ result = []
+ val = []
+ for c in data:
+ if in_range:
+ val.append(c)
+ if c in "])":
+ value = "".join(val)
+ val.clear()
+ result.append(adapter(value))
+ in_range = False
+ elif c in "[(":
+ val.append(c)
+ in_range = True
+
+ return result
+
+ return f
+
+
+datemultirange_in = _multirange_in(daterange_in)
+int4multirange_in = _multirange_in(int4range_in)
+int8multirange_in = _multirange_in(int8range_in)
+nummultirange_in = _multirange_in(numrange_in)
+tsmultirange_in = _multirange_in(tsrange_in)
+tstzmultirange_in = _multirange_in(tstzrange_in)
+
+
class ParserState(Enum):
InString = 1
InEscape = 2
@@ -353,16 +424,28 @@ bool_array_in = _array_in(bool_in)
bytes_array_in = _array_in(bytes_in)
cidr_array_in = _array_in(cidr_in)
date_array_in = _array_in(date_in)
+datemultirange_array_in = _array_in(datemultirange_in)
+daterange_array_in = _array_in(daterange_in)
inet_array_in = _array_in(inet_in)
int_array_in = _array_in(int)
+int4multirange_array_in = _array_in(int4multirange_in)
+int4range_array_in = _array_in(int4range_in)
+int8multirange_array_in = _array_in(int8multirange_in)
+int8range_array_in = _array_in(int8range_in)
interval_array_in = _array_in(interval_in)
json_array_in = _array_in(json_in)
float_array_in = _array_in(float)
numeric_array_in = _array_in(numeric_in)
+nummultirange_array_in = _array_in(nummultirange_in)
+numrange_array_in = _array_in(numrange_in)
string_array_in = _array_in(string_in)
time_array_in = _array_in(time_in)
timestamp_array_in = _array_in(timestamp_in)
timestamptz_array_in = _array_in(timestamptz_in)
+tsrange_array_in = _array_in(tsrange_in)
+tsmultirange_array_in = _array_in(tsmultirange_in)
+tstzmultirange_array_in = _array_in(tstzmultirange_in)
+tstzrange_array_in = _array_in(tstzrange_in)
uuid_array_in = _array_in(uuid_in)
@@ -443,65 +526,6 @@ def composite_out(ar):
return f'({",".join(result)})'
-def _range_in(elem_func):
- def range_in(data):
- if data == "empty":
- return Range(is_empty=True)
- else:
- le, ue = [None if v == "" else elem_func(v) for v in data[1:-1].split(",")]
- return Range(le, ue, bounds=f"{data[0]}{data[-1]}")
-
- return range_in
-
-
-daterange_in = _range_in(date_in)
-int4range_in = _range_in(int)
-int8range_in = _range_in(int)
-numrange_in = _range_in(Decimal)
-
-
-def ts_in(data):
- return timestamp_in(data[1:-1])
-
-
-def tstz_in(data):
- return timestamptz_in(data[1:-1])
-
-
-tsrange_in = _range_in(ts_in)
-tstzrange_in = _range_in(tstz_in)
-
-
-def _multirange_in(adapter):
- def f(data):
- in_range = False
- result = []
- val = []
- for c in data:
- if in_range:
- val.append(c)
- if c in "])":
- value = "".join(val)
- val.clear()
- result.append(adapter(value))
- in_range = False
- elif c in "[(":
- val.append(c)
- in_range = True
-
- return result
-
- return f
-
-
-datemultirange_in = _multirange_in(daterange_in)
-int4multirange_in = _multirange_in(int4range_in)
-int8multirange_in = _multirange_in(int8range_in)
-nummultirange_in = _multirange_in(numrange_in)
-tsmultirange_in = _multirange_in(tsrange_in)
-tstzmultirange_in = _multirange_in(tstzrange_in)
-
-
def record_in(data):
state = ParserState.Out
results = []
@@ -605,15 +629,21 @@ PG_TYPES = {
DATE: date_in, # date
DATE_ARRAY: date_array_in, # date[]
DATEMULTIRANGE: datemultirange_in, # datemultirange
+ DATEMULTIRANGE_ARRAY: datemultirange_array_in, # datemultirange[]
DATERANGE: daterange_in, # daterange
+ DATERANGE_ARRAY: daterange_array_in, # daterange[]
FLOAT: float, # float8
FLOAT_ARRAY: float_array_in, # float8[]
INET: inet_in, # inet
INET_ARRAY: inet_array_in, # inet[]
INT4MULTIRANGE: int4multirange_in, # int4multirange
+ INT4MULTIRANGE_ARRAY: int4multirange_array_in, # int4multirange[]
INT4RANGE: int4range_in, # int4range
+ INT4RANGE_ARRAY: int4range_array_in, # int4range[]
INT8MULTIRANGE: int8multirange_in, # int8multirange
+ INT8MULTIRANGE_ARRAY: int8multirange_array_in, # int8multirange[]
INT8RANGE: int8range_in, # int8range
+ INT8RANGE_ARRAY: int8range_array_in, # int8range[]
INTEGER: int, # int4
INTEGER_ARRAY: int_array_in, # int4[]
JSON: json_in, # json
@@ -628,7 +658,9 @@ PG_TYPES = {
NUMERIC: numeric_in, # numeric
NUMERIC_ARRAY: numeric_array_in, # numeric[]
NUMRANGE: numrange_in, # numrange
+ NUMRANGE_ARRAY: numrange_array_in, # numrange[]
NUMMULTIRANGE: nummultirange_in, # nummultirange
+ NUMMULTIRANGE_ARRAY: nummultirange_array_in, # nummultirange[]
OID: int, # oid
POINT: point_in, # point
INTERVAL: interval_in, # interval
@@ -649,9 +681,13 @@ PG_TYPES = {
TIMESTAMPTZ: timestamptz_in, # timestamptz
TIMESTAMPTZ_ARRAY: timestamptz_array_in, # timestamptz
TSMULTIRANGE: tsmultirange_in, # tsmultirange
+ TSMULTIRANGE_ARRAY: tsmultirange_array_in, # tsmultirange[]
TSRANGE: tsrange_in, # tsrange
+ TSRANGE_ARRAY: tsrange_array_in, # tsrange[]
TSTZMULTIRANGE: tstzmultirange_in, # tstzmultirange
+ TSTZMULTIRANGE_ARRAY: tstzmultirange_array_in, # tstzmultirange[]
TSTZRANGE: tstzrange_in, # tstzrange
+ TSTZRANGE_ARRAY: tstzrange_array_in, # tstzrange[]
UNKNOWN: string_in, # unknown
UUID_ARRAY: uuid_array_in, # uuid[]
UUID_TYPE: uuid_in, # uuid
diff --git a/contrib/python/pg8000/pg8000/core.py b/contrib/python/pg8000/pg8000/core.py
index 54ef496ddd..3e55957755 100644
--- a/contrib/python/pg8000/pg8000/core.py
+++ b/contrib/python/pg8000/pg8000/core.py
@@ -277,7 +277,7 @@ class CoreConnection:
)
self.notifications = deque(maxlen=100)
self.notices = deque(maxlen=100)
- self.parameter_statuses = deque(maxlen=100)
+ self.parameter_statuses = {}
if user is None:
raise InterfaceError("The 'user' connection parameter cannot be None")
@@ -842,20 +842,20 @@ class CoreConnection:
def handle_PARAMETER_STATUS(self, data, context):
pos = data.find(NULL_BYTE)
- key, value = data[:pos], data[pos + 1 : -1]
- self.parameter_statuses.append((key, value))
- if key == b"client_encoding":
- encoding = value.decode("ascii").lower()
+ key, value = data[:pos].decode("ascii"), data[pos + 1 : -1].decode("ascii")
+ self.parameter_statuses[key] = value
+ if key == "client_encoding":
+ encoding = value.lower()
self._client_encoding = PG_PY_ENCODINGS.get(encoding, encoding)
- elif key == b"integer_datetimes":
- if value == b"on":
+ elif key == "integer_datetimes":
+ if value == "on":
pass
else:
pass
- elif key == b"server_version":
+ elif key == "server_version":
pass
diff --git a/contrib/python/pg8000/ya.make b/contrib/python/pg8000/ya.make
index 6172a19312..5067622704 100644
--- a/contrib/python/pg8000/ya.make
+++ b/contrib/python/pg8000/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(1.30.3)
+VERSION(1.30.4)
LICENSE(BSD-3-Clause)
diff --git a/contrib/python/traitlets/py3/.dist-info/METADATA b/contrib/python/traitlets/py3/.dist-info/METADATA
index 527825535a..5e9a9e1518 100644
--- a/contrib/python/traitlets/py3/.dist-info/METADATA
+++ b/contrib/python/traitlets/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: traitlets
-Version: 5.14.0
+Version: 5.14.1
Summary: Traitlets Python configuration system
Project-URL: Homepage, https://github.com/ipython/traitlets
Project-URL: Documentation, https://traitlets.readthedocs.io
diff --git a/contrib/python/traitlets/py3/tests/_warnings.py b/contrib/python/traitlets/py3/tests/_warnings.py
index 1fb6e9a9a5..3447fbef8a 100644
--- a/contrib/python/traitlets/py3/tests/_warnings.py
+++ b/contrib/python/traitlets/py3/tests/_warnings.py
@@ -1,5 +1,6 @@
# From scikit-image: https://github.com/scikit-image/scikit-image/blob/c2f8c4ab123ebe5f7b827bc495625a32bb225c10/skimage/_shared/_warnings.py
# Licensed under modified BSD license
+from __future__ import annotations
__all__ = ["all_warnings", "expected_warnings"]
diff --git a/contrib/python/traitlets/py3/tests/config/test_application.py b/contrib/python/traitlets/py3/tests/config/test_application.py
index 61ad751c6b..73d31432a4 100644
--- a/contrib/python/traitlets/py3/tests/config/test_application.py
+++ b/contrib/python/traitlets/py3/tests/config/test_application.py
@@ -4,6 +4,7 @@ Tests for traitlets.config.application.Application
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
+from __future__ import annotations
import contextlib
import io
@@ -17,7 +18,6 @@ from tempfile import TemporaryDirectory
from unittest import TestCase, mock
import pytest
-from pytest import mark
from traitlets import Bool, Bytes, Dict, HasTraits, Integer, List, Set, Tuple, Unicode
from traitlets.config.application import Application
@@ -551,7 +551,7 @@ class TestApplication(TestCase):
app.init_bar()
self.assertEqual(app.bar.b, 1)
- @mark.skipif(not hasattr(TestCase, "assertLogs"), reason="requires TestCase.assertLogs")
+ @pytest.mark.skipif(not hasattr(TestCase, "assertLogs"), reason="requires TestCase.assertLogs")
def test_log_collisions(self):
app = MyApp()
app.log = logging.getLogger()
@@ -572,7 +572,7 @@ class TestApplication(TestCase):
assert pjoin(td, name + ".py") in output
assert pjoin(td, name + ".json") in output
- @mark.skipif(not hasattr(TestCase, "assertLogs"), reason="requires TestCase.assertLogs")
+ @pytest.mark.skipif(not hasattr(TestCase, "assertLogs"), reason="requires TestCase.assertLogs")
def test_log_bad_config(self):
app = MyApp()
app.log = logging.getLogger()
@@ -670,7 +670,7 @@ class TestApplication(TestCase):
self.assertEqual(app.running, False)
-@mark.skip
+@pytest.mark.skip
def test_cli_multi_scalar(caplog):
class App(Application):
aliases = {"opt": "App.opt"}
@@ -855,7 +855,7 @@ def test_get_default_logging_config_pythonw(monkeypatch):
assert "loggers" in config
-@pytest.fixture
+@pytest.fixture()
def caplogconfig(monkeypatch):
"""Capture logging config events for DictConfigurator objects.
diff --git a/contrib/python/traitlets/py3/tests/config/test_argcomplete.py b/contrib/python/traitlets/py3/tests/config/test_argcomplete.py
index 0cd992c612..3f1ce482e8 100644
--- a/contrib/python/traitlets/py3/tests/config/test_argcomplete.py
+++ b/contrib/python/traitlets/py3/tests/config/test_argcomplete.py
@@ -4,6 +4,7 @@ Tests for argcomplete handling by traitlets.config.application.Application
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
+from __future__ import annotations
import io
import os
@@ -71,7 +72,7 @@ class TestArgcomplete:
IFS = "\013"
COMP_WORDBREAKS = " \t\n\"'><=;|&(:"
- @pytest.fixture
+ @pytest.fixture()
def argcomplete_on(self, mocker):
"""Mostly borrowed from argcomplete's unit test fixtures
@@ -119,7 +120,7 @@ class TestArgcomplete:
os.environ["COMP_LINE"] = command
os.environ["COMP_POINT"] = str(point)
- with pytest.raises(CustomError) as cm:
+ with pytest.raises(CustomError) as cm: # noqa: PT012
app.argcomplete_kwargs = dict(
output_stream=strio, exit_method=CustomError.exit, **kwargs
)
@@ -216,4 +217,5 @@ class TestArgcomplete:
app = MainApp()
completions = set(self.run_completer(app, "app --"))
assert completions > {"--Application.", "--MainApp."}
- assert "--SubApp1." not in completions and "--SubApp2." not in completions
+ assert "--SubApp1." not in completions
+ assert "--SubApp2." not in completions
diff --git a/contrib/python/traitlets/py3/tests/config/test_configurable.py b/contrib/python/traitlets/py3/tests/config/test_configurable.py
index f6499ea29d..f1e8ed74a3 100644
--- a/contrib/python/traitlets/py3/tests/config/test_configurable.py
+++ b/contrib/python/traitlets/py3/tests/config/test_configurable.py
@@ -2,11 +2,12 @@
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
+from __future__ import annotations
import logging
from unittest import TestCase
-from pytest import mark
+import pytest
from .._warnings import expected_warnings
from traitlets.config.application import Application
@@ -672,7 +673,7 @@ class TestLogger(TestCase):
bar = Integer(config=True)
baz = Integer(config=True)
- @mark.skipif(not hasattr(TestCase, "assertLogs"), reason="requires TestCase.assertLogs")
+ @pytest.mark.skipif(not hasattr(TestCase, "assertLogs"), reason="requires TestCase.assertLogs")
def test_warn_match(self):
logger = logging.getLogger("test_warn_match")
cfg = Config({"A": {"bat": 5}})
diff --git a/contrib/python/traitlets/py3/tests/config/test_loader.py b/contrib/python/traitlets/py3/tests/config/test_loader.py
index 9d864317bc..6e1510c2cd 100644
--- a/contrib/python/traitlets/py3/tests/config/test_loader.py
+++ b/contrib/python/traitlets/py3/tests/config/test_loader.py
@@ -2,6 +2,7 @@
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
+from __future__ import annotations
import copy
import os
@@ -123,9 +124,8 @@ class TestFileCL(TestCase):
with JSONFileConfigLoader(fname, log=log) as config:
config.A.b = 1
- with self.assertRaises(TypeError):
- with JSONFileConfigLoader(fname, log=log) as config:
- config.A.cant_json = lambda x: x
+ with self.assertRaises(TypeError), JSONFileConfigLoader(fname, log=log) as config:
+ config.A.cant_json = lambda x: x
loader = JSONFileConfigLoader(fname, log=log)
cfg = loader.load_config()
diff --git a/contrib/python/traitlets/py3/tests/test_traitlets.py b/contrib/python/traitlets/py3/tests/test_traitlets.py
index 07c95ca251..dfcf3f0f4b 100644
--- a/contrib/python/traitlets/py3/tests/test_traitlets.py
+++ b/contrib/python/traitlets/py3/tests/test_traitlets.py
@@ -5,6 +5,7 @@
#
# Adapted from enthought.traits, Copyright (c) Enthought, Inc.,
# also under the terms of the Modified BSD License.
+from __future__ import annotations
import pickle
import re
@@ -1254,7 +1255,7 @@ class TraitTestBase(TestCase):
try:
self.assertRaises(TraitError, self.assign, value)
except AssertionError:
- assert False, value
+ assert False, value # noqa: PT015
def test_default_value(self):
if hasattr(self, "_default_value"):
@@ -1784,7 +1785,7 @@ class TestMultiTuple(TraitTestBase):
@pytest.mark.parametrize(
"Trait",
- (
+ ( # noqa: PT007
List,
Tuple,
Set,
@@ -1808,7 +1809,7 @@ def test_allow_none_default_value(Trait):
@pytest.mark.parametrize(
"Trait, default_value",
- ((List, []), (Tuple, ()), (Set, set()), (Dict, {}), (Integer, 0), (Unicode, "")),
+ ((List, []), (Tuple, ()), (Set, set()), (Dict, {}), (Integer, 0), (Unicode, "")), # noqa: PT007
)
def test_default_value(Trait, default_value):
class C(HasTraits):
@@ -1822,7 +1823,7 @@ def test_default_value(Trait, default_value):
@pytest.mark.parametrize(
"Trait, default_value",
- ((List, []), (Tuple, ()), (Set, set())),
+ ((List, []), (Tuple, ()), (Set, set())), # noqa: PT007
)
def test_subclass_default_value(Trait, default_value):
"""Test deprecated default_value=None behavior for Container subclass traits"""
@@ -2150,7 +2151,7 @@ class TestLink(TestCase):
self.i = change.new * 2
mc = MyClass()
- l = link((mc, "i"), (mc, "j")) # noqa
+ l = link((mc, "i"), (mc, "j")) # noqa: E741
self.assertRaises(TraitError, setattr, mc, "i", 2)
def test_link_broken_at_target(self):
@@ -2163,7 +2164,7 @@ class TestLink(TestCase):
self.j = change.new * 2
mc = MyClass()
- l = link((mc, "i"), (mc, "j")) # noqa
+ l = link((mc, "i"), (mc, "j")) # noqa: E741
self.assertRaises(TraitError, setattr, mc, "j", 2)
@@ -2393,7 +2394,7 @@ class OrderTraits(HasTraits):
i = Unicode()
j = Unicode()
k = Unicode()
- l = Unicode() # noqa
+ l = Unicode() # noqa: E741
def _notify(self, name, old, new):
"""check the value of all traits when each trait change is triggered
@@ -2819,7 +2820,7 @@ def test_default_mro():
def test_cls_self_argument():
class X(HasTraits):
- def __init__(__self, cls, self): # noqa
+ def __init__(__self, cls, self):
pass
x = X(cls=None, self=None)
@@ -2889,7 +2890,7 @@ def _from_string_test(traittype, s, expected):
else:
cast = trait.from_string
if type(expected) is type and issubclass(expected, Exception):
- with pytest.raises(expected):
+ with pytest.raises(expected): # noqa: PT012
value = cast(s)
trait.validate(CrossValidationStub(), value) # type:ignore
else:
diff --git a/contrib/python/traitlets/py3/tests/test_traitlets_docstring.py b/contrib/python/traitlets/py3/tests/test_traitlets_docstring.py
index 700199108f..685ea71f69 100644
--- a/contrib/python/traitlets/py3/tests/test_traitlets_docstring.py
+++ b/contrib/python/traitlets/py3/tests/test_traitlets_docstring.py
@@ -3,6 +3,8 @@
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
#
+from __future__ import annotations
+
from traitlets import Dict, Instance, Integer, Unicode, Union
from traitlets.config import Configurable
diff --git a/contrib/python/traitlets/py3/tests/test_traitlets_enum.py b/contrib/python/traitlets/py3/tests/test_traitlets_enum.py
index c39007e8a0..ac19e9d519 100644
--- a/contrib/python/traitlets/py3/tests/test_traitlets_enum.py
+++ b/contrib/python/traitlets/py3/tests/test_traitlets_enum.py
@@ -2,6 +2,7 @@
"""
Test the trait-type ``UseEnum``.
"""
+from __future__ import annotations
import enum
import unittest
@@ -280,7 +281,7 @@ class TestFuzzyEnum(unittest.TestCase):
example = FuzzyExample()
for color in color_choices:
- for wlen in range(0, 2):
+ for wlen in range(2):
value = color[wlen:]
example.color = value
diff --git a/contrib/python/traitlets/py3/tests/utils/test_bunch.py b/contrib/python/traitlets/py3/tests/utils/test_bunch.py
index 223124d7d5..90efe98273 100644
--- a/contrib/python/traitlets/py3/tests/utils/test_bunch.py
+++ b/contrib/python/traitlets/py3/tests/utils/test_bunch.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from traitlets.utils.bunch import Bunch
diff --git a/contrib/python/traitlets/py3/tests/utils/test_decorators.py b/contrib/python/traitlets/py3/tests/utils/test_decorators.py
index d6bf8414e5..39b882c0ea 100644
--- a/contrib/python/traitlets/py3/tests/utils/test_decorators.py
+++ b/contrib/python/traitlets/py3/tests/utils/test_decorators.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from inspect import Parameter, signature
from unittest import TestCase
diff --git a/contrib/python/traitlets/py3/tests/utils/test_importstring.py b/contrib/python/traitlets/py3/tests/utils/test_importstring.py
index 8ce28add41..43fcdaaff2 100644
--- a/contrib/python/traitlets/py3/tests/utils/test_importstring.py
+++ b/contrib/python/traitlets/py3/tests/utils/test_importstring.py
@@ -4,6 +4,7 @@
# Adapted from enthought.traits, Copyright (c) Enthought, Inc.,
# also under the terms of the Modified BSD License.
"""Tests for traitlets.utils.importstring."""
+from __future__ import annotations
import os
from unittest import TestCase
diff --git a/contrib/python/traitlets/py3/traitlets/__init__.py b/contrib/python/traitlets/py3/traitlets/__init__.py
index 70ed818aca..e27ecf1a45 100644
--- a/contrib/python/traitlets/py3/traitlets/__init__.py
+++ b/contrib/python/traitlets/py3/traitlets/__init__.py
@@ -1,4 +1,6 @@
"""Traitlets Python configuration system"""
+from __future__ import annotations
+
import typing as _t
from . import traitlets
diff --git a/contrib/python/traitlets/py3/traitlets/_version.py b/contrib/python/traitlets/py3/traitlets/_version.py
index 7a5c6e1005..08221fa99f 100644
--- a/contrib/python/traitlets/py3/traitlets/_version.py
+++ b/contrib/python/traitlets/py3/traitlets/_version.py
@@ -1,11 +1,13 @@
"""
handle the current version info of traitlets.
"""
+from __future__ import annotations
+
import re
from typing import List
# Version string must appear intact for hatch versioning
-__version__ = "5.14.0"
+__version__ = "5.14.1"
# Build up version_info tuple for backwards compatibility
pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)"
diff --git a/contrib/python/traitlets/py3/traitlets/config/__init__.py b/contrib/python/traitlets/py3/traitlets/config/__init__.py
index 699b12b80a..e51a4219a0 100644
--- a/contrib/python/traitlets/py3/traitlets/config/__init__.py
+++ b/contrib/python/traitlets/py3/traitlets/config/__init__.py
@@ -1,16 +1,18 @@
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
+from __future__ import annotations
from .application import *
from .configurable import *
from .loader import Config
-__all__ = [ # noqa
+__all__ = [ # noqa: F405
"Config",
"Application",
"ApplicationError",
"LevelFormatter",
"configurable",
+ "Configurable",
"ConfigurableError",
"MultipleInstanceError",
"LoggingConfigurable",
diff --git a/contrib/python/traitlets/py3/traitlets/config/application.py b/contrib/python/traitlets/py3/traitlets/config/application.py
index 9a3fcc949e..b01a11e518 100644
--- a/contrib/python/traitlets/py3/traitlets/config/application.py
+++ b/contrib/python/traitlets/py3/traitlets/config/application.py
@@ -304,8 +304,7 @@ class Application(SingletonConfigurable):
return log
if not _log.propagate:
break
- else:
- _log = _log.parent # type:ignore[assignment]
+ _log = _log.parent # type:ignore[assignment]
return log
logging_config = Dict(
@@ -501,7 +500,7 @@ class Application(SingletonConfigurable):
if not class_config:
continue
print(classname)
- pformat_kwargs: StrDict = dict(indent=4, compact=True)
+ pformat_kwargs: StrDict = dict(indent=4, compact=True) # noqa: C408
for traitname in sorted(class_config):
value = class_config[traitname]
@@ -924,7 +923,7 @@ class Application(SingletonConfigurable):
if raise_config_file_errors:
raise
if log:
- log.error("Exception while loading config file %s", filename, exc_info=True)
+ log.error("Exception while loading config file %s", filename, exc_info=True) # noqa: G201
else:
if log:
log.debug("Loaded config file: %s", loader.full_filename)
@@ -933,7 +932,7 @@ class Application(SingletonConfigurable):
collisions = earlier_config.collisions(config)
if collisions and log:
log.warning(
- "Collisions detected in {0} and {1} config files."
+ "Collisions detected in {0} and {1} config files." # noqa: G001
" {1} has higher priority: {2}".format(
filename,
loader.full_filename,
@@ -974,8 +973,7 @@ class Application(SingletonConfigurable):
@catch_config_error
def load_config_environ(self) -> None:
"""Load config files by environment."""
-
- PREFIX = self.name.upper()
+ PREFIX = self.name.upper().replace("-", "_")
new_config = Config()
self.log.debug('Looping through config variables with prefix "%s"', PREFIX)
@@ -1059,7 +1057,7 @@ class Application(SingletonConfigurable):
self._logging_configured = False
def exit(self, exit_status: int | str | None = 0) -> None:
- self.log.debug("Exiting application: %s" % self.name)
+ self.log.debug("Exiting application: %s", self.name)
self.close_handlers()
sys.exit(exit_status)
diff --git a/contrib/python/traitlets/py3/traitlets/config/argcomplete_config.py b/contrib/python/traitlets/py3/traitlets/config/argcomplete_config.py
index 6c04fd5675..1f4cf1c787 100644
--- a/contrib/python/traitlets/py3/traitlets/config/argcomplete_config.py
+++ b/contrib/python/traitlets/py3/traitlets/config/argcomplete_config.py
@@ -2,7 +2,7 @@
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
-
+from __future__ import annotations
import argparse
import os
@@ -58,7 +58,7 @@ def get_argcomplete_cwords() -> t.Optional[t.List[str]]:
comp_words = comp_words[start:]
# argcomplete.debug("prequote=", cword_prequote, "prefix=", cword_prefix, "suffix=", cword_suffix, "words=", comp_words, "last=", last_wordbreak_pos)
- return comp_words
+ return comp_words # noqa: RET504
def increment_argcomplete_index() -> None:
diff --git a/contrib/python/traitlets/py3/traitlets/config/configurable.py b/contrib/python/traitlets/py3/traitlets/config/configurable.py
index 3e8c868ce0..44b4793ebd 100644
--- a/contrib/python/traitlets/py3/traitlets/config/configurable.py
+++ b/contrib/python/traitlets/py3/traitlets/config/configurable.py
@@ -324,7 +324,7 @@ class Configurable(HasTraits):
@classmethod
def class_print_help(cls, inst: HasTraits | None = None) -> None:
"""Get the help string for a single trait and print it."""
- print(cls.class_get_help(inst))
+ print(cls.class_get_help(inst)) # noqa: T201
@classmethod
def _defining_class(
diff --git a/contrib/python/traitlets/py3/traitlets/config/loader.py b/contrib/python/traitlets/py3/traitlets/config/loader.py
index 2b0932a98e..f9eb5fe191 100644
--- a/contrib/python/traitlets/py3/traitlets/config/loader.py
+++ b/contrib/python/traitlets/py3/traitlets/config/loader.py
@@ -31,7 +31,7 @@ class ConfigLoaderError(ConfigError):
pass
-class ConfigFileNotFound(ConfigError): # noqa
+class ConfigFileNotFound(ConfigError):
pass
@@ -79,7 +79,7 @@ class ArgumentParser(argparse.ArgumentParser):
def execfile(fname: str, glob: dict[str, Any]) -> None:
with open(fname, "rb") as f:
- exec(compile(f.read(), fname, "exec"), glob, glob) # noqa
+ exec(compile(f.read(), fname, "exec"), glob, glob) # noqa: S102
class LazyConfigValue(HasTraits):
@@ -218,10 +218,7 @@ class LazyConfigValue(HasTraits):
def _is_section_key(key: str) -> bool:
"""Is a Config key a section name (does it start with a capital)?"""
- if key and key[0].upper() == key[0] and not key.startswith("_"):
- return True
- else:
- return False
+ return bool(key and key[0].upper() == key[0] and not key.startswith("_"))
class Config(dict): # type:ignore[type-arg]
@@ -382,8 +379,6 @@ class Config(dict): # type:ignore[type-arg]
class DeferredConfig:
"""Class for deferred-evaluation of config from CLI"""
- pass
-
def get_value(self, trait: TraitType[t.Any, t.Any]) -> t.Any:
raise NotImplementedError("Implement in subclasses")
@@ -597,7 +592,7 @@ class JSONFileConfigLoader(FileConfigLoader):
self.load_config()
return self.config
- def __exit__(self, exc_type: t.Any, exc_value: t.Any, traceback: t.Any) -> None:
+ def __exit__(self, exc_type: object, exc_value: object, traceback: object) -> None:
"""
Exit the context manager but do not handle any errors.
@@ -649,7 +644,7 @@ class PyFileConfigLoader(FileConfigLoader):
"""Unnecessary now, but a deprecation warning is more trouble than it's worth."""
return self.config
- namespace = dict(
+ namespace = dict( # noqa: C408
c=self.config,
load_subconfig=self.load_subconfig,
get_config=get_config,
@@ -657,7 +652,7 @@ class PyFileConfigLoader(FileConfigLoader):
)
conf_filename = self.full_filename
with open(conf_filename, "rb") as f:
- exec(compile(f.read(), conf_filename, "exec"), namespace, namespace) # noqa
+ exec(compile(f.read(), conf_filename, "exec"), namespace, namespace) # noqa: S102
class CommandLineConfigLoader(ConfigLoader):
@@ -856,7 +851,7 @@ class ArgParseConfigLoader(CommandLineConfigLoader):
self.parser_args = parser_args
self.version = parser_kw.pop("version", None)
- kwargs = dict(argument_default=argparse.SUPPRESS)
+ kwargs = dict(argument_default=argparse.SUPPRESS) # noqa: C408
kwargs.update(parser_kw)
self.parser_kw = kwargs
@@ -919,7 +914,6 @@ class ArgParseConfigLoader(CommandLineConfigLoader):
def _argcomplete(self, classes: list[t.Any], subcommands: SubcommandsDict | None) -> None:
"""If argcomplete is enabled, allow triggering command-line autocompletion"""
- pass
def _parse_args(self, args: t.Any) -> t.Any:
"""self.parser->self.parsed_data"""
@@ -1089,7 +1083,7 @@ class KVArgParseConfigLoader(ArgParseConfigLoader):
if lhs == "extra_args":
self.extra_args = ["-" if a == _DASH_REPLACEMENT else a for a in rhs] + extra_args
continue
- elif lhs == "_flags":
+ if lhs == "_flags":
# _flags will be handled later
continue
@@ -1132,7 +1126,7 @@ class KVArgParseConfigLoader(ArgParseConfigLoader):
def _argcomplete(self, classes: list[t.Any], subcommands: SubcommandsDict | None) -> None:
"""If argcomplete is enabled, allow triggering command-line autocompletion"""
try:
- import argcomplete # noqa
+ import argcomplete # noqa: F401
except ImportError:
return
diff --git a/contrib/python/traitlets/py3/traitlets/config/manager.py b/contrib/python/traitlets/py3/traitlets/config/manager.py
index 9102544e50..f87b21e782 100644
--- a/contrib/python/traitlets/py3/traitlets/config/manager.py
+++ b/contrib/python/traitlets/py3/traitlets/config/manager.py
@@ -70,8 +70,7 @@ class BaseJSONConfigManager(LoggingConfigurable):
filename = self.file_name(section_name)
self.ensure_config_dir_exists()
- f = open(filename, "w", encoding="utf-8")
- with f:
+ with open(filename, "w", encoding="utf-8") as f:
json.dump(data, f, indent=2)
def update(self, section_name: str, new_data: Any) -> Any:
diff --git a/contrib/python/traitlets/py3/traitlets/config/sphinxdoc.py b/contrib/python/traitlets/py3/traitlets/config/sphinxdoc.py
index 635b6bdfa3..e4708a2270 100644
--- a/contrib/python/traitlets/py3/traitlets/config/sphinxdoc.py
+++ b/contrib/python/traitlets/py3/traitlets/config/sphinxdoc.py
@@ -50,8 +50,7 @@ def setup(app: t.Any) -> dict[str, t.Any]:
module instead.
"""
app.add_object_type("configtrait", "configtrait", objname="Config option")
- metadata = {"parallel_read_safe": True, "parallel_write_safe": True}
- return metadata
+ return {"parallel_read_safe": True, "parallel_write_safe": True}
def interesting_default_value(dv: t.Any) -> bool:
diff --git a/contrib/python/traitlets/py3/traitlets/log.py b/contrib/python/traitlets/py3/traitlets/log.py
index d90a9c5284..112b200442 100644
--- a/contrib/python/traitlets/py3/traitlets/log.py
+++ b/contrib/python/traitlets/py3/traitlets/log.py
@@ -16,7 +16,7 @@ def get_logger() -> logging.Logger | logging.LoggerAdapter[Any]:
If a global Application is instantiated, grab its logger.
Otherwise, grab the root logger.
"""
- global _logger
+ global _logger # noqa: PLW0603
if _logger is None:
from .config import Application
diff --git a/contrib/python/traitlets/py3/traitlets/tests/utils.py b/contrib/python/traitlets/py3/traitlets/tests/utils.py
index 9552a5c786..254d46a758 100644
--- a/contrib/python/traitlets/py3/traitlets/tests/utils.py
+++ b/contrib/python/traitlets/py3/traitlets/tests/utils.py
@@ -10,7 +10,7 @@ def get_output_error_code(cmd: str | Sequence[str]) -> tuple[str, str, Any]:
import os
env = os.environ.copy()
env["Y_PYTHON_ENTRY_POINT"] = ":main"
- p = Popen(cmd, stdout=PIPE, stderr=PIPE, env=env) # noqa
+ p = Popen(cmd, stdout=PIPE, stderr=PIPE, env=env) # noqa: S603
out, err = p.communicate()
out_str = out.decode("utf8", "replace")
err_str = err.decode("utf8", "replace")
diff --git a/contrib/python/traitlets/py3/traitlets/traitlets.py b/contrib/python/traitlets/py3/traitlets/traitlets.py
index b3657ab950..1d1675ab0c 100644
--- a/contrib/python/traitlets/py3/traitlets/traitlets.py
+++ b/contrib/python/traitlets/py3/traitlets/traitlets.py
@@ -476,7 +476,6 @@ class BaseDescriptor:
:meth:`BaseDescriptor.instance_init` method of descriptors holding
other descriptors.
"""
- pass
G = TypeVar("G")
@@ -714,8 +713,7 @@ class TraitType(BaseDescriptor, t.Generic[G, S]):
"""
if self.read_only:
raise TraitError('The "%s" trait is read-only.' % self.name)
- else:
- self.set(obj, value)
+ self.set(obj, value)
def _validate(self, obj: t.Any, value: t.Any) -> G | None:
if value is None and self.allow_none:
@@ -810,27 +808,27 @@ class TraitType(BaseDescriptor, t.Generic[G, S]):
),
)
raise error
+
+ # this trait caused an error
+ if self.name is None:
+ # this is not the root trait
+ raise TraitError(value, info or self.info(), self)
+
+ # this is the root trait
+ if obj is not None:
+ e = "The '{}' trait of {} instance expected {}, not {}.".format(
+ self.name,
+ class_of(obj),
+ info or self.info(),
+ describe("the", value),
+ )
else:
- # this trait caused an error
- if self.name is None:
- # this is not the root trait
- raise TraitError(value, info or self.info(), self)
- else:
- # this is the root trait
- if obj is not None:
- e = "The '{}' trait of {} instance expected {}, not {}.".format(
- self.name,
- class_of(obj),
- info or self.info(),
- describe("the", value),
- )
- else:
- e = "The '{}' trait expected {}, not {}.".format(
- self.name,
- info or self.info(),
- describe("the", value),
- )
- raise TraitError(e)
+ e = "The '{}' trait expected {}, not {}.".format(
+ self.name,
+ info or self.info(),
+ describe("the", value),
+ )
+ raise TraitError(e)
def get_metadata(self, key: str, default: t.Any = None) -> t.Any:
"""DEPRECATED: Get a metadata value.
@@ -905,7 +903,7 @@ class _CallbackWrapper:
if self.nargs > 4:
raise TraitError("a trait changed callback must have 0-4 arguments.")
- def __eq__(self, other: t.Any) -> bool:
+ def __eq__(self, other: object) -> bool:
# The wrapper is equal to the wrapped element
if isinstance(other, _CallbackWrapper):
return bool(self.cb == other.cb)
@@ -941,7 +939,7 @@ class MetaHasDescriptors(type):
"""
def __new__(
- mcls: type[MetaHasDescriptors], # noqa: N804
+ mcls: type[MetaHasDescriptors],
name: str,
bases: tuple[type, ...],
classdict: dict[str, t.Any],
@@ -993,7 +991,7 @@ class MetaHasDescriptors(type):
class MetaHasTraits(MetaHasDescriptors):
"""A metaclass for HasTraits."""
- def setup_class(cls: MetaHasTraits, classdict: dict[str, t.Any]) -> None: # noqa
+ def setup_class(cls: MetaHasTraits, classdict: dict[str, t.Any]) -> None:
# for only the current class
cls._trait_default_generators: dict[str, t.Any] = {}
# also looking at base classes
@@ -1490,7 +1488,7 @@ class HasTraits(HasDescriptors, metaclass=MetaHasTraits):
self.set_trait(name, value)
except TraitError as e:
# Roll back in case of TraitError during final cross validation.
- self.notify_change = lambda x: None # type:ignore[method-assign, assignment]
+ self.notify_change = lambda x: None # type:ignore[method-assign, assignment] # noqa: ARG005
for name, changes in cache.items():
for change in changes[::-1]:
# TODO: Separate in a rollback function per notification type.
@@ -1763,8 +1761,7 @@ class HasTraits(HasDescriptors, metaclass=MetaHasTraits):
cls = self.__class__
if not self.has_trait(name):
raise TraitError(f"Class {cls.__name__} does not have a trait named {name}")
- else:
- getattr(cls, name).set(self, value)
+ getattr(cls, name).set(self, value)
@classmethod
def class_trait_names(cls: type[HasTraits], **metadata: t.Any) -> list[str]:
@@ -2363,16 +2360,12 @@ class ForwardDeclaredType(ForwardDeclaredMixin, Type[G, S]):
Forward-declared version of Type.
"""
- pass
-
class ForwardDeclaredInstance(ForwardDeclaredMixin, Instance[T]):
"""
Forward-declared version of Instance.
"""
- pass
-
class This(ClassBasedTraitType[t.Optional[T], t.Optional[T]]):
"""A trait for instances of the class containing this trait.
@@ -4010,8 +4003,7 @@ class Dict(Instance["dict[K, V]"]):
value = super().validate(obj, value)
if value is None:
return value
- value_dict = self.validate_elements(obj, value)
- return value_dict
+ return self.validate_elements(obj, value)
def validate_elements(self, obj: t.Any, value: dict[t.Any, t.Any]) -> dict[K, V] | None:
per_key_override = self._per_key_traits or {}
diff --git a/contrib/python/traitlets/py3/traitlets/utils/decorators.py b/contrib/python/traitlets/py3/traitlets/utils/decorators.py
index 8090636bc8..5b77d701de 100644
--- a/contrib/python/traitlets/py3/traitlets/utils/decorators.py
+++ b/contrib/python/traitlets/py3/traitlets/utils/decorators.py
@@ -1,4 +1,5 @@
"""Useful decorators for Traitlets users."""
+from __future__ import annotations
import copy
from inspect import Parameter, Signature, signature
diff --git a/contrib/python/traitlets/py3/traitlets/utils/descriptions.py b/contrib/python/traitlets/py3/traitlets/utils/descriptions.py
index 785ec58116..703037163a 100644
--- a/contrib/python/traitlets/py3/traitlets/utils/descriptions.py
+++ b/contrib/python/traitlets/py3/traitlets/utils/descriptions.py
@@ -179,5 +179,4 @@ def repr_type(obj: Any) -> str:
error messages.
"""
the_type = type(obj)
- msg = f"{obj!r} {the_type!r}"
- return msg
+ return f"{obj!r} {the_type!r}"
diff --git a/contrib/python/traitlets/py3/traitlets/utils/getargspec.py b/contrib/python/traitlets/py3/traitlets/utils/getargspec.py
index 7cbc82659c..72c9120cb9 100644
--- a/contrib/python/traitlets/py3/traitlets/utils/getargspec.py
+++ b/contrib/python/traitlets/py3/traitlets/utils/getargspec.py
@@ -7,6 +7,8 @@
:copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
+from __future__ import annotations
+
import inspect
from functools import partial
from typing import Any
diff --git a/contrib/python/traitlets/py3/traitlets/utils/importstring.py b/contrib/python/traitlets/py3/traitlets/utils/importstring.py
index 413c2033c1..203f79f054 100644
--- a/contrib/python/traitlets/py3/traitlets/utils/importstring.py
+++ b/contrib/python/traitlets/py3/traitlets/utils/importstring.py
@@ -3,6 +3,8 @@ A simple utility to import something by its string name.
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
+from __future__ import annotations
+
from typing import Any
diff --git a/contrib/python/traitlets/py3/traitlets/utils/nested_update.py b/contrib/python/traitlets/py3/traitlets/utils/nested_update.py
index 37e2d27cd2..33a5ab8a77 100644
--- a/contrib/python/traitlets/py3/traitlets/utils/nested_update.py
+++ b/contrib/python/traitlets/py3/traitlets/utils/nested_update.py
@@ -1,5 +1,7 @@
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
+from __future__ import annotations
+
from typing import Any, Dict
diff --git a/contrib/python/traitlets/py3/traitlets/utils/text.py b/contrib/python/traitlets/py3/traitlets/utils/text.py
index 72ad98fc2a..1c1ac20815 100644
--- a/contrib/python/traitlets/py3/traitlets/utils/text.py
+++ b/contrib/python/traitlets/py3/traitlets/utils/text.py
@@ -1,6 +1,7 @@
"""
Utilities imported from ipython_genutils
"""
+from __future__ import annotations
import re
import textwrap
@@ -10,8 +11,7 @@ from typing import List
def indent(val: str) -> str:
- res = _indent(val, " ")
- return res
+ return _indent(val, " ")
def wrap_paragraphs(text: str, ncols: int = 80) -> List[str]:
diff --git a/contrib/python/traitlets/py3/ya.make b/contrib/python/traitlets/py3/ya.make
index 2384990112..fffcd05afd 100644
--- a/contrib/python/traitlets/py3/ya.make
+++ b/contrib/python/traitlets/py3/ya.make
@@ -4,7 +4,7 @@ PY3_LIBRARY()
PROVIDES(python_traitlets)
-VERSION(5.14.0)
+VERSION(5.14.1)
LICENSE(BSD-3-Clause)
diff --git a/contrib/tools/bison/bison/data/lalr1.cc b/contrib/tools/bison/bison/data/lalr1.cc
index f4f51c78c7..7ff15234bd 100644
--- a/contrib/tools/bison/bison/data/lalr1.cc
+++ b/contrib/tools/bison/bison/data/lalr1.cc
@@ -711,7 +711,7 @@ m4_if(b4_prefix, [yy], [],
int yylen = 0;
// Error handling.
- int yynerrs_ = 0;
+ __attribute__((unused)) int yynerrs_ = 0;
int yyerrstatus_ = 0;
/// The lookahead symbol.
diff --git a/library/cpp/clickhouse/client/client.cpp b/library/cpp/clickhouse/client/client.cpp
index 576731ed76..d91ea55194 100644
--- a/library/cpp/clickhouse/client/client.cpp
+++ b/library/cpp/clickhouse/client/client.cpp
@@ -64,7 +64,7 @@ namespace NClickHouse {
void ExecuteQuery(TQuery query);
- void Insert(const TString& table_name, const TBlock& block, const TString& query_id);
+ void Insert(const TString& table_name, const TBlock& block, const TString& query_id, const TString& deduplication_token);
void Ping();
@@ -75,7 +75,7 @@ namespace NClickHouse {
bool ReceivePacket(ui64* server_packet = nullptr);
- void SendQuery(const TString& query, const TString& query_id);
+ void SendQuery(const TString& query, const TString& query_id, const TString& deduplication_token = "");
void SendData(const TBlock& block);
@@ -195,7 +195,7 @@ namespace NClickHouse {
}
}
- void TClient::TImpl::Insert(const TString& table_name, const TBlock& block, const TString& query_id) {
+ void TClient::TImpl::Insert(const TString& table_name, const TBlock& block, const TString& query_id, const TString& deduplication_token) {
if (Options_.PingBeforeQuery) {
RetryGuard([this]() { Ping(); });
}
@@ -216,7 +216,7 @@ namespace NClickHouse {
}
}
- SendQuery("INSERT INTO " + table_name + " ( " + fields_section + " ) VALUES", query_id);
+ SendQuery("INSERT INTO " + table_name + " ( " + fields_section + " ) VALUES", query_id, deduplication_token);
ui64 server_packet(0);
// Receive data packet.
@@ -536,7 +536,7 @@ namespace NClickHouse {
return exception_received;
}
- void TClient::TImpl::SendQuery(const TString& query, const TString& query_id) {
+ void TClient::TImpl::SendQuery(const TString& query, const TString& query_id, const TString& deduplication_token) {
TWireFormat::WriteUInt64(&Output_, ClientCodes::Query);
TWireFormat::WriteString(&Output_, query_id);
@@ -567,11 +567,12 @@ namespace NClickHouse {
TWireFormat::WriteString(&Output_, info.QuotaKey);
}
- /// Per query settings.
- //if (settings)
- // settings->serialize(*out);
- //else
- TWireFormat::WriteString(&Output_, TString());
+ if (!deduplication_token.empty()) {
+ static const TString insert_deduplication_token_setting_name = "insert_deduplication_token";
+ TWireFormat::WriteString(&Output_, insert_deduplication_token_setting_name);
+ TWireFormat::WriteString(&Output_, deduplication_token);
+ }
+ TWireFormat::WriteString(&Output_, TString()); // Empty string is a marker of end SETTINGS section
TWireFormat::WriteUInt64(&Output_, Stages::Complete);
TWireFormat::WriteUInt64(&Output_, Compression_);
@@ -752,8 +753,8 @@ namespace NClickHouse {
Execute(query);
}
- void TClient::Insert(const TString& table_name, const TBlock& block, const TString& query_id) {
- Impl_->Insert(table_name, block, query_id);
+ void TClient::Insert(const TString& table_name, const TBlock& block, const TString& query_id, const TString& deduplication_token) {
+ Impl_->Insert(table_name, block, query_id, deduplication_token);
}
void TClient::Ping() {
diff --git a/library/cpp/clickhouse/client/client.h b/library/cpp/clickhouse/client/client.h
index b008ef99a5..e8497f7ab8 100644
--- a/library/cpp/clickhouse/client/client.h
+++ b/library/cpp/clickhouse/client/client.h
@@ -87,7 +87,7 @@ namespace NClickHouse {
void Select(const TQuery& query);
/// Intends for insert block of data into a table \p table_name.
- void Insert(const TString& table_name, const TBlock& block, const TString& query_id = "");
+ void Insert(const TString& table_name, const TBlock& block, const TString& query_id = "", const TString& deduplication_token = "");
/// Ping server for aliveness.
void Ping();
diff --git a/library/python/strings/__init__.py b/library/python/strings/__init__.py
index ae27ddbdae..cd1084b0f0 100644
--- a/library/python/strings/__init__.py
+++ b/library/python/strings/__init__.py
@@ -12,10 +12,13 @@ from .strings import (
guess_default_encoding,
left_strip,
locale_encoding,
+ parse_qs_binary,
+ parse_qsl_binary,
stringize_deep,
to_basestring,
to_str,
to_unicode,
truncate,
unicodize_deep,
+ unquote_binary,
)
diff --git a/library/python/strings/strings.py b/library/python/strings/strings.py
index f5fa2d32c6..d068f30b76 100644
--- a/library/python/strings/strings.py
+++ b/library/python/strings/strings.py
@@ -176,3 +176,120 @@ def fix_utf8(data):
# remove destroyed symbol code
udata = six.ensure_text(data, 'utf-8', 'ignore')
return six.ensure_str(udata, 'utf-8', errors='ignore')
+
+
+_hexdig = "0123456789ABCDEFabcdef"
+_hextobyte = {
+ (a + b).encode(): bytes.fromhex(a + b) if six.PY3 else (a + b).decode("hex") for a in _hexdig for b in _hexdig
+}
+
+
+def parse_qs_binary(qs, keep_blank_values=False, strict_parsing=False, max_num_fields=None, separator=b'&'):
+ """Parse a query like original `parse_qs` from `urlparse`, `urllib.parse`, but query given as a bytes argument.
+
+ Arguments:
+
+ qs: percent-encoded query string to be parsed
+
+ keep_blank_values: flag indicating whether blank values in
+ percent-encoded queries should be treated as blank byte strings.
+ A true value indicates that blanks should be retained as
+ blank byte strings. The default false value indicates that
+ blank values are to be ignored and treated as if they were
+ not included.
+
+ strict_parsing: flag indicating what to do with parsing errors.
+ If false (the default), errors are silently ignored.
+ If true, errors raise a ValueError exception.
+
+ max_num_fields: int. If set, then throws a ValueError if there
+ are more than n fields read by parse_qsl_binary().
+
+ separator: bytes. The symbol to use for separating the query arguments.
+ Defaults to &.
+
+ Returns a dictionary.
+ """
+ parsed_result = {}
+ pairs = parse_qsl_binary(qs, keep_blank_values, strict_parsing, max_num_fields=max_num_fields, separator=separator)
+ for name, value in pairs:
+ if name in parsed_result:
+ parsed_result[name].append(value)
+ else:
+ parsed_result[name] = [value]
+ return parsed_result
+
+
+def parse_qsl_binary(qs, keep_blank_values=False, strict_parsing=False, max_num_fields=None, separator=b'&'):
+ """Parse a query like original `parse_qs` from `urlparse`, `urllib.parse`, but query given as a bytes argument.
+
+ Arguments:
+
+ qs: percent-encoded query bytes to be parsed
+
+ keep_blank_values: flag indicating whether blank values in
+ percent-encoded queries should be treated as blank byte strings.
+ A true value indicates that blanks should be retained as blank
+ byte strings. The default false value indicates that blank values
+ are to be ignored and treated as if they were not included.
+
+ strict_parsing: flag indicating what to do with parsing errors. If
+ false (the default), errors are silently ignored. If true,
+ errors raise a ValueError exception.
+
+ max_num_fields: int. If set, then throws a ValueError
+ if there are more than n fields read by parse_qsl_binary().
+
+ separator: bytes. The symbol to use for separating the query arguments.
+ Defaults to &.
+
+ Returns a list.
+ """
+
+ if max_num_fields is not None:
+ num_fields = 1 + qs.count(separator) if qs else 0
+ if max_num_fields < num_fields:
+ raise ValueError('Max number of fields exceeded')
+
+ r = []
+ query_args = qs.split(separator) if qs else []
+ for name_value in query_args:
+ if not name_value and not strict_parsing:
+ continue
+ nv = name_value.split(b'=', 1)
+
+ if len(nv) != 2:
+ if strict_parsing:
+ raise ValueError("bad query field: %r" % (name_value,))
+ # Handle case of a control-name with no equal sign
+ if keep_blank_values:
+ nv.append(b'')
+ else:
+ continue
+ if len(nv[1]) or keep_blank_values:
+ name = nv[0].replace(b'+', b' ')
+ name = unquote_binary(name)
+ value = nv[1].replace(b'+', b' ')
+ value = unquote_binary(value)
+ r.append((name, value))
+ return r
+
+
+def unquote_binary(string):
+ """Replace %xx escapes by their single-character equivalent.
+ By default, percent-encoded sequences are replaced by ASCII character or
+ byte code, and invalid sequences are replaced by a placeholder character.
+
+ unquote('abc%20def') -> 'abc def'
+ unquote('abc%FFdef') -> 'abc\xffdef'
+ unquote('%no') -> '%no'
+ """
+ bits = string.split(b"%")
+ if len(bits) == 1:
+ return bits[0]
+
+ res = [bits[0]]
+ for item in bits[1:]:
+ res.append(_hextobyte.get(item[:2], b"%"))
+ res.append(item if res[-1] == b"%" else item[2:])
+ return b"".join(res)
diff --git a/library/python/strings/ut/test_strings.py b/library/python/strings/ut/test_strings.py
index 6177c10b25..d2bfe6ed8b 100644
--- a/library/python/strings/ut/test_strings.py
+++ b/library/python/strings/ut/test_strings.py
@@ -5,6 +5,11 @@ import six
from library.python import strings
+if six.PY3:
+ from urllib.parse import parse_qs, parse_qsl, unquote
+else:
+ from urlparse import parse_qs, parse_qsl, unquote
+
class Convertible(object):
text = u'текст'
@@ -272,3 +277,148 @@ def test_truncate_utf_8_text_wrong_limit():
with pytest.raises(AssertionError):
strings.truncate("hello", 4, msg="long msg")
+
+
+@pytest.mark.parametrize(
+ "given,expected",
+ [
+ (
+ b"a=a",
+ [(b"a", b"a")],
+ ),
+ (
+ b"a=a&a=b",
+ [(b"a", b"a"), (b"a", b"b")],
+ ),
+ (
+ b"a=a+&b=b++",
+ [(b"a", b"a "), (b"b", b"b ")],
+ ),
+ (
+ b"a=a&&b=b",
+ [(b"a", b"a"), (b"b", b"b")],
+ ),
+ (
+ b"a=a&b=%%3C%2Fscript%3E",
+ [(b"a", b"a"), (b"b", b"%</script>")],
+ ),
+ (
+ b"clid=%EF%BB%BF123",
+ [(b"clid", b"\xef\xbb\xbf123")],
+ ),
+ ],
+)
+def test_parse_qsl(given, expected):
+ assert strings.parse_qsl_binary(given) == expected
+
+
+@pytest.mark.parametrize(
+ "given,expected,keep_blank_values",
+ [
+ (b"a=", {}, False),
+ (b"a=", {b"a": [b""]}, True),
+ (b"a", {}, False),
+ (b"a", {b"a": [b""]}, True),
+ (b"a=a&a=b", {b"a": [b"a", b"b"]}, False),
+ ],
+)
+def test_parse_qs_with_keep_blank_values(given, expected, keep_blank_values):
+ assert strings.parse_qs_binary(given, keep_blank_values=keep_blank_values) == expected
+
+
+@pytest.mark.parametrize(
+ "given,strict_parsing",
+ [(b"a", True)],
+)
+def test_parse_qs_with_strict_parsing(given, strict_parsing):
+ with pytest.raises(ValueError, match="bad query field.*"):
+ strings.parse_qs_binary(given, strict_parsing=strict_parsing)
+
+ with pytest.raises(ValueError, match="bad query field.*"):
+ parse_qs(given, strict_parsing=strict_parsing)
+
+
+@pytest.mark.parametrize(
+ "given,max_num_fields",
+ [(b"a=a&b=bb&c=c", 2)],
+)
+def test_parse_qs_with_max_num_fields(given, max_num_fields):
+ with pytest.raises(ValueError, match="Max number of fields exceeded"):
+ strings.parse_qs_binary(given, max_num_fields=max_num_fields)
+
+ with pytest.raises(ValueError, match="Max number of fields exceeded"):
+ parse_qs(given, max_num_fields=max_num_fields)
+
+
+@pytest.mark.parametrize(
+ "given,expected",
+ [
+ (
+ b"",
+ b"",
+ ),
+ (
+ b"without percent",
+ b"without percent",
+ ),
+ (
+ b"%61 and %62",
+ b"a and b",
+ ),
+ (
+ b"%FF can't %unparse char%",
+ b"\xff can't %unparse char%",
+ ),
+ ],
+)
+def test_unquote(given, expected):
+ assert strings.unquote_binary(given) == expected
+
+
+URL_PARAMS = [
+ (b"a=", False, False, None),
+ (b"a=a&a=b", False, False, None),
+ (b"a=a&a=b&b=b", False, False, None),
+ (b"a=a&&b=b", False, False, None),
+ (b"a=a&b=%%3C%2Fscript%3E", False, False, None),
+ (b"a=", True, False, None),
+ (b"a", False, False, None),
+ (b"a", True, False, None),
+]
+
+
+@pytest.mark.parametrize(
+ "string,keep_blank_values,strict_parsing,max_num_fields",
+ URL_PARAMS if six.PY3 else URL_PARAMS + [(b"clid=%EF%BB%BF123", False, False, None)],
+)
+def test_parse_qs_compatibility(string, keep_blank_values, strict_parsing, max_num_fields):
+ for string_method, urlparse_method in (strings.parse_qsl_binary, parse_qsl), (strings.parse_qs_binary, parse_qs):
+ string_res = string_method(
+ string,
+ keep_blank_values=keep_blank_values,
+ strict_parsing=strict_parsing,
+ max_num_fields=max_num_fields,
+ )
+ urlparse_res = urlparse_method(
+ string,
+ keep_blank_values=keep_blank_values,
+ strict_parsing=strict_parsing,
+ max_num_fields=max_num_fields,
+ )
+ assert string_res == urlparse_res
+
+
+@pytest.mark.parametrize(
+ "string",
+ [
+ (b""),
+ (b"without percent"),
+ (b"a and b"),
+ ((b"%FF " if six.PY2 else b"") + b"can't %unparse char%"),
+ ],
+)
+def test_unquote_compatibility(string):
+ unquote_res = unquote(string)
+ if six.PY3:
+ unquote_res = six.ensure_binary(unquote_res)
+ assert strings.unquote_binary(string) == unquote_res
diff --git a/library/rightlib_sha.txt b/library/rightlib_sha.txt
new file mode 100644
index 0000000000..0ee0ef013b
--- /dev/null
+++ b/library/rightlib_sha.txt
@@ -0,0 +1 @@
+5ad9230c8cc1de0dbd03cffca57a245b4fb28b54
diff --git a/util/system/datetime.cpp b/util/system/datetime.cpp
index b07b50679a..449d850baf 100644
--- a/util/system/datetime.cpp
+++ b/util/system/datetime.cpp
@@ -95,7 +95,11 @@ void NanoSleep(ui64 ns) noexcept {
}
#if defined(_x86_)
-extern const bool HaveRdtscp = NX86::HaveRDTSCP();
+namespace NPrivate {
+ bool HaveRdtscpImpl() {
+ return NX86::HaveRDTSCP();
+ }
+}
#endif
#ifdef Y_HAS_CLOCK_GETTIME
diff --git a/util/system/datetime.h b/util/system/datetime.h
index aa009974e0..f2c2c9f8c8 100644
--- a/util/system/datetime.h
+++ b/util/system/datetime.h
@@ -34,6 +34,12 @@ ui64 ThreadCPUTime() noexcept;
void NanoSleep(ui64 ns) noexcept;
+#if defined(_x86_)
+namespace NPrivate {
+ bool HaveRdtscpImpl();
+}
+#endif
+
// GetCycleCount guarantees to return synchronous values on different cores
// and provide constant rate only on modern Intel and AMD processors
// NOTE: rdtscp is used to prevent out of order execution
@@ -45,20 +51,20 @@ Y_FORCE_INLINE ui64 GetCycleCount() noexcept {
#if defined(_MSC_VER)
// Generates the rdtscp instruction, which returns the processor time stamp.
// The processor time stamp records the number of clock cycles since the last reset.
- extern const bool HaveRdtscp;
+ static const bool haveRdtscp = ::NPrivate::HaveRdtscpImpl();
- if (HaveRdtscp) {
+ if (haveRdtscp) {
unsigned int aux;
return __rdtscp(&aux);
} else {
return __rdtsc();
}
#elif defined(_x86_64_)
- extern const bool HaveRdtscp;
+ static const bool haveRdtscp = ::NPrivate::HaveRdtscpImpl();
unsigned hi, lo;
- if (HaveRdtscp) {
+ if (haveRdtscp) {
__asm__ __volatile__("rdtscp"
: "=a"(lo), "=d"(hi)::"%rcx");
} else {
@@ -68,10 +74,10 @@ Y_FORCE_INLINE ui64 GetCycleCount() noexcept {
return ((unsigned long long)lo) | (((unsigned long long)hi) << 32);
#elif defined(_i386_)
- extern const bool HaveRdtscp;
+ static const bool haveRdtscp = ::NPrivate::HaveRdtscpImpl();
ui64 x;
- if (HaveRdtscp) {
+ if (haveRdtscp) {
__asm__ volatile("rdtscp\n\t"
: "=A"(x)::"%ecx");
} else {
diff --git a/util/system/fs_win.cpp b/util/system/fs_win.cpp
index 45d7454b2f..16a87ff385 100644
--- a/util/system/fs_win.cpp
+++ b/util/system/fs_win.cpp
@@ -208,6 +208,9 @@ namespace NFsPrivate {
TString WinReadLink(const TString& name) {
TFileHandle h = CreateFileWithUtf8Name(name, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING,
FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, true);
+ if (h == INVALID_HANDLE_VALUE) {
+ ythrow TIoSystemError() << "can't open file " << name;
+ }
TTempBuf buf;
REPARSE_DATA_BUFFER* rdb = ReadReparsePoint(h, buf);
if (rdb == nullptr) {
diff --git a/ya b/ya
index 8faf7b44cd..5f4f65e90d 100755
--- a/ya
+++ b/ya
@@ -34,33 +34,33 @@ REGISTRY_ENDPOINT = os.environ.get("YA_REGISTRY_ENDPOINT", "https://devtools-reg
PLATFORM_MAP = {
"data": {
"darwin": {
- "md5": "e52418326ff30ceb42c6b3806e7289e0",
+ "md5": "6a3e5f75c050c3d05da5e81811f7c0f9",
"urls": [
- f"{REGISTRY_ENDPOINT}/5669733743"
+ f"{REGISTRY_ENDPOINT}/5683513971"
]
},
"darwin-arm64": {
- "md5": "9679236b5f7bd78ebe1f8f977b1ba64c",
+ "md5": "a57a36b4225c7996b67ceaf190b9da10",
"urls": [
- f"{REGISTRY_ENDPOINT}/5669732877"
+ f"{REGISTRY_ENDPOINT}/5683512668"
]
},
"linux-aarch64": {
- "md5": "ee89c6385785ad12c273ea031d5d720f",
+ "md5": "f45791578da0c96167de629226a5846d",
"urls": [
- f"{REGISTRY_ENDPOINT}/5669731490"
+ f"{REGISTRY_ENDPOINT}/5683511510"
]
},
"win32-clang-cl": {
- "md5": "61bce39574b656ccc46bcb756a63c2d3",
+ "md5": "08d15113d7194e8460438a84a84ca6df",
"urls": [
- f"{REGISTRY_ENDPOINT}/5669734753"
+ f"{REGISTRY_ENDPOINT}/5683515254"
]
},
"linux": {
- "md5": "a64b228ccd0b011606521ed9729a3475",
+ "md5": "d09e46e08dbf03d1f7cf301dbc11305e",
"urls": [
- f"{REGISTRY_ENDPOINT}/5669735681"
+ f"{REGISTRY_ENDPOINT}/5683516355"
]
}
}
diff --git a/ydb/ci/rightlib/increment.sh b/ydb/ci/rightlib/increment.sh
new file mode 100755
index 0000000000..6d799e48b6
--- /dev/null
+++ b/ydb/ci/rightlib/increment.sh
@@ -0,0 +1,43 @@
+# Usage: cherrypick.sh <source_ydblib_repo_root> <target_ydb_repo_root>
+# Expects previous github SHA in <target_ydb_repo_root>/library_import.txt
+# Will loop through the commits in the source repo after previous SHA, and cherry-pick is to the target.
+
+set -e
+set -o pipefail
+
+LIB_ROOT=$1
+if [ -z "${LIB_ROOT}" ]; then
+ echo "Source lib root must be provided as a first free arg"
+ exit 1
+fi
+echo "Source library root: ${LIB_ROOT}"
+newsha=$(cd ${LIB_ROOT} && git rev-parse HEAD)
+echo "Source current commit sha: $newsha"
+
+MAIN_ROOT=$2
+if [ -z "${MAIN_ROOT}" ]; then
+ echo "Target main root must be provided as a second free arg"
+ exit 1
+fi
+echo "Target Main root: ${MAIN_ROOT}"
+shapath="${MAIN_ROOT}/library_import.txt"
+prevsha=$(cat ${shapath}) || true
+if [ -z "${prevsha}" ]; then
+ echo "File ${shapath} not found, which must contain previous completed import commit SHA"
+ exit 1
+fi
+echo "Previous sha: ${prevsha}"
+
+list=$(cd ${LIB_ROOT} && git log ${prevsha}..HEAD --pretty=oneline --no-decorate | awk '{print $1}')
+for sha in $list;do
+ echo $sha
+ (cd ${MAIN_ROOT} && git --git-dir=${LIB_ROOT}/.git format-patch -k -1 --stdout $sha | git am -3 -k)
+ echo "---"
+done
+
+exit
+
+rsync -r $LIB_ROOT/ya $LIB_ROOT/build $LIB_ROOT/certs $LIB_ROOT/cmake $LIB_ROOT/contrib $LIB_ROOT/library $LIB_ROOT/tools $LIB_ROOT/util $LIB_ROOT/vendor $LIB_ROOT/yt $MAIN_ROOT \
+ --filter '- **/a.yaml' --filter '- **/.arcignore' --filter '- **/.yandex_meta/' --filter '- contrib/ydb/' --filter '- build/internal/' --filter '- build/ext_mapping.conf.json' \
+ --filter '- **/CMakeLists*.txt' --delete
+
diff --git a/ydb/ci/increment.sh b/ydb/ci/rightlib/squash.sh
index 08a5c58939..0309a6f50a 100755
--- a/ydb/ci/increment.sh
+++ b/ydb/ci/rightlib/squash.sh
@@ -1,6 +1,4 @@
# Usage: increment.sh <source_ydblib_repo_root> <target_ydb_repo_root>
-# Expects previous github SHA in <target_ydb_repo_root>/contrib/ydb/git_sha.txt
-# Will get/patch only files changed since that commit
set -e
set -o pipefail
@@ -11,6 +9,8 @@ if [ -z "${LIB_ROOT}" ]; then
exit 1
fi
echo "Source library root: ${LIB_ROOT}"
+sha=$(cd ${LIB_ROOT} && git rev-parse HEAD)
+echo "Source commit sha: $sha"
MAIN_ROOT=$2
if [ -z "${MAIN_ROOT}" ]; then
@@ -19,7 +19,12 @@ if [ -z "${MAIN_ROOT}" ]; then
fi
echo "Target Main root: ${MAIN_ROOT}"
-rsync -r $LIB_ROOT/ya $LIB_ROOT/build $LIB_ROOT/certs $LIB_ROOT/cmake $LIB_ROOT/contrib $LIB_ROOT/library $LIB_ROOT/scripts $LIB_ROOT/tools $LIB_ROOT/util $LIB_ROOT/vendor $LIB_ROOT/yt $MAIN_ROOT \
+sharel="library/rightlib_sha.txt"
+shaabs="${MAIN_ROOT}/${sharel}"
+echo "Sha file: ${shaabs}"
+echo $sha > ${shaabs}
+
+rsync -r $LIB_ROOT/ya $LIB_ROOT/build $LIB_ROOT/certs $LIB_ROOT/cmake $LIB_ROOT/contrib $LIB_ROOT/library $LIB_ROOT/tools $LIB_ROOT/util $LIB_ROOT/vendor $LIB_ROOT/yt $MAIN_ROOT \
--filter '- **/a.yaml' --filter '- **/.arcignore' --filter '- **/.yandex_meta/' --filter '- contrib/ydb/' --filter '- build/internal/' --filter '- build/ext_mapping.conf.json' \
- --filter '- **/CMakeLists*.txt' --delete
+ --filter '- **/CMakeLists*.txt' --filter "- ${sharel}" --delete
diff --git a/yt/yt/build/ya_version.cpp b/yt/yt/build/ya_version.cpp
index a92f5c131f..643e662c41 100644
--- a/yt/yt/build/ya_version.cpp
+++ b/yt/yt/build/ya_version.cpp
@@ -48,6 +48,10 @@ void OutputCreateBranchCommitVersion(TStringBuf branch, TStringStream& out)
out << "debug";
#endif
+#if defined(TSTRING_IS_STD_STRING)
+ out << "-std-string";
+#endif
+
#if defined(_asan_enabled_)
out << "-asan";
#endif
diff --git a/yt/yt/client/api/client.h b/yt/yt/client/api/client.h
index 78d67c81db..b4ff0ffe17 100644
--- a/yt/yt/client/api/client.h
+++ b/yt/yt/client/api/client.h
@@ -13,6 +13,7 @@
#include "table_client.h"
#include "queue_client.h"
#include "query_tracker_client.h"
+#include "flow_client.h"
#include <yt/yt/client/bundle_controller_client/bundle_controller_client.h>
@@ -68,6 +69,7 @@ struct IClient
, public IQueryTrackerClient
, public IEtcClient
, public NBundleControllerClient::IBundleControllerClient
+ , public IFlowClient
{
//! Terminates all channels.
//! Aborts all pending uncommitted transactions.
diff --git a/yt/yt/client/api/delegating_client.cpp b/yt/yt/client/api/delegating_client.cpp
index da38863b53..81405fbfbe 100644
--- a/yt/yt/client/api/delegating_client.cpp
+++ b/yt/yt/client/api/delegating_client.cpp
@@ -738,6 +738,26 @@ DELEGATE_METHOD(TFuture<void>, SetBundleConfig, (
const NBundleControllerClient::TSetBundleConfigOptions& options),
(bundleName, bundleConfig, options))
+DELEGATE_METHOD(TFuture<void>, StartPipeline, (
+ const NYPath::TYPath& pipelinePath,
+ const TStartPipelineOptions& options),
+ (pipelinePath, options))
+
+DELEGATE_METHOD(TFuture<void>, StopPipeline, (
+ const NYPath::TYPath& pipelinePath,
+ const TStopPipelineOptions& options),
+ (pipelinePath, options))
+
+DELEGATE_METHOD(TFuture<void>, PausePipeline, (
+ const NYPath::TYPath& pipelinePath,
+ const TPausePipelineOptions& options),
+ (pipelinePath, options))
+
+DELEGATE_METHOD(TFuture<TPipelineStatus>, GetPipelineStatus, (
+ const NYPath::TYPath& pipelinePath,
+ const TGetPipelineStatusOptions& options),
+ (pipelinePath, options))
+
#undef DELEGATE_METHOD
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/client/api/delegating_client.h b/yt/yt/client/api/delegating_client.h
index fbe93617b2..92920239d2 100644
--- a/yt/yt/client/api/delegating_client.h
+++ b/yt/yt/client/api/delegating_client.h
@@ -619,6 +619,8 @@ public:
NQueryTrackerClient::TQueryId queryId,
const TAlterQueryOptions& options) override;
+ // Bundle Controller
+
virtual TFuture<NBundleControllerClient::TBundleConfigDescriptorPtr> GetBundleConfig(
const TString& bundleName,
const NBundleControllerClient::TGetBundleConfigOptions& options = {}) override;
@@ -628,6 +630,24 @@ public:
const NBundleControllerClient::TBundleTargetConfigPtr& bundleConfig,
const NBundleControllerClient::TSetBundleConfigOptions& options = {}) override;
+ // Flow
+
+ TFuture<void> StartPipeline(
+ const NYPath::TYPath& pipelinePath,
+ const TStartPipelineOptions& options) override;
+
+ TFuture<void> StopPipeline(
+ const NYPath::TYPath& pipelinePath,
+ const TStopPipelineOptions& options) override;
+
+ TFuture<void> PausePipeline(
+ const NYPath::TYPath& pipelinePath,
+ const TPausePipelineOptions& options) override;
+
+ TFuture<TPipelineStatus> GetPipelineStatus(
+ const NYPath::TYPath& pipelinePath,
+ const TGetPipelineStatusOptions& options) override;
+
protected:
const IClientPtr Underlying_;
};
diff --git a/yt/yt/client/api/flow_client.h b/yt/yt/client/api/flow_client.h
new file mode 100644
index 0000000000..455dcd3ba5
--- /dev/null
+++ b/yt/yt/client/api/flow_client.h
@@ -0,0 +1,55 @@
+#pragma once
+
+#include "client_common.h"
+
+#include <yt/yt/flow/lib/client/public.h>
+
+namespace NYT::NApi {
+
+////////////////////////////////////////////////////////////////////////////////
+
+struct TStartPipelineOptions
+ : public TTimeoutOptions
+{ };
+
+struct TStopPipelineOptions
+ : public TTimeoutOptions
+{ };
+
+struct TPausePipelineOptions
+ : public TTimeoutOptions
+{ };
+
+struct TGetPipelineStatusOptions
+ : public TTimeoutOptions
+{ };
+
+struct TPipelineStatus
+{
+ NFlow::EPipelineState State;
+};
+
+struct IFlowClient
+{
+ ~IFlowClient() = default;
+
+ virtual TFuture<void> StartPipeline(
+ const NYPath::TYPath& pipelinePath,
+ const TStartPipelineOptions& options = {}) = 0;
+
+ virtual TFuture<void> StopPipeline(
+ const NYPath::TYPath& pipelinePath,
+ const TStopPipelineOptions& options = {}) = 0;
+
+ virtual TFuture<void> PausePipeline(
+ const NYPath::TYPath& pipelinePath,
+ const TPausePipelineOptions& options = {}) = 0;
+
+ virtual TFuture<TPipelineStatus> GetPipelineStatus(
+ const NYPath::TYPath& pipelinePath,
+ const TGetPipelineStatusOptions& options = {}) = 0;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT::NApi
diff --git a/yt/yt/client/api/rpc_proxy/api_service_proxy.h b/yt/yt/client/api/rpc_proxy/api_service_proxy.h
index e9d5d3fcea..3effcb1320 100644
--- a/yt/yt/client/api/rpc_proxy/api_service_proxy.h
+++ b/yt/yt/client/api/rpc_proxy/api_service_proxy.h
@@ -137,6 +137,8 @@ public:
.SetStreamingEnabled(true));
DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, WriteTable,
.SetStreamingEnabled(true));
+ DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, GetColumnarStatistics);
+ DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, PartitionTables);
// File caching
DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, GetFileFromCache);
@@ -171,9 +173,13 @@ public:
DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, CheckPermissionByAcl);
DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, TransferAccountResources);
- // Metadata
- DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, GetColumnarStatistics);
- DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, PartitionTables);
+ // Flow
+ DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, StartPipeline);
+ DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, StopPipeline);
+ DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, PausePipeline);
+ DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, GetPipelineStatus);
+
+ // Misc
DEFINE_RPC_PROXY_METHOD(NRpcProxy::NProto, CheckClusterLiveness);
};
diff --git a/yt/yt/client/api/rpc_proxy/client_impl.cpp b/yt/yt/client/api/rpc_proxy/client_impl.cpp
index 7bdd6644b4..b664035d57 100644
--- a/yt/yt/client/api/rpc_proxy/client_impl.cpp
+++ b/yt/yt/client/api/rpc_proxy/client_impl.cpp
@@ -495,9 +495,9 @@ TFuture<TYsonString> TClient::GetTablePivotKeys(
auto proxy = CreateApiServiceProxy();
auto req = proxy.GetTablePivotKeys();
- req->set_represent_key_as_list(options.RepresentKeyAsList);
SetTimeoutOptions(*req, options);
+ req->set_represent_key_as_list(options.RepresentKeyAsList);
req->set_path(path);
return req->Invoke().Apply(BIND([] (const TApiServiceProxy::TRspGetTablePivotKeysPtr& rsp) {
@@ -512,9 +512,9 @@ TFuture<void> TClient::CreateTableBackup(
auto proxy = CreateApiServiceProxy();
auto req = proxy.CreateTableBackup();
- ToProto(req->mutable_manifest(), *manifest);
-
SetTimeoutOptions(*req, options);
+
+ ToProto(req->mutable_manifest(), *manifest);
req->set_checkpoint_timestamp_delay(ToProto<i64>(options.CheckpointTimestampDelay));
req->set_checkpoint_check_period(ToProto<i64>(options.CheckpointCheckPeriod));
req->set_checkpoint_check_timeout(ToProto<i64>(options.CheckpointCheckTimeout));
@@ -530,9 +530,9 @@ TFuture<void> TClient::RestoreTableBackup(
auto proxy = CreateApiServiceProxy();
auto req = proxy.RestoreTableBackup();
- ToProto(req->mutable_manifest(), *manifest);
-
SetTimeoutOptions(*req, options);
+
+ ToProto(req->mutable_manifest(), *manifest);
req->set_force(options.Force);
req->set_mount(options.Mount);
req->set_enable_replicas(options.EnableReplicas);
@@ -1489,8 +1489,8 @@ TFuture<TPutFileToCacheResult> TClient::PutFileToCache(
auto req = proxy.PutFileToCache();
SetTimeoutOptions(*req, options);
- ToProto(req->mutable_transactional_options(), options);
+ ToProto(req->mutable_transactional_options(), options);
req->set_path(path);
req->set_md5(expectedMD5);
req->set_cache_path(options.CachePath);
@@ -1624,7 +1624,6 @@ TFuture<void> TClient::TruncateJournal(
return req->Invoke().As<void>();
}
-
TFuture<int> TClient::BuildSnapshot(const TBuildSnapshotOptions& options)
{
auto proxy = CreateApiServiceProxy();
@@ -1745,11 +1744,13 @@ TFuture<void> TClient::HealExecNode(
TFuture<void> TClient::SuspendCoordinator(
TCellId coordinatorCellId,
- const TSuspendCoordinatorOptions& /*options*/)
+ const TSuspendCoordinatorOptions& options)
{
auto proxy = CreateApiServiceProxy();
auto req = proxy.SuspendCoordinator();
+ SetTimeoutOptions(*req, options);
+
ToProto(req->mutable_coordinator_cell_id(), coordinatorCellId);
return req->Invoke().As<void>();
@@ -1757,11 +1758,13 @@ TFuture<void> TClient::SuspendCoordinator(
TFuture<void> TClient::ResumeCoordinator(
TCellId coordinatorCellId,
- const TResumeCoordinatorOptions& /*options*/)
+ const TResumeCoordinatorOptions& options)
{
auto proxy = CreateApiServiceProxy();
auto req = proxy.ResumeCoordinator();
+ SetTimeoutOptions(*req, options);
+
ToProto(req->mutable_coordinator_cell_id(), coordinatorCellId);
return req->Invoke().As<void>();
@@ -1774,6 +1777,8 @@ TFuture<void> TClient::MigrateReplicationCards(
auto proxy = CreateApiServiceProxy();
auto req = proxy.MigrateReplicationCards();
+ SetTimeoutOptions(*req, options);
+
ToProto(req->mutable_chaos_cell_id(), chaosCellId);
ToProto(req->mutable_replication_card_ids(), options.ReplicationCardIds);
if (options.DestinationCellId) {
@@ -1835,11 +1840,12 @@ TFuture<TMaintenanceId> TClient::AddMaintenance(
auto proxy = CreateApiServiceProxy();
auto req = proxy.AddMaintenance();
+ SetTimeoutOptions(*req, options);
+
req->set_component(ConvertMaintenanceComponentToProto(component));
req->set_address(address);
req->set_type(ConvertMaintenanceTypeToProto(type));
req->set_comment(comment);
- SetTimeoutOptions(*req, options);
return req->Invoke().Apply(BIND([] (const TErrorOr<TApiServiceProxy::TRspAddMaintenancePtr>& rsp) {
return FromProto<TMaintenanceId>(rsp.ValueOrThrow()->id());
@@ -1855,6 +1861,8 @@ TFuture<TMaintenanceCounts> TClient::RemoveMaintenance(
auto proxy = CreateApiServiceProxy();
auto req = proxy.RemoveMaintenance();
+ SetTimeoutOptions(*req, options);
+
req->set_component(ConvertMaintenanceComponentToProto(component));
req->set_address(address);
@@ -1874,8 +1882,6 @@ TFuture<TMaintenanceCounts> TClient::RemoveMaintenance(
req->set_user(user);
});
- SetTimeoutOptions(*req, options);
-
return req->Invoke().Apply(BIND([] (const TErrorOr<TApiServiceProxy::TRspRemoveMaintenancePtr>& rsp) {
auto rspValue = rsp.ValueOrThrow();
@@ -2110,6 +2116,66 @@ TFuture<TListUserTokensResult> TClient::ListUserTokens(
ThrowUnimplemented("ListUserTokens");
}
+TFuture<void> TClient::StartPipeline(
+ const NYPath::TYPath& pipelinePath,
+ const TStartPipelineOptions& options)
+{
+ auto proxy = CreateApiServiceProxy();
+
+ auto req = proxy.StartPipeline();
+ SetTimeoutOptions(*req, options);
+
+ req->set_pipeline_path(pipelinePath);
+
+ return req->Invoke().AsVoid();
+}
+
+TFuture<void> TClient::StopPipeline(
+ const NYPath::TYPath& pipelinePath,
+ const TStopPipelineOptions& options)
+{
+ auto proxy = CreateApiServiceProxy();
+
+ auto req = proxy.StopPipeline();
+ SetTimeoutOptions(*req, options);
+
+ req->set_pipeline_path(pipelinePath);
+
+ return req->Invoke().AsVoid();
+}
+
+TFuture<void> TClient::PausePipeline(
+ const NYPath::TYPath& pipelinePath,
+ const TPausePipelineOptions& options)
+{
+ auto proxy = CreateApiServiceProxy();
+
+ auto req = proxy.PausePipeline();
+ SetTimeoutOptions(*req, options);
+
+ req->set_pipeline_path(pipelinePath);
+
+ return req->Invoke().AsVoid();
+}
+
+TFuture<TPipelineStatus> TClient::GetPipelineStatus(
+ const NYPath::TYPath& pipelinePath,
+ const TGetPipelineStatusOptions& options)
+{
+ auto proxy = CreateApiServiceProxy();
+
+ auto req = proxy.GetPipelineStatus();
+ SetTimeoutOptions(*req, options);
+
+ req->set_pipeline_path(pipelinePath);
+
+ return req->Invoke().Apply(BIND([] (const TApiServiceProxy::TRspGetPipelineStatusPtr& rsp) {
+ return TPipelineStatus{
+ .State = FromProto<NFlow::EPipelineState>(rsp->state()),
+ };
+ }));
+}
+
////////////////////////////////////////////////////////////////////////////////
} // namespace NYT::NRpcProxy
diff --git a/yt/yt/client/api/rpc_proxy/client_impl.h b/yt/yt/client/api/rpc_proxy/client_impl.h
index fad8ccc426..43003b5331 100644
--- a/yt/yt/client/api/rpc_proxy/client_impl.h
+++ b/yt/yt/client/api/rpc_proxy/client_impl.h
@@ -483,6 +483,8 @@ public:
const TString& passwordSha256,
const TListUserTokensOptions& options) override;
+ // Bundle Controller
+
TFuture<NBundleControllerClient::TBundleConfigDescriptorPtr> GetBundleConfig(
const TString& bundleName,
const NBundleControllerClient::TGetBundleConfigOptions& options = {}) override;
@@ -492,6 +494,24 @@ public:
const NBundleControllerClient::TBundleTargetConfigPtr& bundleConfig,
const NBundleControllerClient::TSetBundleConfigOptions& options = {}) override;
+ // Flow
+
+ TFuture<void> StartPipeline(
+ const NYPath::TYPath& pipelinePath,
+ const TStartPipelineOptions& options = {}) override;
+
+ TFuture<void> StopPipeline(
+ const NYPath::TYPath& pipelinePath,
+ const TStopPipelineOptions& options = {}) override;
+
+ TFuture<void> PausePipeline(
+ const NYPath::TYPath& pipelinePath,
+ const TPausePipelineOptions& options = {}) override;
+
+ TFuture<TPipelineStatus> GetPipelineStatus(
+ const NYPath::TYPath& pipelinePath,
+ const TGetPipelineStatusOptions& options) override;
+
private:
const TConnectionPtr Connection_;
const NRpc::TDynamicChannelPoolPtr ChannelPool_;
diff --git a/yt/yt/client/driver/command.h b/yt/yt/client/driver/command.h
index 1f8e001bb9..c870df7f1a 100644
--- a/yt/yt/client/driver/command.h
+++ b/yt/yt/client/driver/command.h
@@ -287,6 +287,7 @@ class TTabletWriteCommandBase<
>
: public virtual TTypedCommandBase<TOptions>
{
+private:
REGISTER_YSON_STRUCT_LITE(TTabletWriteCommandBase);
static void Register(TRegistrar registrar);
@@ -307,6 +308,7 @@ class TSelectRowsCommandBase<
>
: public virtual TTypedCommandBase<TOptions>
{
+private:
REGISTER_YSON_STRUCT_LITE(TSelectRowsCommandBase);
static void Register(TRegistrar registrar);
diff --git a/yt/yt/client/driver/driver.cpp b/yt/yt/client/driver/driver.cpp
index b6f47f050b..a9a8bd685e 100644
--- a/yt/yt/client/driver/driver.cpp
+++ b/yt/yt/client/driver/driver.cpp
@@ -17,6 +17,7 @@
#include "internal_commands.h"
#include "proxy_discovery_cache.h"
#include "query_commands.h"
+#include "flow_commands.h"
#include <yt/yt/client/api/client_cache.h>
#include <yt/yt/client/api/connection.h>
@@ -361,6 +362,10 @@ public:
REGISTER_ALL(TGetBundleConfigCommand, "get_bundle_config", Null, Structured, false, false);
REGISTER_ALL(TSetBundleConfigCommand, "set_bundle_config", Structured, Null, false, false);
+ REGISTER_ALL(TStartPipelineCommand, "start_pipeline", Null, Structured, false, false);
+ REGISTER_ALL(TStopPipelineCommand, "stop_pipeline", Null, Structured, false, false);
+ REGISTER_ALL(TPausePipelineCommand, "pause_pipeline", Null, Structured, false, false);
+
if (Config_->EnableInternalCommands) {
REGISTER_ALL(TReadHunksCommand, "read_hunks", Null, Structured, false, true );
REGISTER_ALL(TWriteHunksCommand, "write_hunks", Null, Structured, false, true );
diff --git a/yt/yt/client/driver/flow_commands.cpp b/yt/yt/client/driver/flow_commands.cpp
new file mode 100644
index 0000000000..c0543f4ad2
--- /dev/null
+++ b/yt/yt/client/driver/flow_commands.cpp
@@ -0,0 +1,57 @@
+#include "flow_commands.h"
+
+namespace NYT::NDriver {
+
+using namespace NConcurrency;
+
+////////////////////////////////////////////////////////////////////////////////
+
+void TStartPipelineCommand::Register(TRegistrar registrar)
+{
+ registrar.Parameter("pipeline_path", &TThis::PipelinePath);
+}
+
+void TStartPipelineCommand::DoExecute(ICommandContextPtr context)
+{
+ auto client = context->GetClient();
+ WaitFor(client->StartPipeline(PipelinePath))
+ .ThrowOnError();
+
+ ProduceEmptyOutput(context);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+void TStopPipelineCommand::Register(TRegistrar registrar)
+{
+ registrar.Parameter("pipeline_path", &TThis::PipelinePath);
+}
+
+void TStopPipelineCommand::DoExecute(ICommandContextPtr context)
+{
+ auto client = context->GetClient();
+ WaitFor(client->StopPipeline(PipelinePath))
+ .ThrowOnError();
+
+ ProduceEmptyOutput(context);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+void TPausePipelineCommand::Register(TRegistrar registrar)
+{
+ registrar.Parameter("pipeline_path", &TThis::PipelinePath);
+}
+
+void TPausePipelineCommand::DoExecute(ICommandContextPtr context)
+{
+ auto client = context->GetClient();
+ WaitFor(client->PausePipeline(PipelinePath))
+ .ThrowOnError();
+
+ ProduceEmptyOutput(context);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT::NDriver
diff --git a/yt/yt/client/driver/flow_commands.h b/yt/yt/client/driver/flow_commands.h
new file mode 100644
index 0000000000..c6beb43dda
--- /dev/null
+++ b/yt/yt/client/driver/flow_commands.h
@@ -0,0 +1,75 @@
+#pragma once
+
+#include "command.h"
+
+#include <yt/yt/client/ypath/rich.h>
+
+namespace NYT::NDriver {
+
+////////////////////////////////////////////////////////////////////////////////
+
+class TStartPipelineCommand
+ : public TTypedCommand<NApi::TStartPipelineOptions>
+{
+public:
+ REGISTER_YSON_STRUCT_LITE(TStartPipelineCommand);
+
+ static void Register(TRegistrar registrar);
+
+private:
+ NYPath::TYPath PipelinePath;
+
+ void DoExecute(ICommandContextPtr context) override;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+class TStopPipelineCommand
+ : public TTypedCommand<NApi::TStopPipelineOptions>
+{
+public:
+ REGISTER_YSON_STRUCT_LITE(TStopPipelineCommand);
+
+ static void Register(TRegistrar registrar);
+
+private:
+ NYPath::TYPath PipelinePath;
+
+ void DoExecute(ICommandContextPtr context) override;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+class TPausePipelineCommand
+ : public TTypedCommand<NApi::TStopPipelineOptions>
+{
+public:
+ REGISTER_YSON_STRUCT_LITE(TPausePipelineCommand);
+
+ static void Register(TRegistrar registrar);
+
+private:
+ NYPath::TYPath PipelinePath;
+
+ void DoExecute(ICommandContextPtr context) override;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+class TGetPipelineStatusCommand
+ : public TTypedCommand<NApi::TGetPipelineStatusOptions>
+{
+public:
+ REGISTER_YSON_STRUCT_LITE(TGetPipelineStatusCommand);
+
+ static void Register(TRegistrar registrar);
+
+private:
+ NYPath::TYPath PipelinePath;
+
+ void DoExecute(ICommandContextPtr context) override;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT::NDriver
diff --git a/yt/yt/client/driver/ya.make b/yt/yt/client/driver/ya.make
index 7f030a6d8e..9604eb5848 100644
--- a/yt/yt/client/driver/ya.make
+++ b/yt/yt/client/driver/ya.make
@@ -22,6 +22,7 @@ SRCS(
table_commands.cpp
transaction_commands.cpp
internal_commands.cpp
+ flow_commands.cpp
)
PEERDIR(
diff --git a/yt/yt/client/federated/client.cpp b/yt/yt/client/federated/client.cpp
index e9bbbb7707..491fe228e7 100644
--- a/yt/yt/client/federated/client.cpp
+++ b/yt/yt/client/federated/client.cpp
@@ -26,13 +26,13 @@
namespace NYT::NClient::NFederated {
-////////////////////////////////////////////////////////////////////////////////
+using namespace NApi;
-namespace {
+////////////////////////////////////////////////////////////////////////////////
-using namespace NYT::NApi;
+static const auto& Logger = FederatedClientLogger;
-const auto& Logger = FederatedClientLogger;
+////////////////////////////////////////////////////////////////////////////////
DECLARE_REFCOUNTED_CLASS(TClient)
@@ -200,7 +200,6 @@ public:
UNIMPLEMENTED_METHOD(TFuture<void>, ExternalizeNode, (const NYPath::TYPath&, NObjectClient::TCellTag, const TExternalizeNodeOptions&));
UNIMPLEMENTED_METHOD(TFuture<void>, InternalizeNode, (const NYPath::TYPath&, const TInternalizeNodeOptions&));
UNIMPLEMENTED_METHOD(TFuture<NObjectClient::TObjectId>, CreateObject, (NObjectClient::EObjectType, const TCreateObjectOptions&));
-
UNIMPLEMENTED_METHOD(TFuture<ITableReaderPtr>, CreateTableReader, (const NYPath::TRichYPath&, const TTableReaderOptions&));
UNIMPLEMENTED_METHOD(TFuture<IFileReaderPtr>, CreateFileReader, (const NYPath::TYPath&, const TFileReaderOptions&));
UNIMPLEMENTED_METHOD(TFuture<ITableWriterPtr>, CreateTableWriter, (const NYPath::TRichYPath&, const TTableWriterOptions&));
@@ -242,7 +241,9 @@ class TClient
: public IClient
{
public:
- TClient(const std::vector<IClientPtr>& underlyingClients, TFederationConfigPtr config);
+ TClient(
+ const std::vector<IClientPtr>& underlyingClients,
+ TFederationConfigPtr config);
TFuture<TUnversionedLookupRowsResult> LookupRows(
const NYPath::TYPath& path,
@@ -309,7 +310,7 @@ public:
void Terminate() override
{ }
- // IClientBase Unsupported methods.
+ // IClientBase unsupported methods.
UNIMPLEMENTED_METHOD(TFuture<void>, SetNode, (const NYPath::TYPath&, const NYson::TYsonString&, const TSetNodeOptions&));
UNIMPLEMENTED_METHOD(TFuture<void>, MultisetAttributesNode, (const NYPath::TYPath&, const NYTree::IMapNodePtr&, const TMultisetAttributesNodeOptions&));
UNIMPLEMENTED_METHOD(TFuture<void>, RemoveNode, (const NYPath::TYPath&, const TRemoveNodeOptions&));
@@ -421,17 +422,20 @@ public:
UNIMPLEMENTED_METHOD(TFuture<void>, AlterQuery, (NQueryTrackerClient::TQueryId, const TAlterQueryOptions&));
UNIMPLEMENTED_METHOD(TFuture<NBundleControllerClient::TBundleConfigDescriptorPtr>, GetBundleConfig, (const TString&, const NBundleControllerClient::TGetBundleConfigOptions&));
UNIMPLEMENTED_METHOD(TFuture<void>, SetBundleConfig, (const TString&, const NBundleControllerClient::TBundleTargetConfigPtr&, const NBundleControllerClient::TSetBundleConfigOptions&));
-
UNIMPLEMENTED_METHOD(TFuture<ITableReaderPtr>, CreateTableReader, (const NYPath::TRichYPath&, const TTableReaderOptions&));
UNIMPLEMENTED_METHOD(TFuture<ITableWriterPtr>, CreateTableWriter, (const NYPath::TRichYPath&, const TTableWriterOptions&));
UNIMPLEMENTED_METHOD(TFuture<IFileReaderPtr>, CreateFileReader, (const NYPath::TYPath&, const TFileReaderOptions&));
UNIMPLEMENTED_METHOD(IFileWriterPtr, CreateFileWriter, (const NYPath::TRichYPath&, const TFileWriterOptions&));
UNIMPLEMENTED_METHOD(IJournalReaderPtr, CreateJournalReader, (const NYPath::TYPath&, const TJournalReaderOptions&));
UNIMPLEMENTED_METHOD(IJournalWriterPtr, CreateJournalWriter, (const NYPath::TYPath&, const TJournalWriterOptions&));
+ UNIMPLEMENTED_METHOD(TFuture<void>, StartPipeline, (const NYPath::TYPath&, const TStartPipelineOptions&));
+ UNIMPLEMENTED_METHOD(TFuture<void>, StopPipeline, (const NYPath::TYPath&, const TStopPipelineOptions&));
+ UNIMPLEMENTED_METHOD(TFuture<void>, PausePipeline, (const NYPath::TYPath&, const TPausePipelineOptions&));
+ UNIMPLEMENTED_METHOD(TFuture<TPipelineStatus>, GetPipelineStatus, (const NYPath::TYPath&, const TGetPipelineStatusOptions&));
+private:
friend class TTransaction;
-private:
struct TActiveClientInfo
{
IClientPtr Client;
@@ -740,11 +744,13 @@ DEFINE_REFCOUNTED_TYPE(TClient)
////////////////////////////////////////////////////////////////////////////////
-} // namespace
-
-NApi::IClientPtr CreateClient(const std::vector<NApi::IClientPtr>& clients, TFederationConfigPtr config)
+IClientPtr CreateClient(
+ std::vector<NApi::IClientPtr> clients,
+ TFederationConfigPtr config)
{
- return New<TClient>(clients, std::move(config));
+ return New<TClient>(
+ std::move(clients),
+ std::move(config));
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/client/federated/client.h b/yt/yt/client/federated/client.h
index 4502c43068..1028ab98c3 100644
--- a/yt/yt/client/federated/client.h
+++ b/yt/yt/client/federated/client.h
@@ -20,9 +20,11 @@ namespace NYT::NClient::NFederated {
////////////////////////////////////////////////////////////////////////////////
-//! Creates federated client with given underlying clients.
-NApi::IClientPtr CreateClient(const std::vector<NApi::IClientPtr>& clients, TFederationConfigPtr config);
+//! Creates a federated client with given underlying clients.
+NApi::IClientPtr CreateClient(
+ std::vector<NApi::IClientPtr> clients,
+ TFederationConfigPtr config);
////////////////////////////////////////////////////////////////////////////////
-} // NYT::NClient::NFederated
+} // namespace NYT::NClient::NFederated
diff --git a/yt/yt/client/hedging/hedging.cpp b/yt/yt/client/hedging/hedging.cpp
index 58da452676..a8f9b8c70d 100644
--- a/yt/yt/client/hedging/hedging.cpp
+++ b/yt/yt/client/hedging/hedging.cpp
@@ -38,6 +38,7 @@ namespace {
using namespace NYT;
using namespace NApi;
+using namespace NYPath;
using namespace NProfiling;
////////////////////////////////////////////////////////////////////////////////
@@ -74,41 +75,41 @@ public:
return {};
}
- RETRYABLE_METHOD(TFuture<TUnversionedLookupRowsResult>, LookupRows, (const NYPath::TYPath&, NTableClient::TNameTablePtr, const TSharedRange<NTableClient::TUnversionedRow>&, const TLookupRowsOptions&));
- RETRYABLE_METHOD(TFuture<TVersionedLookupRowsResult>, VersionedLookupRows, (const NYPath::TYPath&, NTableClient::TNameTablePtr, const TSharedRange<NTableClient::TUnversionedRow>&, const TVersionedLookupRowsOptions&));
+ RETRYABLE_METHOD(TFuture<TUnversionedLookupRowsResult>, LookupRows, (const TYPath&, NTableClient::TNameTablePtr, const TSharedRange<NTableClient::TUnversionedRow>&, const TLookupRowsOptions&));
+ RETRYABLE_METHOD(TFuture<TVersionedLookupRowsResult>, VersionedLookupRows, (const TYPath&, NTableClient::TNameTablePtr, const TSharedRange<NTableClient::TUnversionedRow>&, const TVersionedLookupRowsOptions&));
RETRYABLE_METHOD(TFuture<TSelectRowsResult>, SelectRows, (const TString&, const TSelectRowsOptions&));
- RETRYABLE_METHOD(TFuture<NQueueClient::IQueueRowsetPtr>, PullQueue, (const NYPath::TRichYPath&, i64, int, const NQueueClient::TQueueRowBatchReadOptions&, const TPullQueueOptions&));
- RETRYABLE_METHOD(TFuture<NQueueClient::IQueueRowsetPtr>, PullConsumer, (const NYPath::TRichYPath&, const NYPath::TRichYPath&, std::optional<i64>, int, const NQueueClient::TQueueRowBatchReadOptions&, const TPullConsumerOptions&));
- RETRYABLE_METHOD(TFuture<void>, RegisterQueueConsumer, (const NYPath::TRichYPath&, const NYPath::TRichYPath&, bool, const TRegisterQueueConsumerOptions&));
- RETRYABLE_METHOD(TFuture<void>, UnregisterQueueConsumer, (const NYPath::TRichYPath&, const NYPath::TRichYPath&, const TUnregisterQueueConsumerOptions&));
- RETRYABLE_METHOD(TFuture<std::vector<TListQueueConsumerRegistrationsResult>>, ListQueueConsumerRegistrations, (const std::optional<NYPath::TRichYPath>&, const std::optional<NYPath::TRichYPath>&, const TListQueueConsumerRegistrationsOptions&));
+ RETRYABLE_METHOD(TFuture<NQueueClient::IQueueRowsetPtr>, PullQueue, (const TRichYPath&, i64, int, const NQueueClient::TQueueRowBatchReadOptions&, const TPullQueueOptions&));
+ RETRYABLE_METHOD(TFuture<NQueueClient::IQueueRowsetPtr>, PullConsumer, (const TRichYPath&, const TRichYPath&, std::optional<i64>, int, const NQueueClient::TQueueRowBatchReadOptions&, const TPullConsumerOptions&));
+ RETRYABLE_METHOD(TFuture<void>, RegisterQueueConsumer, (const TRichYPath&, const TRichYPath&, bool, const TRegisterQueueConsumerOptions&));
+ RETRYABLE_METHOD(TFuture<void>, UnregisterQueueConsumer, (const TRichYPath&, const TRichYPath&, const TUnregisterQueueConsumerOptions&));
+ RETRYABLE_METHOD(TFuture<std::vector<TListQueueConsumerRegistrationsResult>>, ListQueueConsumerRegistrations, (const std::optional<TRichYPath>&, const std::optional<TRichYPath>&, const TListQueueConsumerRegistrationsOptions&));
RETRYABLE_METHOD(TFuture<NYson::TYsonString>, ExplainQuery, (const TString&, const TExplainQueryOptions&));
- RETRYABLE_METHOD(TFuture<ITableReaderPtr>, CreateTableReader, (const NYPath::TRichYPath&, const TTableReaderOptions&));
- RETRYABLE_METHOD(TFuture<NYson::TYsonString>, GetNode, (const NYPath::TYPath&, const TGetNodeOptions&));
- RETRYABLE_METHOD(TFuture<NYson::TYsonString>, ListNode, (const NYPath::TYPath&, const TListNodeOptions&));
- RETRYABLE_METHOD(TFuture<bool>, NodeExists, (const NYPath::TYPath&, const TNodeExistsOptions&));
- RETRYABLE_METHOD(TFuture<IFileReaderPtr>, CreateFileReader, (const NYPath::TYPath&, const TFileReaderOptions&));
+ RETRYABLE_METHOD(TFuture<ITableReaderPtr>, CreateTableReader, (const TRichYPath&, const TTableReaderOptions&));
+ RETRYABLE_METHOD(TFuture<NYson::TYsonString>, GetNode, (const TYPath&, const TGetNodeOptions&));
+ RETRYABLE_METHOD(TFuture<NYson::TYsonString>, ListNode, (const TYPath&, const TListNodeOptions&));
+ RETRYABLE_METHOD(TFuture<bool>, NodeExists, (const TYPath&, const TNodeExistsOptions&));
+ RETRYABLE_METHOD(TFuture<IFileReaderPtr>, CreateFileReader, (const TYPath&, const TFileReaderOptions&));
RETRYABLE_METHOD(TFuture<std::vector<TUnversionedLookupRowsResult>>, MultiLookupRows, (const std::vector<TMultiLookupSubrequest>&, const TMultiLookupOptions&));
// Unsupported methods.
UNSUPPORTED_METHOD(TFuture<ITransactionPtr>, StartTransaction, (NTransactionClient::ETransactionType, const TTransactionStartOptions&));
- UNSUPPORTED_METHOD(TFuture<ITableWriterPtr>, CreateTableWriter, (const NYPath::TRichYPath&, const TTableWriterOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, SetNode, (const NYPath::TYPath&, const NYson::TYsonString&, const TSetNodeOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, MultisetAttributesNode, (const NYPath::TYPath&, const NYTree::IMapNodePtr&, const TMultisetAttributesNodeOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, RemoveNode, (const NYPath::TYPath&, const TRemoveNodeOptions&));
- UNSUPPORTED_METHOD(TFuture<NCypressClient::TNodeId>, CreateNode, (const NYPath::TYPath&, NObjectClient::EObjectType, const TCreateNodeOptions&));
- UNSUPPORTED_METHOD(TFuture<TLockNodeResult>, LockNode, (const NYPath::TYPath&, NCypressClient::ELockMode, const TLockNodeOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, UnlockNode, (const NYPath::TYPath&, const TUnlockNodeOptions&));
- UNSUPPORTED_METHOD(TFuture<NCypressClient::TNodeId>, CopyNode, (const NYPath::TYPath&, const NYPath::TYPath&, const TCopyNodeOptions&));
- UNSUPPORTED_METHOD(TFuture<NCypressClient::TNodeId>, MoveNode, (const NYPath::TYPath&, const NYPath::TYPath&, const TMoveNodeOptions&));
- UNSUPPORTED_METHOD(TFuture<NCypressClient::TNodeId>, LinkNode, (const NYPath::TYPath&, const NYPath::TYPath&, const TLinkNodeOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, ConcatenateNodes, (const std::vector<NYPath::TRichYPath>&, const NYPath::TRichYPath&, const TConcatenateNodesOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, ExternalizeNode, (const NYPath::TYPath&, NObjectClient::TCellTag, const TExternalizeNodeOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, InternalizeNode, (const NYPath::TYPath&, const TInternalizeNodeOptions&));
+ UNSUPPORTED_METHOD(TFuture<ITableWriterPtr>, CreateTableWriter, (const TRichYPath&, const TTableWriterOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, SetNode, (const TYPath&, const NYson::TYsonString&, const TSetNodeOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, MultisetAttributesNode, (const TYPath&, const NYTree::IMapNodePtr&, const TMultisetAttributesNodeOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, RemoveNode, (const TYPath&, const TRemoveNodeOptions&));
+ UNSUPPORTED_METHOD(TFuture<NCypressClient::TNodeId>, CreateNode, (const TYPath&, NObjectClient::EObjectType, const TCreateNodeOptions&));
+ UNSUPPORTED_METHOD(TFuture<TLockNodeResult>, LockNode, (const TYPath&, NCypressClient::ELockMode, const TLockNodeOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, UnlockNode, (const TYPath&, const TUnlockNodeOptions&));
+ UNSUPPORTED_METHOD(TFuture<NCypressClient::TNodeId>, CopyNode, (const TYPath&, const TYPath&, const TCopyNodeOptions&));
+ UNSUPPORTED_METHOD(TFuture<NCypressClient::TNodeId>, MoveNode, (const TYPath&, const TYPath&, const TMoveNodeOptions&));
+ UNSUPPORTED_METHOD(TFuture<NCypressClient::TNodeId>, LinkNode, (const TYPath&, const TYPath&, const TLinkNodeOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, ConcatenateNodes, (const std::vector<TRichYPath>&, const TRichYPath&, const TConcatenateNodesOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, ExternalizeNode, (const TYPath&, NObjectClient::TCellTag, const TExternalizeNodeOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, InternalizeNode, (const TYPath&, const TInternalizeNodeOptions&));
UNSUPPORTED_METHOD(TFuture<NObjectClient::TObjectId>, CreateObject, (NObjectClient::EObjectType, const TCreateObjectOptions&));
- UNSUPPORTED_METHOD(IFileWriterPtr, CreateFileWriter, (const NYPath::TRichYPath&, const TFileWriterOptions&));
- UNSUPPORTED_METHOD(IJournalReaderPtr, CreateJournalReader, (const NYPath::TYPath&, const TJournalReaderOptions&));
- UNSUPPORTED_METHOD(IJournalWriterPtr, CreateJournalWriter, (const NYPath::TYPath&, const TJournalWriterOptions&));
+ UNSUPPORTED_METHOD(IFileWriterPtr, CreateFileWriter, (const TRichYPath&, const TFileWriterOptions&));
+ UNSUPPORTED_METHOD(IJournalReaderPtr, CreateJournalReader, (const TYPath&, const TJournalReaderOptions&));
+ UNSUPPORTED_METHOD(IJournalWriterPtr, CreateJournalWriter, (const TYPath&, const TJournalWriterOptions&));
// IClient methods.
// Unsupported methods.
@@ -117,35 +118,35 @@ public:
UNSUPPORTED_METHOD(const NChaosClient::IReplicationCardCachePtr&, GetReplicationCardCache, ());
UNSUPPORTED_METHOD(const NTransactionClient::ITimestampProviderPtr&, GetTimestampProvider, ());
UNSUPPORTED_METHOD(ITransactionPtr, AttachTransaction, (NTransactionClient::TTransactionId, const TTransactionAttachOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, MountTable, (const NYPath::TYPath&, const TMountTableOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, UnmountTable, (const NYPath::TYPath&, const TUnmountTableOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, RemountTable, (const NYPath::TYPath&, const TRemountTableOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, FreezeTable, (const NYPath::TYPath&, const TFreezeTableOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, UnfreezeTable, (const NYPath::TYPath&, const TUnfreezeTableOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, ReshardTable, (const NYPath::TYPath&, const std::vector<NTableClient::TUnversionedOwningRow>&, const TReshardTableOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, ReshardTable, (const NYPath::TYPath&, int, const TReshardTableOptions&));
- UNSUPPORTED_METHOD(TFuture<std::vector<NTabletClient::TTabletActionId>>, ReshardTableAutomatic, (const NYPath::TYPath&, const TReshardTableAutomaticOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, TrimTable, (const NYPath::TYPath&, int, i64, const TTrimTableOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, AlterTable, (const NYPath::TYPath&, const TAlterTableOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, MountTable, (const TYPath&, const TMountTableOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, UnmountTable, (const TYPath&, const TUnmountTableOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, RemountTable, (const TYPath&, const TRemountTableOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, FreezeTable, (const TYPath&, const TFreezeTableOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, UnfreezeTable, (const TYPath&, const TUnfreezeTableOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, ReshardTable, (const TYPath&, const std::vector<NTableClient::TUnversionedOwningRow>&, const TReshardTableOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, ReshardTable, (const TYPath&, int, const TReshardTableOptions&));
+ UNSUPPORTED_METHOD(TFuture<std::vector<NTabletClient::TTabletActionId>>, ReshardTableAutomatic, (const TYPath&, const TReshardTableAutomaticOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, TrimTable, (const TYPath&, int, i64, const TTrimTableOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, AlterTable, (const TYPath&, const TAlterTableOptions&));
UNSUPPORTED_METHOD(TFuture<void>, AlterTableReplica, (NTabletClient::TTableReplicaId, const TAlterTableReplicaOptions&));
UNSUPPORTED_METHOD(TFuture<void>, AlterReplicationCard, (NChaosClient::TReplicationCardId, const TAlterReplicationCardOptions&));
- UNSUPPORTED_METHOD(TFuture<std::vector<NTabletClient::TTableReplicaId>>, GetInSyncReplicas, (const NYPath::TYPath&, const NTableClient::TNameTablePtr&, const TSharedRange<NTableClient::TUnversionedRow>&, const TGetInSyncReplicasOptions&));
- UNSUPPORTED_METHOD(TFuture<std::vector<NTabletClient::TTableReplicaId>>, GetInSyncReplicas, (const NYPath::TYPath&, const TGetInSyncReplicasOptions&));
- UNSUPPORTED_METHOD(TFuture<std::vector<TTabletInfo>>, GetTabletInfos, (const NYPath::TYPath&, const std::vector<int>&, const TGetTabletInfosOptions&));
- UNSUPPORTED_METHOD(TFuture<TGetTabletErrorsResult>, GetTabletErrors, (const NYPath::TYPath&, const TGetTabletErrorsOptions&));
- UNSUPPORTED_METHOD(TFuture<std::vector<NTabletClient::TTabletActionId>>, BalanceTabletCells, (const TString&, const std::vector<NYPath::TYPath>&, const TBalanceTabletCellsOptions&));
- UNSUPPORTED_METHOD(TFuture<TSkynetSharePartsLocationsPtr>, LocateSkynetShare, (const NYPath::TRichYPath&, const TLocateSkynetShareOptions&));
- UNSUPPORTED_METHOD(TFuture<std::vector<NTableClient::TColumnarStatistics>>, GetColumnarStatistics, (const std::vector<NYPath::TRichYPath>&, const TGetColumnarStatisticsOptions&));
- UNSUPPORTED_METHOD(TFuture<TMultiTablePartitions>, PartitionTables, (const std::vector<NYPath::TRichYPath>&, const TPartitionTablesOptions&));
- UNSUPPORTED_METHOD(TFuture<NYson::TYsonString>, GetTablePivotKeys, (const NYPath::TYPath&, const TGetTablePivotKeysOptions&));
+ UNSUPPORTED_METHOD(TFuture<std::vector<NTabletClient::TTableReplicaId>>, GetInSyncReplicas, (const TYPath&, const NTableClient::TNameTablePtr&, const TSharedRange<NTableClient::TUnversionedRow>&, const TGetInSyncReplicasOptions&));
+ UNSUPPORTED_METHOD(TFuture<std::vector<NTabletClient::TTableReplicaId>>, GetInSyncReplicas, (const TYPath&, const TGetInSyncReplicasOptions&));
+ UNSUPPORTED_METHOD(TFuture<std::vector<TTabletInfo>>, GetTabletInfos, (const TYPath&, const std::vector<int>&, const TGetTabletInfosOptions&));
+ UNSUPPORTED_METHOD(TFuture<TGetTabletErrorsResult>, GetTabletErrors, (const TYPath&, const TGetTabletErrorsOptions&));
+ UNSUPPORTED_METHOD(TFuture<std::vector<NTabletClient::TTabletActionId>>, BalanceTabletCells, (const TString&, const std::vector<TYPath>&, const TBalanceTabletCellsOptions&));
+ UNSUPPORTED_METHOD(TFuture<TSkynetSharePartsLocationsPtr>, LocateSkynetShare, (const TRichYPath&, const TLocateSkynetShareOptions&));
+ UNSUPPORTED_METHOD(TFuture<std::vector<NTableClient::TColumnarStatistics>>, GetColumnarStatistics, (const std::vector<TRichYPath>&, const TGetColumnarStatisticsOptions&));
+ UNSUPPORTED_METHOD(TFuture<TMultiTablePartitions>, PartitionTables, (const std::vector<TRichYPath>&, const TPartitionTablesOptions&));
+ UNSUPPORTED_METHOD(TFuture<NYson::TYsonString>, GetTablePivotKeys, (const TYPath&, const TGetTablePivotKeysOptions&));
UNSUPPORTED_METHOD(TFuture<void>, CreateTableBackup, (const TBackupManifestPtr&, const TCreateTableBackupOptions&));
UNSUPPORTED_METHOD(TFuture<void>, RestoreTableBackup, (const TBackupManifestPtr&, const TRestoreTableBackupOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, TruncateJournal, (const NYPath::TYPath&, i64, const TTruncateJournalOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, TruncateJournal, (const TYPath&, i64, const TTruncateJournalOptions&));
UNSUPPORTED_METHOD(TFuture<TGetFileFromCacheResult>, GetFileFromCache, (const TString&, const TGetFileFromCacheOptions&));
- UNSUPPORTED_METHOD(TFuture<TPutFileToCacheResult>, PutFileToCache, (const NYPath::TYPath&, const TString&, const TPutFileToCacheOptions&));
+ UNSUPPORTED_METHOD(TFuture<TPutFileToCacheResult>, PutFileToCache, (const TYPath&, const TString&, const TPutFileToCacheOptions&));
UNSUPPORTED_METHOD(TFuture<void>, AddMember, (const TString&, const TString&, const TAddMemberOptions&));
UNSUPPORTED_METHOD(TFuture<void>, RemoveMember, (const TString&, const TString&, const TRemoveMemberOptions&));
- UNSUPPORTED_METHOD(TFuture<TCheckPermissionResponse>, CheckPermission, (const TString&, const NYPath::TYPath&, NYTree::EPermission, const TCheckPermissionOptions&));
+ UNSUPPORTED_METHOD(TFuture<TCheckPermissionResponse>, CheckPermission, (const TString&, const TYPath&, NYTree::EPermission, const TCheckPermissionOptions&));
UNSUPPORTED_METHOD(TFuture<TCheckPermissionByAclResult>, CheckPermissionByAcl, (const std::optional<TString>&, NYTree::EPermission, NYTree::INodePtr, const TCheckPermissionByAclOptions&));
UNSUPPORTED_METHOD(TFuture<void>, TransferAccountResources, (const TString&, const TString&, NYTree::INodePtr, const TTransferAccountResourcesOptions&));
UNSUPPORTED_METHOD(TFuture<void>, TransferPoolResources, (const TString&, const TString&, const TString&, NYTree::INodePtr, const TTransferPoolResourcesOptions&));
@@ -156,7 +157,7 @@ public:
UNSUPPORTED_METHOD(TFuture<void>, CompleteOperation, (const NScheduler::TOperationIdOrAlias&, const TCompleteOperationOptions&));
UNSUPPORTED_METHOD(TFuture<void>, UpdateOperationParameters, (const NScheduler::TOperationIdOrAlias&, const NYson::TYsonString&, const TUpdateOperationParametersOptions&));
UNSUPPORTED_METHOD(TFuture<TOperation>, GetOperation, (const NScheduler::TOperationIdOrAlias&, const TGetOperationOptions&));
- UNSUPPORTED_METHOD(TFuture<void>, DumpJobContext, (NJobTrackerClient::TJobId, const NYPath::TYPath&, const TDumpJobContextOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, DumpJobContext, (NJobTrackerClient::TJobId, const TYPath&, const TDumpJobContextOptions&));
UNSUPPORTED_METHOD(TFuture<NConcurrency::IAsyncZeroCopyInputStreamPtr>, GetJobInput, (NJobTrackerClient::TJobId, const TGetJobInputOptions&));
UNSUPPORTED_METHOD(TFuture<NYson::TYsonString>, GetJobInputPaths, (NJobTrackerClient::TJobId, const TGetJobInputPathsOptions&));
UNSUPPORTED_METHOD(TFuture<NYson::TYsonString>, GetJobSpec, (NJobTrackerClient::TJobId, const TGetJobSpecOptions&));
@@ -198,7 +199,7 @@ public:
UNSUPPORTED_METHOD(TFuture<TDestroyChunkLocationsResult>, DestroyChunkLocations, (const TString&, bool, const std::vector<TGuid>&, const TDestroyChunkLocationsOptions&));
UNSUPPORTED_METHOD(TFuture<TResurrectChunkLocationsResult>, ResurrectChunkLocations, (const TString&, const std::vector<TGuid>&, const TResurrectChunkLocationsOptions&));
UNSUPPORTED_METHOD(TFuture<TRequestRestartResult>, RequestRestart, (const TString&, const TRequestRestartOptions&));
- UNSUPPORTED_METHOD(TFuture<TPullRowsResult>, PullRows, (const NYPath::TYPath&, const TPullRowsOptions&));
+ UNSUPPORTED_METHOD(TFuture<TPullRowsResult>, PullRows, (const TYPath&, const TPullRowsOptions&));
UNSUPPORTED_METHOD(TFuture<void>, SetUserPassword, (const TString&, const TString&, const TString&, const TSetUserPasswordOptions&));
UNSUPPORTED_METHOD(TFuture<TIssueTokenResult>, IssueToken, (const TString&, const TString&, const TIssueTokenOptions&));
UNSUPPORTED_METHOD(TFuture<void>, RevokeToken, (const TString&, const TString&, const TString&, const TRevokeTokenOptions&));
@@ -212,9 +213,13 @@ public:
UNSUPPORTED_METHOD(TFuture<void>, AlterQuery, (NQueryTrackerClient::TQueryId, const TAlterQueryOptions&));
UNSUPPORTED_METHOD(TFuture<NBundleControllerClient::TBundleConfigDescriptorPtr>, GetBundleConfig, (const TString&, const NBundleControllerClient::TGetBundleConfigOptions&));
UNSUPPORTED_METHOD(TFuture<void>, SetBundleConfig, (const TString&, const NBundleControllerClient::TBundleTargetConfigPtr&, const NBundleControllerClient::TSetBundleConfigOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, StartPipeline, (const TYPath&, const TStartPipelineOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, StopPipeline, (const TYPath&, const TStopPipelineOptions&));
+ UNSUPPORTED_METHOD(TFuture<void>, PausePipeline, (const TYPath&, const TPausePipelineOptions&));
+ UNSUPPORTED_METHOD(TFuture<TPipelineStatus>, GetPipelineStatus, (const TYPath&, const TGetPipelineStatusOptions&));
private:
- THedgingExecutorPtr Executor_;
+ const THedgingExecutorPtr Executor_;
};
} // namespace
@@ -288,4 +293,6 @@ THedgingClientOptions GetHedgingClientOptions(const THedgingClientConfig& config
});
}
+////////////////////////////////////////////////////////////////////////////////
+
} // namespace NYT::NClient::NHedging::NRpc
diff --git a/yt/yt/client/scheduler/public.h b/yt/yt/client/scheduler/public.h
index 63dd9b792d..655d03f7f4 100644
--- a/yt/yt/client/scheduler/public.h
+++ b/yt/yt/client/scheduler/public.h
@@ -48,7 +48,7 @@ YT_DEFINE_ERROR_ENUM(
((NoSuchOperation) (200))
((InvalidOperationState) (201))
((TooManyOperations) (202))
- ((NoSuchJob) (203))
+ ((NoSuchAllocation) (203))
((AgentRevoked) (204))
((OperationFailedOnJobRestart) (210))
((OperationFailedWithInconsistentLocking) (211))
diff --git a/yt/yt/client/table_client/config.cpp b/yt/yt/client/table_client/config.cpp
index 8c9edb0477..a4de89b4f1 100644
--- a/yt/yt/client/table_client/config.cpp
+++ b/yt/yt/client/table_client/config.cpp
@@ -5,6 +5,9 @@
#include <yt/yt/client/tablet_client/config.h>
#include <yt/yt/client/tablet_client/helpers.h>
+#include <yt/yt/core/compression/codec.h>
+#include <yt/yt/core/compression/dictionary_codec.h>
+
#include <yt/yt/core/ytree/convert.h>
#include <yt/yt/core/misc/singleton.h>
@@ -235,6 +238,70 @@ void TKeyPrefixFilterWriterConfig::Register(TRegistrar registrar)
///////////////////////////////////////////////////////////////////////////////
+void TDictionaryCompressionConfig::Register(TRegistrar registrar)
+{
+ registrar.Parameter("enable", &TThis::Enable)
+ .Default(false);
+ registrar.Parameter("rebuild_period", &TThis::RebuildPeriod)
+ .Default(TDuration::Hours(3));
+ registrar.Parameter("backoff_period", &TThis::BackoffPeriod)
+ .Default(TDuration::Minutes(10));
+ registrar.Parameter("desired_processed_chunk_count", &TThis::DesiredProcessedChunkCount)
+ .GreaterThan(0)
+ .Default(10);
+ registrar.Parameter("max_processed_chunk_count", &TThis::MaxProcessedChunkCount)
+ .GreaterThan(0)
+ .Default(50);
+ registrar.Parameter("desired_sample_count", &TThis::DesiredSampleCount)
+ .GreaterThan(0)
+ .Default(10'000);
+ registrar.Parameter("desired_sampled_data_weight", &TThis::DesiredSampledDataWeight)
+ .GreaterThan(0)
+ .Default(3_MB);
+ registrar.Parameter("max_processed_sample_count", &TThis::MaxProcessedSampleCount)
+ .GreaterThan(0)
+ .Default(50'000);
+ registrar.Parameter("max_processed_data_weight", &TThis::MaxProcessedDataWeight)
+ .GreaterThan(0)
+ .Default(50_MB);
+ registrar.Parameter("max_fetched_blocks_size", &TThis::MaxFetchedBlocksSize)
+ .GreaterThan(0)
+ .Default(1_GB);
+ registrar.Parameter("column_dictionary_size", &TThis::ColumnDictionarySize)
+ .GreaterThanOrEqual(NCompression::GetDictionaryCompressionCodec()->GetMinDictionarySize())
+ .Default(32_KB);
+ registrar.Parameter("applied_policies", &TThis::AppliedPolicies)
+ .Default({
+ EDictionaryCompressionPolicy::LargeChunkFirst,
+ EDictionaryCompressionPolicy::FreshChunkFirst,
+ });
+
+ registrar.Postprocessor([] (TThis* config) {
+ if (config->DesiredSampleCount > config->MaxProcessedSampleCount) {
+ THROW_ERROR_EXCEPTION("\"desired_sample_count\" cannot be greater than \"max_processed_sample_count\"");
+ }
+
+ if (config->DesiredSampledDataWeight > config->MaxProcessedDataWeight) {
+ THROW_ERROR_EXCEPTION("\"desired_sampled_data_weight\" cannot be greater than \"max_processed_data_weight\"");
+ }
+
+ if (config->MaxProcessedDataWeight > config->MaxFetchedBlocksSize) {
+ THROW_ERROR_EXCEPTION("\"max_processed_data_weight\" cannot be greater than \"max_fetched_blocks_size\"");
+ }
+
+ if (config->ColumnDictionarySize > config->DesiredSampledDataWeight) {
+ THROW_ERROR_EXCEPTION("\"column_dictionary_size\" cannot be greater than \"desired_sampled_data_weight\"");
+ }
+
+ if (config->AppliedPolicies.contains(EDictionaryCompressionPolicy::None)) {
+ THROW_ERROR_EXCEPTION("\"applied_policies\" cannot contain policy %Qlv",
+ EDictionaryCompressionPolicy::None);
+ }
+ });
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
void TBatchHunkReaderConfig::Register(TRegistrar registrar)
{
registrar.Parameter("max_hunk_count_per_read", &TThis::MaxHunkCountPerRead)
diff --git a/yt/yt/client/table_client/config.h b/yt/yt/client/table_client/config.h
index df9869f549..952dd2a94e 100644
--- a/yt/yt/client/table_client/config.h
+++ b/yt/yt/client/table_client/config.h
@@ -211,6 +211,53 @@ DEFINE_REFCOUNTED_TYPE(TKeyPrefixFilterWriterConfig)
////////////////////////////////////////////////////////////////////////////////
+class TDictionaryCompressionConfig
+ : public virtual NYTree::TYsonStruct
+{
+public:
+ bool Enable;
+
+ //! Idle period after last successful or unsuccessful building iteration.
+ TDuration RebuildPeriod;
+ TDuration BackoffPeriod;
+
+ //! Desired and maximum number of chunks in tablet to be sampled.
+ int DesiredProcessedChunkCount;
+ int MaxProcessedChunkCount;
+
+ //! Column-wise desired number and weight of samples to be used when building dictionary.
+ //! Sampling is stopped if that number of samples is encountered in all columns.
+ //! NB: Sample count excludes null values.
+ int DesiredSampleCount;
+ i64 DesiredSampledDataWeight;
+
+ //! Column-wise max number and weight of samples to be fetched.
+ //! Sampling is stopped if that number of samples is encountered in any column.
+ //! NB: Sample count includes null values.
+ int MaxProcessedSampleCount;
+ i64 MaxProcessedDataWeight;
+
+ //! Limit on total size of fetched blocks.
+ i64 MaxFetchedBlocksSize;
+
+ //! Max size of result column dictionary.
+ //! Recommended to be ~100 times less than weight of samples for that column.
+ i64 ColumnDictionarySize;
+
+ //! Subset of all dictionary building policies.
+ //! Will build and apply dictionaries only from this subset.
+ //! Upon each chunk compression will independently decide which dictionary fits best.
+ THashSet<EDictionaryCompressionPolicy> AppliedPolicies;
+
+ REGISTER_YSON_STRUCT(TDictionaryCompressionConfig);
+
+ static void Register(TRegistrar registrar);
+};
+
+DEFINE_REFCOUNTED_TYPE(TDictionaryCompressionConfig)
+
+////////////////////////////////////////////////////////////////////////////////
+
class TBatchHunkReaderConfig
: public virtual NYTree::TYsonStruct
{
diff --git a/yt/yt/client/table_client/public.h b/yt/yt/client/table_client/public.h
index ca4b6de2af..8ecb077fba 100644
--- a/yt/yt/client/table_client/public.h
+++ b/yt/yt/client/table_client/public.h
@@ -43,6 +43,7 @@ class TColumnRenameDescriptor;
class THunkChunkRef;
class TColumnMetaExt;
class TVersionedRowDigestExt;
+class TCompressionDictionaryExt;
} // namespace NProto
@@ -215,6 +216,18 @@ DEFINE_ENUM(EMisconfiguredPartitionTactics,
((Skip) (1))
);
+//! NB: This enum is part of the persistent state.
+DEFINE_ENUM(EDictionaryCompressionPolicy,
+ // Placeholder representing null dictionary.
+ ((None) (0))
+
+ // Sample chunks according to weight.
+ ((LargeChunkFirst) (1))
+
+ // Sample chunks according to creation time.
+ ((FreshChunkFirst) (2))
+);
+
using TTableId = NCypressClient::TNodeId;
using TTableCollocationId = NObjectClient::TObjectId;
using TMasterTableSchemaId = NObjectClient::TObjectId;
@@ -335,6 +348,8 @@ DECLARE_REFCOUNTED_CLASS(TChunkWriterConfig)
DECLARE_REFCOUNTED_CLASS(TKeyFilterWriterConfig)
DECLARE_REFCOUNTED_CLASS(TKeyPrefixFilterWriterConfig)
+DECLARE_REFCOUNTED_CLASS(TDictionaryCompressionConfig)
+
DECLARE_REFCOUNTED_CLASS(TBatchHunkReaderConfig)
DECLARE_REFCOUNTED_CLASS(TTableReaderConfig)
diff --git a/yt/yt/client/unittests/mock/client.cpp b/yt/yt/client/unittests/mock/client.cpp
new file mode 100644
index 0000000000..4aa0842c8d
--- /dev/null
+++ b/yt/yt/client/unittests/mock/client.cpp
@@ -0,0 +1,29 @@
+#include "client.h"
+
+namespace NYT::NApi {
+
+////////////////////////////////////////////////////////////////////////////////
+
+const NTabletClient::ITableMountCachePtr& TMockClient::GetTableMountCache()
+{
+ return TableMountCache_;
+}
+
+void TMockClient::SetTableMountCache(NTabletClient::ITableMountCachePtr value)
+{
+ TableMountCache_ = std::move(value);
+}
+
+const NTransactionClient::ITimestampProviderPtr& TMockClient::GetTimestampProvider()
+{
+ return TimestampProvider_;
+}
+
+void TMockClient::SetTimestampProvider(NTransactionClient::ITimestampProviderPtr value)
+{
+ TimestampProvider_ = std::move(value);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT::NApi
diff --git a/yt/yt/client/unittests/mock/client.h b/yt/yt/client/unittests/mock/client.h
index 4fc2eae7a5..e66776c119 100644
--- a/yt/yt/client/unittests/mock/client.h
+++ b/yt/yt/client/unittests/mock/client.h
@@ -27,40 +27,52 @@ class TMockClient
: public IClient
{
public:
+ const NTabletClient::ITableMountCachePtr& GetTableMountCache() override;
+ void SetTableMountCache(NTabletClient::ITableMountCachePtr value);
+
+ const NTransactionClient::ITimestampProviderPtr& GetTimestampProvider() override;
+ void SetTimestampProvider(NTransactionClient::ITimestampProviderPtr value);
+
MOCK_METHOD(IConnectionPtr, GetConnection, (), (override));
MOCK_METHOD(std::optional<TStringBuf>, GetClusterName, (bool fetchIfNull), (override));
MOCK_METHOD(TFuture<ITransactionPtr>, StartTransaction, (
NTransactionClient::ETransactionType type,
- const TTransactionStartOptions& options), (override));
+ const TTransactionStartOptions& options),
+ (override));
MOCK_METHOD(TFuture<TUnversionedLookupRowsResult>, LookupRows, (
const NYPath::TYPath& path,
NTableClient::TNameTablePtr nameTable,
const TSharedRange<NTableClient::TLegacyKey>& keys,
- const TLookupRowsOptions& options), (override));
+ const TLookupRowsOptions& options),
+ (override));
MOCK_METHOD(TFuture<TVersionedLookupRowsResult>, VersionedLookupRows, (
const NYPath::TYPath& path,
NTableClient::TNameTablePtr nameTable,
const TSharedRange<NTableClient::TLegacyKey>& keys,
- const TVersionedLookupRowsOptions& options), (override));
+ const TVersionedLookupRowsOptions& options),
+ (override));
MOCK_METHOD(TFuture<std::vector<TUnversionedLookupRowsResult>>, MultiLookupRows, (
const std::vector<TMultiLookupSubrequest>& subrequests,
- const TMultiLookupOptions& options), (override));
+ const TMultiLookupOptions& options),
+ (override));
MOCK_METHOD(TFuture<TSelectRowsResult>, SelectRows, (
const TString& query,
- const TSelectRowsOptions& options), (override));
+ const TSelectRowsOptions& options),
+ (override));
MOCK_METHOD(TFuture<NQueueClient::IQueueRowsetPtr>, PullQueue, (
const NYPath::TRichYPath& queuePath,
i64 offset,
int partitionIndex,
const NQueueClient::TQueueRowBatchReadOptions& rowBatchReadOptions,
- const TPullQueueOptions& options), (override));
+ const TPullQueueOptions& options),
+ (override));
MOCK_METHOD(TFuture<NQueueClient::IQueueRowsetPtr>, PullConsumer, (
const NYPath::TRichYPath& consumerPath,
@@ -68,503 +80,602 @@ public:
std::optional<i64> offset,
int partitionIndex,
const NQueueClient::TQueueRowBatchReadOptions& rowBatchReadOptions,
- const TPullConsumerOptions& options), (override));
+ const TPullConsumerOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, RegisterQueueConsumer, (
const NYPath::TRichYPath& queuePath,
const NYPath::TRichYPath& consumerPath,
bool vital,
- const TRegisterQueueConsumerOptions& options), (override));
+ const TRegisterQueueConsumerOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, UnregisterQueueConsumer, (
const NYPath::TRichYPath& queuePath,
const NYPath::TRichYPath& consumerPath,
- const TUnregisterQueueConsumerOptions& options), (override));
+ const TUnregisterQueueConsumerOptions& options),
+ (override));
MOCK_METHOD(TFuture<std::vector<TListQueueConsumerRegistrationsResult>>, ListQueueConsumerRegistrations, (
const std::optional<NYPath::TRichYPath>& queuePath,
const std::optional<NYPath::TRichYPath>& consumerPath,
- const TListQueueConsumerRegistrationsOptions& options), (override));
+ const TListQueueConsumerRegistrationsOptions& options),
+ (override));
MOCK_METHOD(TFuture<NYson::TYsonString>, ExplainQuery, (
const TString& query,
- const TExplainQueryOptions& options), (override));
+ const TExplainQueryOptions& options),
+ (override));
MOCK_METHOD(TFuture<TPullRowsResult>, PullRows, (
const NYPath::TYPath& path,
- const TPullRowsOptions& options), (override));
+ const TPullRowsOptions& options),
+ (override));
MOCK_METHOD(TFuture<ITableReaderPtr>, CreateTableReader, (
const NYPath::TRichYPath& path,
- const TTableReaderOptions& options), (override));
+ const TTableReaderOptions& options),
+ (override));
MOCK_METHOD(TFuture<ITableWriterPtr>, CreateTableWriter, (
const NYPath::TRichYPath& path,
- const TTableWriterOptions& options), (override));
+ const TTableWriterOptions& options),
+ (override));
MOCK_METHOD(TFuture<NYson::TYsonString>, GetNode, (
const NYPath::TYPath& path,
- const TGetNodeOptions& options), (override));
+ const TGetNodeOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, SetNode, (
const NYPath::TYPath& path,
const NYson::TYsonString& value,
- const TSetNodeOptions& options), (override));
+ const TSetNodeOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, MultisetAttributesNode, (
const NYPath::TYPath& path,
const NYTree::IMapNodePtr& attributes,
- const TMultisetAttributesNodeOptions& options), (override));
+ const TMultisetAttributesNodeOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, RemoveNode, (
const NYPath::TYPath& path,
- const TRemoveNodeOptions& options), (override));
+ const TRemoveNodeOptions& options),
+ (override));
MOCK_METHOD(TFuture<NYson::TYsonString>, ListNode, (
const NYPath::TYPath& path,
- const TListNodeOptions& options), (override));
+ const TListNodeOptions& options),
+ (override));
MOCK_METHOD(TFuture<NCypressClient::TNodeId>, CreateNode, (
const NYPath::TYPath& path,
NObjectClient::EObjectType type,
- const TCreateNodeOptions& options), (override));
+ const TCreateNodeOptions& options),
+ (override));
MOCK_METHOD(TFuture<TLockNodeResult>, LockNode, (
const NYPath::TYPath& path,
NCypressClient::ELockMode mode,
- const TLockNodeOptions& options), (override));
+ const TLockNodeOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, UnlockNode, (
const NYPath::TYPath& path,
- const TUnlockNodeOptions& options), (override));
+ const TUnlockNodeOptions& options),
+ (override));
MOCK_METHOD(TFuture<NCypressClient::TNodeId>, CopyNode, (
const NYPath::TYPath& srcPath,
const NYPath::TYPath& dstPath,
- const TCopyNodeOptions& options), (override));
+ const TCopyNodeOptions& options),
+ (override));
MOCK_METHOD(TFuture<NCypressClient::TNodeId>, MoveNode, (
const NYPath::TYPath& srcPath,
const NYPath::TYPath& dstPath,
- const TMoveNodeOptions& options), (override));
+ const TMoveNodeOptions& options),
+ (override));
MOCK_METHOD(TFuture<NCypressClient::TNodeId>, LinkNode, (
const NYPath::TYPath& srcPath,
const NYPath::TYPath& dstPath,
- const TLinkNodeOptions& options), (override));
+ const TLinkNodeOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, ConcatenateNodes, (
const std::vector<NYPath::TRichYPath>& srcPaths,
const NYPath::TRichYPath& dstPath,
- const TConcatenateNodesOptions& options), (override));
+ const TConcatenateNodesOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, ExternalizeNode, (
const NYPath::TYPath& path,
NObjectClient::TCellTag cellTag,
- const TExternalizeNodeOptions& options), (override));
+ const TExternalizeNodeOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, InternalizeNode, (
const NYPath::TYPath& path,
- const TInternalizeNodeOptions& options), (override));
+ const TInternalizeNodeOptions& options),
+ (override));
MOCK_METHOD(TFuture<bool>, NodeExists, (
const NYPath::TYPath& path,
- const TNodeExistsOptions& options), (override));
+ const TNodeExistsOptions& options),
+ (override));
MOCK_METHOD(TFuture<NObjectClient::TObjectId>, CreateObject, (
NObjectClient::EObjectType type,
- const TCreateObjectOptions& options), (override));
+ const TCreateObjectOptions& options),
+ (override));
MOCK_METHOD(TFuture<IFileReaderPtr>, CreateFileReader, (
const NYPath::TYPath& path,
- const TFileReaderOptions& options), (override));
+ const TFileReaderOptions& options),
+ (override));
MOCK_METHOD(IFileWriterPtr, CreateFileWriter, (
const NYPath::TRichYPath& path,
- const TFileWriterOptions& options), (override));
+ const TFileWriterOptions& options),
+ (override));
MOCK_METHOD(IJournalReaderPtr, CreateJournalReader, (
const NYPath::TYPath& path,
- const TJournalReaderOptions& options), (override));
+ const TJournalReaderOptions& options),
+ (override));
MOCK_METHOD(IJournalWriterPtr, CreateJournalWriter, (
const NYPath::TYPath& path,
- const TJournalWriterOptions& options), (override));
+ const TJournalWriterOptions& options),
+ (override));
- MOCK_METHOD(TFuture<int>, BuildSnapshot, (const TBuildSnapshotOptions& options), (override));
+ MOCK_METHOD(TFuture<int>, BuildSnapshot, (const TBuildSnapshotOptions& options),
+ (override));
MOCK_METHOD(TFuture<TCellIdToSnapshotIdMap>, BuildMasterSnapshots, (
- const TBuildMasterSnapshotsOptions& options), (override));
+ const TBuildMasterSnapshotsOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, ExitReadOnly, (
NHydra::TCellId cellId,
- const TExitReadOnlyOptions& options), (override));
+ const TExitReadOnlyOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, MasterExitReadOnly, (
- const TMasterExitReadOnlyOptions& options), (override));
+ const TMasterExitReadOnlyOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, DiscombobulateNonvotingPeers, (
NHydra::TCellId cellId,
- const TDiscombobulateNonvotingPeersOptions& options), (override));
+ const TDiscombobulateNonvotingPeersOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, SwitchLeader, (
NHydra::TCellId cellId,
const TString& newLeaderAddress,
- const TSwitchLeaderOptions& options), (override));
+ const TSwitchLeaderOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, ResetStateHash, (
NHydra::TCellId cellId,
- const TResetStateHashOptions& options), (override));
+ const TResetStateHashOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, GCCollect, (
- const TGCCollectOptions& options), (override));
+ const TGCCollectOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, KillProcess, (
const TString& address,
- const TKillProcessOptions& options), (override));
+ const TKillProcessOptions& options),
+ (override));
MOCK_METHOD(TFuture<TString>, WriteCoreDump, (
const TString& address,
- const TWriteCoreDumpOptions& options), (override));
+ const TWriteCoreDumpOptions& options),
+ (override));
MOCK_METHOD(TFuture<TGuid>, WriteLogBarrier, (
const TString& address,
- const TWriteLogBarrierOptions& options), (override));
+ const TWriteLogBarrierOptions& options),
+ (override));
MOCK_METHOD(TFuture<TString>, WriteOperationControllerCoreDump, (
NJobTrackerClient::TOperationId operationId,
- const TWriteOperationControllerCoreDumpOptions& options), (override));
+ const TWriteOperationControllerCoreDumpOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, HealExecNode, (
const TString& address,
- const THealExecNodeOptions& options), (override));
+ const THealExecNodeOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, SuspendCoordinator, (
NObjectClient::TCellId coordinatorCellid,
- const TSuspendCoordinatorOptions& options), (override));
+ const TSuspendCoordinatorOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, ResumeCoordinator, (
NObjectClient::TCellId coordinatorCellid,
- const TResumeCoordinatorOptions& options), (override));
+ const TResumeCoordinatorOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, MigrateReplicationCards, (
NObjectClient::TCellId chaosCellid,
- const TMigrateReplicationCardsOptions& options), (override));
+ const TMigrateReplicationCardsOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, SuspendChaosCells, (
const std::vector<NObjectClient::TCellId>& cellIds,
- const TSuspendChaosCellsOptions& options), (override));
+ const TSuspendChaosCellsOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, ResumeChaosCells, (
const std::vector<NObjectClient::TCellId>& cellIds,
- const TResumeChaosCellsOptions& options), (override));
+ const TResumeChaosCellsOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, SuspendTabletCells, (
const std::vector<NObjectClient::TCellId>& cellIds,
- const TSuspendTabletCellsOptions& options), (override));
+ const TSuspendTabletCellsOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, ResumeTabletCells, (
const std::vector<NObjectClient::TCellId>& cellIds,
- const TResumeTabletCellsOptions& options), (override));
+ const TResumeTabletCellsOptions& options),
+ (override));
MOCK_METHOD(TFuture<TMaintenanceId>, AddMaintenance, (
EMaintenanceComponent component,
const TString& address,
EMaintenanceType type,
const TString& comment,
- const TAddMaintenanceOptions& options), (override));
+ const TAddMaintenanceOptions& options),
+ (override));
MOCK_METHOD(TFuture<TMaintenanceCounts>, RemoveMaintenance, (
EMaintenanceComponent component,
const TString& address,
const TMaintenanceFilter& filter,
- const TRemoveMaintenanceOptions& options), (override));
-
- // IClient
- NTabletClient::ITableMountCachePtr TableMountCache;
- NTransactionClient::ITimestampProviderPtr TimestampProvider;
-
- MOCK_METHOD(void, Terminate, (), (override));
- MOCK_METHOD(const NChaosClient::IReplicationCardCachePtr&, GetReplicationCardCache, (), (override));
+ const TRemoveMaintenanceOptions& options),
+ (override));
- const NTabletClient::ITableMountCachePtr& GetTableMountCache() override
- {
- return TableMountCache;
- }
- const NTransactionClient::ITimestampProviderPtr& GetTimestampProvider() override
- {
- return TimestampProvider;
- }
+ MOCK_METHOD(void, Terminate, (),
+ (override));
+ MOCK_METHOD(const NChaosClient::IReplicationCardCachePtr&, GetReplicationCardCache, (),
+ (override));
MOCK_METHOD(ITransactionPtr, AttachTransaction, (
NTransactionClient::TTransactionId transactionId,
- const TTransactionAttachOptions& options), (override));
+ const TTransactionAttachOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, MountTable, (
const NYPath::TYPath& path,
- const TMountTableOptions& options), (override));
+ const TMountTableOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, UnmountTable, (
const NYPath::TYPath& path,
- const TUnmountTableOptions& options), (override));
+ const TUnmountTableOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, RemountTable, (
const NYPath::TYPath& path,
- const TRemountTableOptions& options), (override));
+ const TRemountTableOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, FreezeTable, (
const NYPath::TYPath& path,
- const TFreezeTableOptions& options), (override));
+ const TFreezeTableOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, UnfreezeTable, (
const NYPath::TYPath& path,
- const TUnfreezeTableOptions& options), (override));
+ const TUnfreezeTableOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, ReshardTable, (
const NYPath::TYPath& path,
const std::vector<NTableClient::TLegacyOwningKey>& pivotKeys,
- const TReshardTableOptions& options), (override));
+ const TReshardTableOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, ReshardTable, (
const NYPath::TYPath& path,
int tabletCount,
- const TReshardTableOptions& options), (override));
+ const TReshardTableOptions& options),
+ (override));
MOCK_METHOD(TFuture<std::vector<NTabletClient::TTabletActionId>>, ReshardTableAutomatic, (
const NYPath::TYPath& path,
- const TReshardTableAutomaticOptions& options), (override));
+ const TReshardTableAutomaticOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, TrimTable, (
const NYPath::TYPath& path,
int tabletIndex,
i64 trimmedRowCount,
- const TTrimTableOptions& options), (override));
+ const TTrimTableOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, AlterTable, (
const NYPath::TYPath& path,
- const TAlterTableOptions& options), (override));
+ const TAlterTableOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, AlterTableReplica, (
NTabletClient::TTableReplicaId replicaId,
- const TAlterTableReplicaOptions& options), (override));
+ const TAlterTableReplicaOptions& options),
+ (override));
MOCK_METHOD(TFuture<NYson::TYsonString>, GetTablePivotKeys, (
const NYPath::TYPath& path,
- const TGetTablePivotKeysOptions& options), (override));
+ const TGetTablePivotKeysOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, CreateTableBackup,(
const TBackupManifestPtr& manifest,
- const TCreateTableBackupOptions& options), (override));
+ const TCreateTableBackupOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, RestoreTableBackup, (
const TBackupManifestPtr& manifest,
- const TRestoreTableBackupOptions& options), (override));
+ const TRestoreTableBackupOptions& options),
+ (override));
MOCK_METHOD(TFuture<std::vector<NTabletClient::TTableReplicaId>>, GetInSyncReplicas, (
const NYPath::TYPath& path,
const NTableClient::TNameTablePtr& nameTable,
const TSharedRange<NTableClient::TLegacyKey>& keys,
- const TGetInSyncReplicasOptions& options), (override));
+ const TGetInSyncReplicasOptions& options),
+ (override));
MOCK_METHOD(TFuture<std::vector<NTabletClient::TTableReplicaId>>, GetInSyncReplicas, (
const NYPath::TYPath& path,
- const TGetInSyncReplicasOptions& options), (override));
+ const TGetInSyncReplicasOptions& options),
+ (override));
MOCK_METHOD(TFuture<std::vector<TTabletInfo>>, GetTabletInfos, (
const NYPath::TYPath& path,
const std::vector<int>& tabletIndexes,
- const TGetTabletInfosOptions& options), (override));
+ const TGetTabletInfosOptions& options),
+ (override));
MOCK_METHOD(TFuture<TGetTabletErrorsResult>, GetTabletErrors, (
const NYPath::TYPath& path,
- const TGetTabletErrorsOptions& options), (override));
+ const TGetTabletErrorsOptions& options),
+ (override));
MOCK_METHOD(TFuture<std::vector<NTabletClient::TTabletActionId>>, BalanceTabletCells, (
const TString& tabletCellBundle,
const std::vector<NYPath::TYPath>& movableTables,
- const TBalanceTabletCellsOptions& options), (override));
+ const TBalanceTabletCellsOptions& options),
+ (override));
MOCK_METHOD(TFuture<NChaosClient::TReplicationCardPtr>, GetReplicationCard, (
NChaosClient::TReplicationCardId replicationCardId,
- const TGetReplicationCardOptions& options), (override));
+ const TGetReplicationCardOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, UpdateChaosTableReplicaProgress, (
NChaosClient::TReplicaId replicaId,
- const TUpdateChaosTableReplicaProgressOptions& options), (override));
+ const TUpdateChaosTableReplicaProgressOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, AlterReplicationCard, (
NChaosClient::TReplicationCardId replicationCardId,
- const TAlterReplicationCardOptions& options), (override));
+ const TAlterReplicationCardOptions& options),
+ (override));
MOCK_METHOD(TFuture<TSkynetSharePartsLocationsPtr>, LocateSkynetShare, (
const NYPath::TRichYPath& path,
- const TLocateSkynetShareOptions& options), (override));
+ const TLocateSkynetShareOptions& options),
+ (override));
MOCK_METHOD(TFuture<std::vector<NTableClient::TColumnarStatistics>>, GetColumnarStatistics, (
const std::vector<NYPath::TRichYPath>& path,
- const TGetColumnarStatisticsOptions& options), (override));
+ const TGetColumnarStatisticsOptions& options),
+ (override));
MOCK_METHOD(TFuture<TMultiTablePartitions>, PartitionTables, (
const std::vector<NYPath::TRichYPath>& paths,
- const TPartitionTablesOptions& options), (override));
+ const TPartitionTablesOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, TruncateJournal, (
const NYPath::TYPath& path,
i64 rowCount,
- const TTruncateJournalOptions& options), (override));
+ const TTruncateJournalOptions& options),
+ (override));
MOCK_METHOD(TFuture<TGetFileFromCacheResult>, GetFileFromCache, (
const TString& md5,
- const TGetFileFromCacheOptions& options), (override));
+ const TGetFileFromCacheOptions& options),
+ (override));
MOCK_METHOD(TFuture<TPutFileToCacheResult>, PutFileToCache, (
const NYPath::TYPath& path,
const TString& expectedMD5,
- const TPutFileToCacheOptions& options), (override));
+ const TPutFileToCacheOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, AddMember, (
const TString& group,
const TString& member,
- const TAddMemberOptions& options), (override));
+ const TAddMemberOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, RemoveMember, (
const TString& group,
const TString& member,
- const TRemoveMemberOptions& options), (override));
+ const TRemoveMemberOptions& options),
+ (override));
MOCK_METHOD(TFuture<TCheckPermissionResponse>, CheckPermission, (
const TString& user,
const NYPath::TYPath& path,
NYTree::EPermission permission,
- const TCheckPermissionOptions& options), (override));
+ const TCheckPermissionOptions& options),
+ (override));
MOCK_METHOD(TFuture<TCheckPermissionByAclResult>, CheckPermissionByAcl, (
const std::optional<TString>& user,
NYTree::EPermission permission,
NYTree::INodePtr acl,
- const TCheckPermissionByAclOptions& options), (override));
+ const TCheckPermissionByAclOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, TransferAccountResources, (
const TString& srcAccount,
const TString& dstAccount,
NYTree::INodePtr resourceDelta,
- const TTransferAccountResourcesOptions& options), (override));
+ const TTransferAccountResourcesOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, TransferPoolResources, (
const TString& srcPool,
const TString& dstPool,
const TString& poolTree,
NYTree::INodePtr resourceDelta,
- const TTransferPoolResourcesOptions& options), (override));
+ const TTransferPoolResourcesOptions& options),
+ (override));
MOCK_METHOD(TFuture<NScheduler::TOperationId>, StartOperation, (
NScheduler::EOperationType type,
const NYson::TYsonString& spec,
- const TStartOperationOptions& options), (override));
+ const TStartOperationOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, AbortOperation, (
const NScheduler::TOperationIdOrAlias& operationIdOrAlias,
- const TAbortOperationOptions& options), (override));
+ const TAbortOperationOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, SuspendOperation, (
const NScheduler::TOperationIdOrAlias& operationIdOrAlias,
- const TSuspendOperationOptions& options), (override));
+ const TSuspendOperationOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, ResumeOperation, (
const NScheduler::TOperationIdOrAlias& operationIdOrAlias,
- const TResumeOperationOptions& options), (override));
+ const TResumeOperationOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, CompleteOperation, (
const NScheduler::TOperationIdOrAlias& operationIdOrAlias,
- const TCompleteOperationOptions& options), (override));
+ const TCompleteOperationOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, UpdateOperationParameters, (
const NScheduler::TOperationIdOrAlias& operationIdOrAlias,
const NYson::TYsonString& parameters,
- const TUpdateOperationParametersOptions& options), (override));
+ const TUpdateOperationParametersOptions& options),
+ (override));
MOCK_METHOD(TFuture<TOperation>, GetOperation, (
const NScheduler::TOperationIdOrAlias& operationIdOrAlias,
- const TGetOperationOptions& options), (override));
+ const TGetOperationOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, DumpJobContext, (
NJobTrackerClient::TJobId jobId,
const NYPath::TYPath& path,
- const TDumpJobContextOptions& options), (override));
+ const TDumpJobContextOptions& options),
+ (override));
MOCK_METHOD(TFuture<NConcurrency::IAsyncZeroCopyInputStreamPtr>, GetJobInput, (
NJobTrackerClient::TJobId jobId,
- const TGetJobInputOptions& options), (override));
+ const TGetJobInputOptions& options),
+ (override));
MOCK_METHOD(TFuture<NYson::TYsonString>, GetJobInputPaths, (
NJobTrackerClient::TJobId jobId,
- const TGetJobInputPathsOptions& options), (override));
+ const TGetJobInputPathsOptions& options),
+ (override));
MOCK_METHOD(TFuture<NYson::TYsonString>, GetJobSpec, (
NJobTrackerClient::TJobId jobId,
- const TGetJobSpecOptions& options), (override));
+ const TGetJobSpecOptions& options),
+ (override));
MOCK_METHOD(TFuture<TSharedRef>, GetJobStderr, (
const NScheduler::TOperationIdOrAlias& operationIdOrAlias,
NJobTrackerClient::TJobId jobId,
- const TGetJobStderrOptions& options), (override));
+ const TGetJobStderrOptions& options),
+ (override));
MOCK_METHOD(TFuture<TSharedRef>, GetJobFailContext, (
const NScheduler::TOperationIdOrAlias& operationIdOrAlias,
NJobTrackerClient::TJobId jobId,
- const TGetJobFailContextOptions& options), (override));
+ const TGetJobFailContextOptions& options),
+ (override));
MOCK_METHOD(TFuture<TListOperationsResult>, ListOperations, (
- const TListOperationsOptions& options), (override));
+ const TListOperationsOptions& options),
+ (override));
MOCK_METHOD(TFuture<TListJobsResult>, ListJobs, (
const NScheduler::TOperationIdOrAlias& operationIdOrAlias,
- const TListJobsOptions& options), (override));
+ const TListJobsOptions& options),
+ (override));
MOCK_METHOD(TFuture<NYson::TYsonString>, GetJob, (
const NScheduler::TOperationIdOrAlias& operationIdOrAlias,
NJobTrackerClient::TJobId jobId,
- const TGetJobOptions& options), (override));
+ const TGetJobOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, AbandonJob, (
NJobTrackerClient::TJobId jobId,
- const TAbandonJobOptions& options), (override));
+ const TAbandonJobOptions& options),
+ (override));
MOCK_METHOD(TFuture<TPollJobShellResponse>, PollJobShell, (
NJobTrackerClient::TJobId jobId,
const std::optional<TString>& shellName,
const NYson::TYsonString& parameters,
- const TPollJobShellOptions& options), (override));
+ const TPollJobShellOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, AbortJob, (
NJobTrackerClient::TJobId jobId,
- const TAbortJobOptions& options), (override));
+ const TAbortJobOptions& options),
+ (override));
MOCK_METHOD(TFuture<TClusterMeta>, GetClusterMeta, (
- const TGetClusterMetaOptions& options), (override));
+ const TGetClusterMetaOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, CheckClusterLiveness, (
- const TCheckClusterLivenessOptions& options), (override));
+ const TCheckClusterLivenessOptions& options),
+ (override));
MOCK_METHOD(TFuture<TDisableChunkLocationsResult>, DisableChunkLocations, (
const TString& nodeAddress,
const std::vector<TGuid>& locationUuids,
- const TDisableChunkLocationsOptions& options), (override));
+ const TDisableChunkLocationsOptions& options),
+ (override));
MOCK_METHOD(TFuture<TDestroyChunkLocationsResult>, DestroyChunkLocations, (
const TString& nodeAddress,
bool recoverUnlinkedDisks,
const std::vector<TGuid>& locationUuids,
- const TDestroyChunkLocationsOptions& options), (override));
+ const TDestroyChunkLocationsOptions& options),
+ (override));
MOCK_METHOD(TFuture<TResurrectChunkLocationsResult>, ResurrectChunkLocations, (
const TString& nodeAddress,
const std::vector<TGuid>& locationUuids,
- const TResurrectChunkLocationsOptions& options), (override));
+ const TResurrectChunkLocationsOptions& options),
+ (override));
MOCK_METHOD(TFuture<TRequestRestartResult>, RequestRestart, (
const TString& nodeAddress,
- const TRequestRestartOptions& options), (override));
+ const TRequestRestartOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, SetUserPassword, (
const TString& user,
@@ -595,31 +706,38 @@ public:
MOCK_METHOD(TFuture<NQueryTrackerClient::TQueryId>, StartQuery, (
NQueryTrackerClient::EQueryEngine engine,
const TString& query,
- const TStartQueryOptions& options), (override));
+ const TStartQueryOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, AbortQuery, (
NQueryTrackerClient::TQueryId queryId,
- const TAbortQueryOptions& options), (override));
+ const TAbortQueryOptions& options),
+ (override));
MOCK_METHOD(TFuture<TQueryResult>, GetQueryResult, (
NQueryTrackerClient::TQueryId queryId,
i64 resultIndex,
- const TGetQueryResultOptions& options), (override));
+ const TGetQueryResultOptions& options),
+ (override));
MOCK_METHOD(TFuture<IUnversionedRowsetPtr>, ReadQueryResult, (
NQueryTrackerClient::TQueryId queryId,
i64 resultIndex,
- const TReadQueryResultOptions& options), (override));
+ const TReadQueryResultOptions& options),
+ (override));
MOCK_METHOD(TFuture<TQuery>, GetQuery, (
NQueryTrackerClient::TQueryId queryId,
- const TGetQueryOptions& options), (override));
+ const TGetQueryOptions& options),
+ (override));
MOCK_METHOD(TFuture<TListQueriesResult>, ListQueries, (
- const TListQueriesOptions& options), (override));
+ const TListQueriesOptions& options),
+ (override));
MOCK_METHOD(TFuture<void>, AlterQuery, (
- NQueryTrackerClient::TQueryId queryId, const TAlterQueryOptions& options), (override));
+ NQueryTrackerClient::TQueryId queryId, const TAlterQueryOptions& options),
+ (override));
MOCK_METHOD(TFuture<NBundleControllerClient::TBundleConfigDescriptorPtr>, GetBundleConfig, (
const TString& bundleName,
@@ -629,6 +747,30 @@ public:
const TString& bundleName,
const NBundleControllerClient::TBundleTargetConfigPtr& bundleConfig,
const NBundleControllerClient::TSetBundleConfigOptions& options), (override));
+
+ MOCK_METHOD(TFuture<void>, StartPipeline, (
+ const NYPath::TYPath& pipelinePath,
+ const TStartPipelineOptions& options),
+ (override));
+
+ MOCK_METHOD(TFuture<void>, StopPipeline, (
+ const NYPath::TYPath& pipelinePath,
+ const TStopPipelineOptions& options),
+ (override));
+
+ MOCK_METHOD(TFuture<void>, PausePipeline, (
+ const NYPath::TYPath& pipelinePath,
+ const TPausePipelineOptions& options),
+ (override));
+
+ MOCK_METHOD(TFuture<TPipelineStatus>, GetPipelineStatus, (
+ const NYPath::TYPath& pipelinePath,
+ const TGetPipelineStatusOptions& options),
+ (override));
+
+private:
+ NTabletClient::ITableMountCachePtr TableMountCache_;
+ NTransactionClient::ITimestampProviderPtr TimestampProvider_;
};
DEFINE_REFCOUNTED_TYPE(TMockClient)
diff --git a/yt/yt/client/unittests/mock/connection.h b/yt/yt/client/unittests/mock/connection.h
index ff328081a2..bcbfdf1faf 100644
--- a/yt/yt/client/unittests/mock/connection.h
+++ b/yt/yt/client/unittests/mock/connection.h
@@ -29,7 +29,8 @@ public:
MOCK_METHOD(NHiveClient::ITransactionParticipantPtr, CreateTransactionParticipant,
(NHiveClient::TCellId,
- const TTransactionParticipantOptions&), (override));
+ const TTransactionParticipantOptions&),
+ (override));
MOCK_METHOD(void, ClearMetadataCaches, (), (override));
MOCK_METHOD(void, Terminate, (), (override));
diff --git a/yt/yt/client/unittests/mock/ya.make b/yt/yt/client/unittests/mock/ya.make
index 483405dac0..bcc6df7a0c 100644
--- a/yt/yt/client/unittests/mock/ya.make
+++ b/yt/yt/client/unittests/mock/ya.make
@@ -3,16 +3,12 @@ LIBRARY()
INCLUDE(${ARCADIA_ROOT}/yt/ya_cpp.make.inc)
SRCS(
- client.h
- connection.h
- transaction.h
- table_value_consumer.h
+ client.cpp
)
PEERDIR(
library/cpp/testing/gtest_extensions
- yt/yt/build
- yt/yt/core
+ yt/yt/client
)
END()
diff --git a/yt/yt/core/concurrency/config.cpp b/yt/yt/core/concurrency/config.cpp
index f462394099..c54512e56e 100644
--- a/yt/yt/core/concurrency/config.cpp
+++ b/yt/yt/core/concurrency/config.cpp
@@ -32,9 +32,9 @@ void TPeriodicExecutorOptionsSerializer::Register(TRegistrar registrar)
void TRetryingPeriodicExecutorOptionsSerializer::Register(TRegistrar registrar)
{
- registrar.ExternalClassParameter("periodic_options", &TThat::PeriodicOptions)
+ registrar.ExternalClassParameter("periodic", &TThat::Periodic)
.Default();
- registrar.ExternalClassParameter("backoff_options", &TThat::BackoffOptions)
+ registrar.ExternalClassParameter("backoff_strategy", &TThat::BackoffStrategy)
.Default();
}
diff --git a/yt/yt/core/concurrency/config.h b/yt/yt/core/concurrency/config.h
index 68a1e0b470..fb963fbe83 100644
--- a/yt/yt/core/concurrency/config.h
+++ b/yt/yt/core/concurrency/config.h
@@ -29,8 +29,8 @@ struct TPeriodicExecutorOptions
struct TRetryingPeriodicExecutorOptions
{
- TPeriodicExecutorOptions PeriodicOptions;
- TExponentialBackoffOptions BackoffOptions;
+ TPeriodicExecutorOptions Periodic;
+ TExponentialBackoffOptions BackoffStrategy;
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/concurrency/retrying_periodic_executor.cpp b/yt/yt/core/concurrency/retrying_periodic_executor.cpp
index dcce653f13..f8df164712 100644
--- a/yt/yt/core/concurrency/retrying_periodic_executor.cpp
+++ b/yt/yt/core/concurrency/retrying_periodic_executor.cpp
@@ -21,8 +21,8 @@ namespace NDetail {
TRetryingInvocationTimePolicy::TRetryingInvocationTimePolicy(
const TOptions& options)
- : TDefaultInvocationTimePolicy(options.PeriodicOptions)
- , Backoff_(options.BackoffOptions)
+ : TDefaultInvocationTimePolicy(options.Periodic)
+ , Backoff_(options.BackoffStrategy)
{ }
void TRetryingInvocationTimePolicy::ProcessResult(TError result)
@@ -40,7 +40,7 @@ void TRetryingInvocationTimePolicy::ProcessResult(TError result)
bool TRetryingInvocationTimePolicy::ShouldKickstart(const TOptions& newOptions)
{
- return ShouldKickstart(newOptions.PeriodicOptions, std::nullopt);
+ return ShouldKickstart(newOptions.Periodic, std::nullopt);
}
bool TRetryingInvocationTimePolicy::ShouldKickstart(
@@ -54,7 +54,7 @@ bool TRetryingInvocationTimePolicy::ShouldKickstart(
void TRetryingInvocationTimePolicy::SetOptions(TOptions newOptions)
{
- SetOptions(newOptions.PeriodicOptions, newOptions.BackoffOptions);
+ SetOptions(newOptions.Periodic, newOptions.BackoffStrategy);
}
void TRetryingInvocationTimePolicy::SetOptions(
diff --git a/yt/yt/core/http/mock/client.cpp b/yt/yt/core/http/mock/client.cpp
new file mode 100644
index 0000000000..bec6691be0
--- /dev/null
+++ b/yt/yt/core/http/mock/client.cpp
@@ -0,0 +1,115 @@
+#include "client.h"
+
+#include <yt/yt/core/http/config.h>
+#include <yt/yt/core/http/server.h>
+
+#include <util/string/join.h>
+
+namespace NYT::NHttp {
+namespace {
+
+////////////////////////////////////////////////////////////////////////////////
+
+TMockHeaders DumpHeadersSafe(const THeadersPtr& headers)
+{
+ return headers ? headers->Dump() : TMockHeaders();
+}
+
+class TMockResponseStream
+ : public IResponse
+{
+public:
+ TMockResponseStream(const TMockResponse& response)
+ : StatusCode_(response.StatusCode)
+ , Body_(response.Body)
+ , Headers_(New<THeaders>())
+ , Trailers_(New<THeaders>())
+ {
+ for (const auto& [name, value] : response.Headers) {
+ Headers_->Add(name, value);
+ }
+ }
+
+ EStatusCode GetStatusCode() override
+ {
+ return StatusCode_;
+ }
+
+ const THeadersPtr& GetHeaders() override
+ {
+ return Headers_;
+ }
+
+ const THeadersPtr& GetTrailers() override
+ {
+ return Trailers_;
+ }
+
+ TFuture<TSharedRef> Read() override
+ {
+ TSharedRef result;
+ if (!Body_.empty()) {
+ result = TSharedRef::FromString(std::exchange(Body_, TString()));
+ }
+ return MakeFuture(result);
+ }
+
+private:
+ EStatusCode StatusCode_;
+ TString Body_;
+ THeadersPtr Headers_;
+ THeadersPtr Trailers_;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace
+
+TFuture<IResponsePtr> TMockClient::Get(const TString& url, const THeadersPtr& headers)
+{
+ auto mockResponse = Get(url, DumpHeadersSafe(headers));
+ return MakeFuture<IResponsePtr>(New<TMockResponseStream>(mockResponse));
+}
+
+TFuture<IResponsePtr> TMockClient::Post(const TString& url, const TSharedRef& body, const THeadersPtr& headers)
+{
+ auto mockResponse = Post(url, ToString(body), DumpHeadersSafe(headers));
+ return MakeFuture<IResponsePtr>(New<TMockResponseStream>(mockResponse));
+}
+
+TFuture<IResponsePtr> TMockClient::Patch(const TString& url, const TSharedRef& body, const THeadersPtr& headers)
+{
+ auto mockResponse = Patch(url, ToString(body), DumpHeadersSafe(headers));
+ return MakeFuture<IResponsePtr>(New<TMockResponseStream>(mockResponse));
+}
+
+TFuture<IResponsePtr> TMockClient::Put(const TString& url, const TSharedRef& body, const THeadersPtr& headers)
+{
+ auto mockResponse = Put(url, ToString(body), DumpHeadersSafe(headers));
+ return MakeFuture<IResponsePtr>(New<TMockResponseStream>(mockResponse));
+}
+
+TFuture<IResponsePtr> TMockClient::Delete(const TString& url, const THeadersPtr& headers)
+{
+ auto mockRsp = Delete(url, DumpHeadersSafe(headers));
+ return MakeFuture<IResponsePtr>(New<TMockResponseStream>(mockRsp));
+}
+
+TFuture<IActiveRequestPtr> TMockClient::StartPost(const TString& /*url*/, const THeadersPtr& /*headers*/)
+{
+ YT_UNIMPLEMENTED();
+}
+
+TFuture<IActiveRequestPtr> TMockClient::StartPatch(const TString& /*url*/, const THeadersPtr& /*headers*/)
+{
+ YT_UNIMPLEMENTED();
+}
+
+TFuture<IActiveRequestPtr> TMockClient::StartPut(const TString& /*url*/, const THeadersPtr& /*headers*/)
+{
+ YT_UNIMPLEMENTED();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT::NHttp
diff --git a/yt/yt/core/http/mock/client.h b/yt/yt/core/http/mock/client.h
new file mode 100644
index 0000000000..ea93320e2c
--- /dev/null
+++ b/yt/yt/core/http/mock/client.h
@@ -0,0 +1,47 @@
+#pragma once
+
+#include <yt/yt/core/http/client.h>
+#include <yt/yt/core/http/http.h>
+
+#include <library/cpp/testing/gtest/gtest.h>
+
+namespace NYT::NHttp {
+
+////////////////////////////////////////////////////////////////////////////////
+
+using TMockHeaders = std::vector<std::pair<TString, TString>>;
+
+struct TMockResponse
+{
+ EStatusCode StatusCode;
+ TString Body;
+ TMockHeaders Headers;
+};
+
+class TMockClient
+ : public IClient
+{
+public:
+ TFuture<IResponsePtr> Get(const TString& url, const THeadersPtr& headers) override;
+ TFuture<IResponsePtr> Post(const TString& url, const TSharedRef& body, const THeadersPtr& headers) override;
+ TFuture<IResponsePtr> Patch(const TString& url, const TSharedRef& body, const THeadersPtr& headers) override;
+ TFuture<IResponsePtr> Put(const TString& url, const TSharedRef& body, const THeadersPtr& headers) override;
+ TFuture<IResponsePtr> Delete(const TString& url, const THeadersPtr& headers) override;
+
+ TFuture<IActiveRequestPtr> StartPost(const TString& url, const THeadersPtr& headers) override;
+ TFuture<IActiveRequestPtr> StartPatch(const TString& url, const THeadersPtr& headers) override;
+ TFuture<IActiveRequestPtr> StartPut(const TString& url, const THeadersPtr& headers) override;
+
+ MOCK_METHOD(TMockResponse, Get, (const TString& url, const TMockHeaders& headers));
+ MOCK_METHOD(TMockResponse, Post, (const TString& url, const TString& body, const TMockHeaders& headers));
+ MOCK_METHOD(TMockResponse, Patch, (const TString& url, const TString& body, const TMockHeaders& headers));
+ MOCK_METHOD(TMockResponse, Put, (const TString& url, const TString& body, const TMockHeaders& headers));
+ MOCK_METHOD(TMockResponse, Delete, (const TString& url, const TMockHeaders& headers));
+};
+
+DECLARE_REFCOUNTED_CLASS(TMockClient)
+DEFINE_REFCOUNTED_TYPE(TMockClient)
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT::NHttp
diff --git a/yt/yt/core/http/mock/http.h b/yt/yt/core/http/mock/http.h
index 8406afdcda..27e62e561f 100644
--- a/yt/yt/core/http/mock/http.h
+++ b/yt/yt/core/http/mock/http.h
@@ -67,6 +67,7 @@ class TResponseMock
MOCK_METHOD(EStatusCode, GetStatusCode, (), (override));
MOCK_METHOD(THeadersPtr&, GetHeaders, (), (override));
MOCK_METHOD(THeadersPtr&, GetTrailers, (), (override));
+ MOCK_METHOD(TFuture<TSharedRef>, Read, (), (override));
THeadersPtr Headers;
THeadersPtr Trailers;
diff --git a/yt/yt/core/http/mock/ya.make b/yt/yt/core/http/mock/ya.make
index 94e890be45..f5532099bd 100644
--- a/yt/yt/core/http/mock/ya.make
+++ b/yt/yt/core/http/mock/ya.make
@@ -3,6 +3,7 @@ LIBRARY()
INCLUDE(${ARCADIA_ROOT}/yt/ya_cpp.make.inc)
SRCS(
+ client.cpp
http.cpp
)
diff --git a/yt/yt/core/misc/proc.cpp b/yt/yt/core/misc/proc.cpp
index 8cc18d0933..22882e4536 100644
--- a/yt/yt/core/misc/proc.cpp
+++ b/yt/yt/core/misc/proc.cpp
@@ -914,6 +914,27 @@ void SafeMakeNonblocking(int fd)
}
}
+bool TrySetPipeCapacity(int fd, int capacity)
+{
+#ifdef _linux_
+ int res = fcntl(fd, F_SETPIPE_SZ, capacity);
+
+ return res != -1;
+#else
+ Y_UNUSED(fd);
+ Y_UNUSED(capacity);
+ return true;
+#endif
+}
+
+void SafeSetPipeCapacity(int fd, int capacity)
+{
+ if (!TrySetPipeCapacity(fd, capacity)) {
+ THROW_ERROR_EXCEPTION("Failed to set capacity for descriptor %v", fd)
+ << TError::FromSystem();
+ }
+}
+
bool TrySetUid(int uid)
{
#ifdef _linux_
diff --git a/yt/yt/core/misc/proc.h b/yt/yt/core/misc/proc.h
index 823b64397e..1248d66a5c 100644
--- a/yt/yt/core/misc/proc.h
+++ b/yt/yt/core/misc/proc.h
@@ -158,6 +158,9 @@ void SafeSetTtyWindowSize(TFileDescriptor slaveFD, int height, int width);
bool TryMakeNonblocking(TFileDescriptor fd);
void SafeMakeNonblocking(TFileDescriptor fd);
+bool TrySetPipeCapacity(TFileDescriptor fd, int capacity);
+void SafeSetPipeCapacity(TFileDescriptor fd, int capacity);
+
bool TrySetUid(int uid);
void SafeSetUid(int uid);
diff --git a/yt/yt/core/net/connection.cpp b/yt/yt/core/net/connection.cpp
index 0b60d57298..525ca28414 100644
--- a/yt/yt/core/net/connection.cpp
+++ b/yt/yt/core/net/connection.cpp
@@ -1228,7 +1228,8 @@ IConnectionReaderPtr CreateInputConnectionFromPath(
IConnectionWriterPtr CreateOutputConnectionFromPath(
const TString& pipePath,
const IPollerPtr& poller,
- const TRefCountedPtr& pipeHolder)
+ const TRefCountedPtr& pipeHolder,
+ std::optional<int> capacity)
{
#ifdef _unix_
int flags = O_WRONLY | O_CLOEXEC;
@@ -1240,6 +1241,10 @@ IConnectionWriterPtr CreateOutputConnectionFromPath(
}
try {
+ if (capacity) {
+ SafeSetPipeCapacity(fd, *capacity);
+ }
+
SafeMakeNonblocking(fd);
} catch (...) {
SafeClose(fd, false);
diff --git a/yt/yt/core/net/connection.h b/yt/yt/core/net/connection.h
index 8512e5bc7e..a8f27d4b96 100644
--- a/yt/yt/core/net/connection.h
+++ b/yt/yt/core/net/connection.h
@@ -111,7 +111,8 @@ IConnectionReaderPtr CreateInputConnectionFromPath(
IConnectionWriterPtr CreateOutputConnectionFromPath(
const TString& pipePath,
const NConcurrency::IPollerPtr& poller,
- const TRefCountedPtr& pipeHolder);
+ const TRefCountedPtr& pipeHolder,
+ std::optional<int> capacity = {});
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/test_framework/mock_http.cpp b/yt/yt/core/test_framework/mock_http.cpp
deleted file mode 100644
index 166afb8c97..0000000000
--- a/yt/yt/core/test_framework/mock_http.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-#include "mock_http.h"
-
-#include <yt/yt/core/http/config.h>
-#include <yt/yt/core/http/server.h>
-
-#include <util/string/join.h>
-
-namespace NYT::NHttp {
-namespace {
-
-TServerConfigPtr MakeConfig()
-{
- auto config = New<TServerConfig>();
- config->Port = 0;
- return config;
-}
-
-TMockHeaders DumpHeadersSafe(const THeadersPtr& headers)
-{
- return headers ? headers->Dump() : TMockHeaders();
-}
-
-class THandler
- : public IHttpHandler
-{
-public:
- THandler(TMockServer* mockServer)
- : MockServer_(mockServer)
- { }
-
- void HandleRequest(const IRequestPtr& req, const IResponseWriterPtr& rsp) override
- {
- TString path = Join('?', req->GetUrl().Path, req->GetUrl().RawQuery);
- TString body = ToString(req->ReadAll());
- TMockHeaders headers = req->GetHeaders()->Dump();
-
- TMockResponse mockRsp;
- switch (req->GetMethod()) {
- case EMethod::Delete:
- mockRsp = MockServer_->Delete(path, headers);
- break;
- case EMethod::Get:
- mockRsp = MockServer_->Get(path, headers);
- break;
- case EMethod::Head:
- mockRsp = MockServer_->Head(path, headers);
- break;
- case EMethod::Post:
- mockRsp = MockServer_->Post(path, body, headers);
- break;
- case EMethod::Put:
- mockRsp = MockServer_->Put(path, body, headers);
- break;
- default:
- THROW_ERROR_EXCEPTION("Unsupported");
- }
- rsp->SetStatus(mockRsp.StatusCode);
- for (const auto& [name, value] : mockRsp.Headers) {
- rsp->GetHeaders()->Add(name, value);
- }
- NConcurrency::WaitFor(rsp->WriteBody(TSharedRef::FromString(mockRsp.Body))).ThrowOnError();
- }
-
-private:
- TMockServer* MockServer_;
-}; // class THandler
-
-class TMockResponseStream
- : public IResponse
-{
-public:
- TMockResponseStream(const TMockResponse& response)
- : Response_(response)
- , Headers_(New<THeaders>())
- , Trailers_(New<THeaders>())
- { }
-
- EStatusCode GetStatusCode() override
- {
- return Response_.StatusCode;
- }
-
- const THeadersPtr& GetHeaders() override
- {
- for (const auto& [name, value] : Response_.Headers) {
- Headers_->Add(name, value);
- }
- return Headers_;
- }
-
- const THeadersPtr& GetTrailers() override
- {
- return Trailers_;
- }
-
- TFuture<TSharedRef> Read() override
- {
- TSharedRef result;
- if (!Response_.Body.empty()) {
- result = TSharedRef::FromString(Response_.Body);
- Response_.Body.clear();
- }
- return MakeFuture(result);
- }
-
-private:
- TMockResponse Response_;
- THeadersPtr Headers_;
- THeadersPtr Trailers_;
-}; // class TMockResponseStream
-
-}
-
-TMockServer::TMockServer(TServerConfigPtr config)
- : Server_(CreateServer(config ? std::move(config) : MakeConfig()))
- , Handler_(New<THandler>(this))
-{
- Server_->AddHandler("/", Handler_);
- Server_->Start();
-}
-
-TMockServer::~TMockServer()
-{
- Server_->Stop();
-}
-
-ui16 TMockServer::GetPort()
-{
- return Server_->GetAddress().GetPort();
-}
-
-TFuture<IResponsePtr> TMockClient::Get(const TString& url, const THeadersPtr& headers)
-{
- auto mockRsp = Get(url, DumpHeadersSafe(headers));
- return MakeFuture<IResponsePtr>(New<TMockResponseStream>(mockRsp));
-}
-
-TFuture<IResponsePtr> TMockClient::Post(
- const TString& url, const TSharedRef& body, const THeadersPtr& headers)
-{
- auto mockRsp = Post(url, ToString(body), DumpHeadersSafe(headers));
- return MakeFuture<IResponsePtr>(New<TMockResponseStream>(mockRsp));
-}
-
-TFuture<IResponsePtr> TMockClient::Patch(
- const TString& url, const TSharedRef& body, const THeadersPtr& headers)
-{
- auto mockRsp = Patch(url, ToString(body), DumpHeadersSafe(headers));
- return MakeFuture<IResponsePtr>(New<TMockResponseStream>(mockRsp));
-}
-
-TFuture<IResponsePtr> TMockClient::Put(
- const TString& url, const TSharedRef& body, const THeadersPtr& headers)
-{
- auto mockRsp = Put(url, ToString(body), DumpHeadersSafe(headers));
- return MakeFuture<IResponsePtr>(New<TMockResponseStream>(mockRsp));
-}
-
-TFuture<IResponsePtr> TMockClient::Delete(const TString& url, const THeadersPtr& headers)
-{
- auto mockRsp = Delete(url, DumpHeadersSafe(headers));
- return MakeFuture<IResponsePtr>(New<TMockResponseStream>(mockRsp));
-}
-
-TFuture<IActiveRequestPtr> TMockClient::StartPost(
- const TString& /*url*/, const THeadersPtr& /*headers*/)
-{
- YT_UNIMPLEMENTED();
-}
-
-TFuture<IActiveRequestPtr> TMockClient::StartPatch(
- const TString& /*url*/, const THeadersPtr& /*headers*/)
-{
- YT_UNIMPLEMENTED();
-}
-
-TFuture<IActiveRequestPtr> TMockClient::StartPut(
- const TString& /*url*/, const THeadersPtr& /*headers*/)
-{
- YT_UNIMPLEMENTED();
-}
-
-} // namespace NYT::NHttp
diff --git a/yt/yt/core/test_framework/mock_http.h b/yt/yt/core/test_framework/mock_http.h
deleted file mode 100644
index 7b6292c640..0000000000
--- a/yt/yt/core/test_framework/mock_http.h
+++ /dev/null
@@ -1,97 +0,0 @@
-#pragma once
-
-#include <yt/yt/core/http/client.h>
-#include <yt/yt/core/http/http.h>
-#include <yt/yt/core/http/public.h>
-
-#include <library/cpp/testing/gtest/gtest.h>
-
-namespace NYT::NHttp {
-
-using TMockHeaders = std::vector<std::pair<TString, TString>>;
-
-struct TMockResponse
-{
- EStatusCode StatusCode;
- TString Body;
- TMockHeaders Headers;
-}; // class TMockResponse
-
-class TMockServer
-{
-public:
- TMockServer(TServerConfigPtr config = nullptr);
-
- ~TMockServer();
-
- ui16 GetPort();
-
- // Path includes the ?query, if any.
- MOCK_METHOD(TMockResponse, Delete, (
- const TString& path, const TMockHeaders& headers));
- MOCK_METHOD(TMockResponse, Get, (
- const TString& path, const TMockHeaders& headers));
- MOCK_METHOD(TMockResponse, Head, (
- const TString& path, const TMockHeaders& headers));
- MOCK_METHOD(TMockResponse, Post, (
- const TString& path, const TString& body, const TMockHeaders& headers));
- MOCK_METHOD(TMockResponse, Put, (
- const TString& path, const TString& body, const TMockHeaders& headers));
-
-private:
- const IServerPtr Server_;
- const IHttpHandlerPtr Handler_;
-}; // class TMockHttpServer
-
-class TMockClient
- : public IClient
-{
-public:
- TFuture<IResponsePtr> Get(
- const TString& url,
- const THeadersPtr& headers) override;
- TFuture<IResponsePtr> Post(
- const TString& url,
- const TSharedRef& body,
- const THeadersPtr& headers) override;
- TFuture<IResponsePtr> Patch(
- const TString& url,
- const TSharedRef& body,
- const THeadersPtr& headers) override;
- TFuture<IResponsePtr> Put(
- const TString& url,
- const TSharedRef& body,
- const THeadersPtr& headers) override;
- TFuture<IResponsePtr> Delete(
- const TString& url,
- const THeadersPtr& headers) override;
-
- TFuture<IActiveRequestPtr> StartPost(
- const TString& url,
- const THeadersPtr& headers) override;
-
- TFuture<IActiveRequestPtr> StartPatch(
- const TString& url,
- const THeadersPtr& headers) override;
-
- TFuture<IActiveRequestPtr> StartPut(
- const TString& url,
- const THeadersPtr& headers) override;
-
- MOCK_METHOD(TMockResponse, Get, (
- const TString& url, const TMockHeaders& headers));
- MOCK_METHOD(TMockResponse, Post, (
- const TString& url, const TString& body, const TMockHeaders& headers));
- MOCK_METHOD(TMockResponse, Patch, (
- const TString& url, const TString& body, const TMockHeaders& headers));
- MOCK_METHOD(TMockResponse, Put, (
- const TString& url, const TString& body, const TMockHeaders& headers));
- MOCK_METHOD(TMockResponse, Delete, (
- const TString& url, const TMockHeaders& headers));
-
-}; // class TMockClient
-
-DECLARE_REFCOUNTED_CLASS(TMockClient)
-DEFINE_REFCOUNTED_TYPE(TMockClient)
-
-} // namespace NYT::NHttp
diff --git a/yt/yt/core/test_framework/ya.make b/yt/yt/core/test_framework/ya.make
index 144ad3111a..29e0366771 100644
--- a/yt/yt/core/test_framework/ya.make
+++ b/yt/yt/core/test_framework/ya.make
@@ -5,7 +5,6 @@ INCLUDE(${ARCADIA_ROOT}/yt/ya_cpp.make.inc)
SRCS(
fixed_growth_string_output.cpp
GLOBAL framework.cpp
- mock_http.cpp
)
PEERDIR(
diff --git a/yt/yt/flow/lib/client/public.h b/yt/yt/flow/lib/client/public.h
new file mode 100644
index 0000000000..2fb42f2f1b
--- /dev/null
+++ b/yt/yt/flow/lib/client/public.h
@@ -0,0 +1,39 @@
+#pragma once
+
+#include <yt/yt/core/misc/public.h>
+
+namespace NYT::NFlow {
+
+////////////////////////////////////////////////////////////////////////////////
+
+/*
+ TODO(mikari): naming
+ Pipeline State
+ 1) Stopped - everything stopped and all internal queues is empty.
+ 2) Paused - everything stopped but some internal queues may not be empty.
+ 3) Working - usual work.
+ 4) Draining - preparing to stop pipeline.
+ Injection of new messages and trigger activation disabled, waiting for emptiness of internal queues.
+ 5) Pausing - preparing to pause pipeline.
+ 6) Completed - everything has been processed.
+*/
+DEFINE_ENUM(EPipelineState,
+ ((Unknown) (0))
+ ((Stopped) (1))
+ ((Paused) (2))
+ ((Working) (3))
+ ((Draining) (4))
+ ((Pausing) (5))
+ ((Completed) (6))
+);
+
+////////////////////////////////////////////////////////////////////////////////
+
+inline const TString PipelineFormatVersionAttribute("flow_pipeline_format_version");
+inline const TString LeaderControllerAddressAttribute("leader_controller_address");
+
+constexpr int CurrentPipelineFormatVersion = 1;
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT::NFlow
diff --git a/yt/yt/library/codegen/caller.h b/yt/yt/library/codegen/caller.h
index 2aacc09fde..db6a5341f5 100644
--- a/yt/yt/library/codegen/caller.h
+++ b/yt/yt/library/codegen/caller.h
@@ -51,4 +51,3 @@ private:
////////////////////////////////////////////////////////////////////////////////
}
-
diff --git a/yt/yt/library/process/pipe.cpp b/yt/yt/library/process/pipe.cpp
index f51d043f22..c8092a5a5a 100644
--- a/yt/yt/library/process/pipe.cpp
+++ b/yt/yt/library/process/pipe.cpp
@@ -20,8 +20,9 @@ static const auto& Logger = PipesLogger;
////////////////////////////////////////////////////////////////////////////////
-TNamedPipe::TNamedPipe(const TString& path, bool owning)
+TNamedPipe::TNamedPipe(const TString& path, std::optional<int> capacity, bool owning)
: Path_(path)
+ , Capacity_(capacity)
, Owning_(owning)
{ }
@@ -36,9 +37,9 @@ TNamedPipe::~TNamedPipe()
}
}
-TNamedPipePtr TNamedPipe::Create(const TString& path, int permissions)
+TNamedPipePtr TNamedPipe::Create(const TString& path, int permissions, std::optional<int> capacity)
{
- auto pipe = New<TNamedPipe>(path, /* owning */ true);
+ auto pipe = New<TNamedPipe>(path, capacity, /*owning*/ true);
pipe->Open(permissions);
YT_LOG_DEBUG("Named pipe created (Path: %v, Permissions: %v)", path, permissions);
return pipe;
@@ -46,7 +47,7 @@ TNamedPipePtr TNamedPipe::Create(const TString& path, int permissions)
TNamedPipePtr TNamedPipe::FromPath(const TString& path)
{
- return New<TNamedPipe>(path, /* owning */ false);
+ return New<TNamedPipe>(path, /*capacity*/ std::nullopt, /*owning*/ false);
}
void TNamedPipe::Open(int permissions)
@@ -66,7 +67,7 @@ IConnectionReaderPtr TNamedPipe::CreateAsyncReader()
IConnectionWriterPtr TNamedPipe::CreateAsyncWriter()
{
YT_VERIFY(!Path_.empty());
- return CreateOutputConnectionFromPath(Path_, TIODispatcher::Get()->GetPoller(), MakeStrong(this));
+ return CreateOutputConnectionFromPath(Path_, TIODispatcher::Get()->GetPoller(), MakeStrong(this), Capacity_);
}
TString TNamedPipe::GetPath() const
diff --git a/yt/yt/library/process/pipe.h b/yt/yt/library/process/pipe.h
index 10da81cc8a..337c4e4dad 100644
--- a/yt/yt/library/process/pipe.h
+++ b/yt/yt/library/process/pipe.h
@@ -15,7 +15,7 @@ class TNamedPipe
{
public:
~TNamedPipe();
- static TNamedPipePtr Create(const TString& path, int permissions = 0660);
+ static TNamedPipePtr Create(const TString& path, int permissions = 0660, std::optional<int> capacity = {});
static TNamedPipePtr FromPath(const TString& path);
NNet::IConnectionReaderPtr CreateAsyncReader();
@@ -25,12 +25,13 @@ public:
private:
const TString Path_;
+ const std::optional<int> Capacity_;
//! Whether pipe was created by this class
//! and should be removed in destructor.
const bool Owning_;
- explicit TNamedPipe(const TString& path, bool owning);
+ explicit TNamedPipe(const TString& path, std::optional<int> capacity, bool owning);
void Open(int permissions);
DECLARE_NEW_FRIEND()
};
diff --git a/yt/yt/library/process/unittests/pipes_ut.cpp b/yt/yt/library/process/unittests/pipes_ut.cpp
index 0c134176e7..f8eba17da2 100644
--- a/yt/yt/library/process/unittests/pipes_ut.cpp
+++ b/yt/yt/library/process/unittests/pipes_ut.cpp
@@ -21,6 +21,9 @@ using namespace NNet;
#ifndef _win_
+//! NB: You can't set size smaller than that of a page size
+constexpr int SmallPipeCapacity = 4096;
+
TEST(TPipeIOHolder, CanInstantiate)
{
auto pipe = TPipeFactory().Create();
@@ -66,6 +69,23 @@ TBlob ReadAll(IConnectionReaderPtr reader, bool useWaitFor)
return whole;
}
+void WriteAll(IConnectionWriterPtr writer, const char* data, size_t size, size_t blockSize)
+{
+ while (size > 0) {
+ const size_t currentBlockSize = std::min(blockSize, size);
+ auto buffer = TSharedRef(data, currentBlockSize, nullptr);
+ auto error = WaitFor(writer->Write(buffer));
+ THROW_ERROR_EXCEPTION_IF_FAILED(error);
+ size -= currentBlockSize;
+ data += currentBlockSize;
+ }
+
+ {
+ auto error = WaitFor(writer->Close());
+ THROW_ERROR_EXCEPTION_IF_FAILED(error);
+ }
+}
+
TEST(TAsyncWriterTest, AsyncCloseFail)
{
auto pipe = TPipeFactory().Create();
@@ -149,6 +169,13 @@ protected:
void TearDown() override
{ }
+ void SetUpWithCapacity(int capacity)
+ {
+ auto pipe = TNamedPipe::Create("./namedpipewcap", 0660, capacity);
+ Reader = pipe->CreateAsyncReader();
+ Writer = pipe->CreateAsyncWriter();
+ }
+
IConnectionReaderPtr Reader;
IConnectionWriterPtr Writer;
};
@@ -246,21 +273,74 @@ TEST_F(TNamedPipeReadWriteTest, ReadWrite)
EXPECT_EQ(text, TString(textFromPipe.Begin(), textFromPipe.End()));
}
-void WriteAll(IConnectionWriterPtr writer, const char* data, size_t size, size_t blockSize)
+TEST_F(TNamedPipeReadWriteTest, CapacityJustWorks)
{
- while (size > 0) {
- const size_t currentBlockSize = std::min(blockSize, size);
- auto buffer = TSharedRef(data, currentBlockSize, nullptr);
- auto error = WaitFor(writer->Write(buffer));
- THROW_ERROR_EXCEPTION_IF_FAILED(error);
- size -= currentBlockSize;
- data += currentBlockSize;
- }
+ SetUpWithCapacity(SmallPipeCapacity);
- {
- auto error = WaitFor(writer->Close());
- THROW_ERROR_EXCEPTION_IF_FAILED(error);
- }
+ TString text(5, 'a');
+ text.push_back('\n');
+ auto writeBuffer = TSharedRef::FromString(text);
+
+ auto writeFuture = Writer->Write(writeBuffer);
+ EXPECT_TRUE(writeFuture.Get().IsOK());
+
+ auto readBuffer = TSharedMutableRef::Allocate(5000, {.InitializeStorage = false});
+ auto readResult = Reader->Read(readBuffer).Get();
+
+ EXPECT_EQ(text, TString(readBuffer.Begin(), readResult.Value()));
+}
+
+TEST_F(TNamedPipeReadWriteTest, CapacityOverflow)
+{
+ SetUpWithCapacity(SmallPipeCapacity);
+ auto readerQueue = New<NConcurrency::TActionQueue>("Reader");
+
+ TString text(5000, 'a');
+ text.push_back('\n');
+ auto writeBuffer = TSharedRef::FromString(text);
+ auto writeFuture = Writer->Write(writeBuffer);
+
+ TDelayedExecutor::WaitForDuration(TDuration::Seconds(1));
+ EXPECT_FALSE(writeFuture.IsSet());
+
+ auto readFuture = BIND([&] {
+ auto readBuffer = TSharedMutableRef::Allocate(6000, {.InitializeStorage = false});
+ auto readResult = Reader->Read(readBuffer).Get();
+
+ EXPECT_TRUE(readResult.IsOK());
+ EXPECT_EQ(text.substr(0, 4096), TString(readBuffer.Begin(), readResult.Value()));
+ })
+ .AsyncVia(readerQueue->GetInvoker())
+ .Run();
+
+ EXPECT_TRUE(readFuture.Get().IsOK());
+ EXPECT_TRUE(writeFuture.Get().IsOK());
+}
+
+TEST_F(TNamedPipeReadWriteTest, CapacityDontDiscardSurplus)
+{
+ SetUpWithCapacity(SmallPipeCapacity);
+ auto readerQueue = New<NConcurrency::TActionQueue>("Reader");
+ auto writerQueue = New<NConcurrency::TActionQueue>("Writer");
+
+ TString text(5000, 'a');
+ text.push_back('\n');
+
+ auto writeFuture = BIND(&WriteAll, Writer, text.data(), text.size(), text.size())
+ .AsyncVia(writerQueue->GetInvoker())
+ .Run();
+
+ TDelayedExecutor::WaitForDuration(TDuration::Seconds(1));
+ EXPECT_FALSE(writeFuture.IsSet());
+
+ auto readFuture = BIND(&ReadAll, Reader, false)
+ .AsyncVia(readerQueue->GetInvoker())
+ .Run();
+
+ auto readResult = readFuture.Get().ValueOrThrow();
+ EXPECT_EQ(text, TString(readResult.Begin(), readResult.End()));
+
+ EXPECT_TRUE(writeFuture.Get().IsOK());
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto b/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto
index be48295c39..c2a7c5b444 100644
--- a/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto
+++ b/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto
@@ -2674,6 +2674,54 @@ message TRspCheckClusterLiveness
}
////////////////////////////////////////////////////////////////////////////////
+// FLOW
+////////////////////////////////////////////////////////////////////////////////
+
+message TReqStartPipeline
+{
+ required string pipeline_path = 1;
+}
+
+message TRspStartPipeline
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+message TReqPausePipeline
+{
+ required string pipeline_path = 1;
+}
+
+message TRspPausePipeline
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+message TReqStopPipeline
+{
+ required string pipeline_path = 1;
+}
+
+message TRspStopPipeline
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+message TReqGetPipelineStatus
+{
+ required string pipeline_path = 1;
+}
+
+message TRspGetPipelineStatus
+{
+ // TODO(babenko): provide native proto enum
+ required int32 state = 1; // EPipelineState
+}
+
+////////////////////////////////////////////////////////////////////////////////
// RESULTS
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt_proto/yt/client/chunk_client/proto/chunk_meta.proto b/yt/yt_proto/yt/client/chunk_client/proto/chunk_meta.proto
index e6c778f4eb..d7e724b4cc 100644
--- a/yt/yt_proto/yt/client/chunk_client/proto/chunk_meta.proto
+++ b/yt/yt_proto/yt/client/chunk_client/proto/chunk_meta.proto
@@ -88,6 +88,9 @@ message TMiscExt
// If present, is used by corresponding block reader to distinguish between block versions.
optional int32 block_format_version = 23;
+ // If present, chunk is a compression dictionary of respective policy.
+ optional int32 dictionary_compression_policy = 24; // EDictionaryCompressionPolicy
+
reserved 20;
}
diff --git a/yt/yt_proto/yt/client/table_chunk_format/proto/chunk_meta.proto b/yt/yt_proto/yt/client/table_chunk_format/proto/chunk_meta.proto
index 82c426a503..875f93c819 100644
--- a/yt/yt_proto/yt/client/table_chunk_format/proto/chunk_meta.proto
+++ b/yt/yt_proto/yt/client/table_chunk_format/proto/chunk_meta.proto
@@ -332,4 +332,21 @@ message TVersionedRowDigestExt
optional bytes all_but_last_timestamp_digest = 4;
}
+// This extension is present in (hunk) chunks that store compression dictionaries.
+message TCompressionDictionaryExt
+{
+ message TColumnInfo
+ {
+ required string stable_name = 1;
+
+ required int64 length = 2;
+ required int32 block_index = 3;
+ required int64 block_offset = 4;
+ }
+
+ // References to fragments that store dictionaries used for compression
+ // of values of a column corresponding to stable_name.
+ repeated TColumnInfo column_infos = 1;
+}
+
////////////////////////////////////////////////////////////////////////////////