mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
45cc42d6dc
We already implement short-circuiting for random access iterators, but we also need to do so for ranges::equal and ranges::is_permutation when given sized ranges that are not random access ranges (e.g. std::list). libstdc++-v3/ChangeLog: * include/bits/ranges_algo.h (__is_permutation_fn::operator()): Short-circuit for sized ranges with different sizes, as per LWG 3560. * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise. * include/bits/stl_algo.h (__is_permutation): Use if-constexpr for random access iterator branches. * include/bits/stl_algobase.h (__equal4): Likewise. * testsuite/25_algorithms/equal/lwg3560.cc: New test. * testsuite/25_algorithms/is_permutation/lwg3560.cc: New test. Reviewed-by: Patrick Palka <ppalka@redhat.com> |
||
---|---|---|
.. | ||
adjacent_find | ||
advance/istreambuf_iterators | ||
all_of | ||
any_of | ||
binary_search | ||
clamp | ||
contains | ||
contains_subrange | ||
copy | ||
copy_backward | ||
copy_if | ||
copy_n | ||
count | ||
count_if | ||
equal | ||
equal_range | ||
fill | ||
fill_n | ||
find | ||
find_end | ||
find_first_of | ||
find_if | ||
find_if_not | ||
find_last | ||
find_last_if | ||
find_last_if_not | ||
fold_left | ||
fold_right | ||
for_each | ||
generate | ||
generate_n | ||
headers | ||
heap | ||
includes | ||
inplace_merge | ||
is_heap | ||
is_heap_until | ||
is_partitioned | ||
is_permutation | ||
is_sorted | ||
is_sorted_until | ||
iter_swap | ||
lexicographical_compare | ||
lexicographical_compare_three_way | ||
lower_bound | ||
make_heap | ||
max | ||
max_element | ||
merge | ||
min | ||
min_element | ||
minmax | ||
minmax_element | ||
mismatch | ||
move | ||
move_backward | ||
next_permutation | ||
none_of | ||
nth_element | ||
partial_sort | ||
partial_sort_copy | ||
partition | ||
partition_copy | ||
partition_point | ||
pop_heap | ||
prev_permutation | ||
pstl | ||
push_heap | ||
random_shuffle | ||
remove | ||
remove_copy | ||
remove_copy_if | ||
remove_if | ||
replace | ||
replace_copy | ||
replace_copy_if | ||
replace_if | ||
reverse | ||
reverse_copy | ||
rotate | ||
rotate_copy | ||
sample | ||
search | ||
search_n | ||
set_difference | ||
set_intersection | ||
set_symmetric_difference | ||
set_union | ||
shift_left | ||
shift_right | ||
shuffle | ||
sort | ||
sort_heap | ||
stable_partition | ||
stable_sort | ||
swap | ||
swap_ranges | ||
transform | ||
unique | ||
unique_copy | ||
upper_bound | ||
constexpr_macro.cc | ||
cpp_lib_constexpr.cc | ||
default_template_value.cc |