[libc++][ranges] Make range algorithms support proxy iterators
authorKonstantin Varlamov <varconst@apple.com>
Mon, 18 Jul 2022 01:11:51 +0000 (18:11 -0700)
committervarconst <varconsteq@gmail.com>
Mon, 18 Jul 2022 01:12:06 +0000 (18:12 -0700)
commita7c3379cf9a4efc9381f832639827a39f0396f65
tree5216f39e44ae81c555ef4f328f0c4507c38e06a2
parent7094ab4ee75771539a4426163345f0746a017006
[libc++][ranges] Make range algorithms support proxy iterators

Also test all the range algorithms to verify the support.

Differential Revision: https://reviews.llvm.org/D129823
29 files changed:
libcxx/include/__algorithm/inplace_merge.h
libcxx/include/__algorithm/iterator_operations.h
libcxx/include/__algorithm/make_heap.h
libcxx/include/__algorithm/min_element.h
libcxx/include/__algorithm/nth_element.h
libcxx/include/__algorithm/partial_sort.h
libcxx/include/__algorithm/partial_sort_copy.h
libcxx/include/__algorithm/pop_heap.h
libcxx/include/__algorithm/push_heap.h
libcxx/include/__algorithm/ranges_fill.h
libcxx/include/__algorithm/ranges_make_heap.h
libcxx/include/__algorithm/ranges_min_element.h
libcxx/include/__algorithm/ranges_nth_element.h
libcxx/include/__algorithm/ranges_pop_heap.h
libcxx/include/__algorithm/ranges_push_heap.h
libcxx/include/__algorithm/ranges_sort.h
libcxx/include/__algorithm/ranges_sort_heap.h
libcxx/include/__algorithm/ranges_stable_sort.h
libcxx/include/__algorithm/shuffle.h
libcxx/include/__algorithm/sift_down.h
libcxx/include/__algorithm/sort.h
libcxx/include/__algorithm/sort_heap.h
libcxx/include/__algorithm/stable_sort.h
libcxx/include/__debug_utils/randomize_range.h
libcxx/test/libcxx/algorithms/nth_element_stability.pass.cpp
libcxx/test/libcxx/algorithms/partial_sort_stability.pass.cpp
libcxx/test/std/algorithms/ranges_robust_against_proxy_iterators.pass.cpp [new file with mode: 0644]
libcxx/test/support/test.support/test_proxy.pass.cpp
libcxx/test/support/test_iterators.h