Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 1 | // -*- C++ -*- |
Louis Dionne | eb8650a | 2021-11-17 21:25:01 | [diff] [blame] | 2 | //===----------------------------------------------------------------------===// |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 3 | // |
Chandler Carruth | 57b08b0 | 2019-01-19 10:56:40 | [diff] [blame] | 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 5 | // See https://llvm.org/LICENSE.txt for license information. |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef _LIBCPP_ALGORITHM |
| 11 | #define _LIBCPP_ALGORITHM |
| 12 | |
| 13 | /* |
| 14 | algorithm synopsis |
| 15 | |
| 16 | #include <initializer_list> |
| 17 | |
| 18 | namespace std |
| 19 | { |
| 20 | |
Nikolas Klauser | d3729bb | 2022-01-14 01:55:51 | [diff] [blame] | 21 | namespace ranges { |
Nikolas Klauser | 1e77b39 | 2022-02-11 16:01:58 | [diff] [blame] | 22 | template <class I, class F> |
Nikolas Klauser | 807766b | 2022-02-21 21:48:36 | [diff] [blame] | 23 | struct in_fun_result; // since C++20 |
Nikolas Klauser | 1e77b39 | 2022-02-11 16:01:58 | [diff] [blame] | 24 | |
Nikolas Klauser | d3729bb | 2022-01-14 01:55:51 | [diff] [blame] | 25 | template <class I1, class I2> |
Nikolas Klauser | 807766b | 2022-02-21 21:48:36 | [diff] [blame] | 26 | struct in_in_result; // since C++20 |
Nikolas Klauser | f3514af | 2022-01-25 10:21:47 | [diff] [blame] | 27 | |
| 28 | template <class I1, class I2, class O> |
Nikolas Klauser | 807766b | 2022-02-21 21:48:36 | [diff] [blame] | 29 | struct in_in_out_result; // since C++20 |
Nikolas Klauser | 610979b | 2022-02-03 01:17:03 | [diff] [blame] | 30 | |
| 31 | template <class I, class O1, class O2> |
| 32 | struct in_out_out_result; // since C++20 |
Nikolas Klauser | 1e77b39 | 2022-02-11 16:01:58 | [diff] [blame] | 33 | |
Nikolas Klauser | 807766b | 2022-02-21 21:48:36 | [diff] [blame] | 34 | template <class I1, class I2> |
| 35 | struct min_max_result; // since C++20 |
| 36 | |
Nikolas Klauser | 68f4131 | 2022-02-21 22:07:02 | [diff] [blame] | 37 | template <class I> |
| 38 | struct in_found_result; // since C++20 |
| 39 | |
Nikolas Klauser | 3b470d1 | 2022-02-11 12:11:57 | [diff] [blame] | 40 | template<forward_iterator I, sentinel_for<I> S, class Proj = identity, |
| 41 | indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less> // since C++20 |
| 42 | constexpr I min_element(I first, S last, Comp comp = {}, Proj proj = {}); |
| 43 | |
| 44 | template<forward_range R, class Proj = identity, |
| 45 | indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> // since C++20 |
| 46 | constexpr borrowed_iterator_t<R> min_element(R&& r, Comp comp = {}, Proj proj = {}); |
Nikolas Klauser | c2cd15a | 2022-03-08 22:12:35 | [diff] [blame] | 47 | |
Nikolas Klauser | 40f7fca3 | 2022-05-22 11:43:37 | [diff] [blame] | 48 | template<forward_iterator I, sentinel_for<I> S, class Proj = identity, |
| 49 | indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less> |
| 50 | constexpr I ranges::max_element(I first, S last, Comp comp = {}, Proj proj = {}); // since C++20 |
| 51 | |
| 52 | template<forward_range R, class Proj = identity, |
| 53 | indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> |
| 54 | constexpr borrowed_iterator_t<R> ranges::max_element(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 |
| 55 | |
| 56 | |
Nikolas Klauser | c2cd15a | 2022-03-08 22:12:35 | [diff] [blame] | 57 | template <input_iterator I1, sentinel_for<_I1> S1, input_iterator I2, sentinel_for<_I2> S2, |
| 58 | class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> |
| 59 | requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2> |
| 60 | constexpr mismatch_result<_I1, _I2> |
| 61 | mismatch()(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}) // since C++20 |
| 62 | |
| 63 | template <input_range R1, input_range R2, |
| 64 | class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> |
| 65 | requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2> |
| 66 | constexpr mismatch_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>> |
| 67 | mismatch(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}) // since C++20 |
Nikolas Klauser | ee0f8c4 | 2022-03-12 00:45:35 | [diff] [blame] | 68 | |
Nikolas Klauser | ee0f8c4 | 2022-03-12 00:45:35 | [diff] [blame] | 69 | requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*> |
| 70 | constexpr I find(I first, S last, const T& value, Proj proj = {}); // since C++20 |
| 71 | |
| 72 | template<input_range R, class T, class Proj = identity> |
| 73 | requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*> |
| 74 | constexpr borrowed_iterator_t<R> |
| 75 | find(R&& r, const T& value, Proj proj = {}); // since C++20 |
| 76 | |
| 77 | template<input_iterator I, sentinel_for<I> S, class Proj = identity, |
| 78 | indirect_unary_predicate<projected<I, Proj>> Pred> |
| 79 | constexpr I find_if(I first, S last, Pred pred, Proj proj = {}); // since C++20 |
| 80 | |
| 81 | template<input_range R, class Proj = identity, |
| 82 | indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> |
| 83 | constexpr borrowed_iterator_t<R> |
| 84 | find_if(R&& r, Pred pred, Proj proj = {}); // since C++20 |
| 85 | |
| 86 | template<input_iterator I, sentinel_for<I> S, class Proj = identity, |
| 87 | indirect_unary_predicate<projected<I, Proj>> Pred> |
| 88 | constexpr I find_if_not(I first, S last, Pred pred, Proj proj = {}); // since C++20 |
| 89 | |
| 90 | template<input_range R, class Proj = identity, |
| 91 | indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> |
| 92 | constexpr borrowed_iterator_t<R> |
| 93 | find_if_not(R&& r, Pred pred, Proj proj = {}); // since C++20 |
Nikolas Klauser | f83d833 | 2022-03-18 01:57:08 | [diff] [blame] | 94 | |
Nikolas Klauser | e476df5 | 2022-04-03 07:17:01 | [diff] [blame] | 95 | template<class T, class Proj = identity, |
| 96 | indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less> |
| 97 | constexpr const T& min(const T& a, const T& b, Comp comp = {}, Proj proj = {}); // since C++20 |
Nikolas Klauser | f83d833 | 2022-03-18 01:57:08 | [diff] [blame] | 98 | |
Nikolas Klauser | e476df5 | 2022-04-03 07:17:01 | [diff] [blame] | 99 | template<copyable T, class Proj = identity, |
| 100 | indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less> |
| 101 | constexpr T min(initializer_list<T> r, Comp comp = {}, Proj proj = {}); // since C++20 |
Nikolas Klauser | f83d833 | 2022-03-18 01:57:08 | [diff] [blame] | 102 | |
| 103 | template<input_range R, class Proj = identity, |
| 104 | indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> |
| 105 | requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*> |
| 106 | constexpr range_value_t<R> |
| 107 | min(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 |
Nikolas Klauser | e476df5 | 2022-04-03 07:17:01 | [diff] [blame] | 108 | |
| 109 | template<class T, class Proj = identity, |
| 110 | indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less> |
| 111 | constexpr const T& max(const T& a, const T& b, Comp comp = {}, Proj proj = {}); // since C++20 |
| 112 | |
| 113 | template<copyable T, class Proj = identity, |
| 114 | indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less> |
| 115 | constexpr T max(initializer_list<T> r, Comp comp = {}, Proj proj = {}); // since C++20 |
| 116 | |
| 117 | template<input_range R, class Proj = identity, |
| 118 | indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> |
| 119 | requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*> |
| 120 | constexpr range_value_t<R> |
| 121 | max(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 |
Nikolas Klauser | 3ba8548 | 2022-04-05 09:05:36 | [diff] [blame] | 122 | |
| 123 | template<class I, class O> |
| 124 | using unary_transform_result = in_out_result<I, O>; // since C++20 |
| 125 | |
| 126 | template<class I1, class I2, class O> |
| 127 | using binary_transform_result = in_in_out_result<I1, I2, O>; // since C++20 |
| 128 | |
| 129 | template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, |
| 130 | copy_constructible F, class Proj = identity> |
| 131 | requires indirectly_writable<O, indirect_result_t<F&, projected<I, Proj>>> |
| 132 | constexpr ranges::unary_transform_result<I, O> |
| 133 | transform(I first1, S last1, O result, F op, Proj proj = {}); // since C++20 |
| 134 | |
| 135 | template<input_range R, weakly_incrementable O, copy_constructible F, |
| 136 | class Proj = identity> |
| 137 | requires indirectly_writable<O, indirect_result_t<F&, projected<iterator_t<R>, Proj>>> |
| 138 | constexpr ranges::unary_transform_result<borrowed_iterator_t<R>, O> |
| 139 | transform(R&& r, O result, F op, Proj proj = {}); // since C++20 |
| 140 | |
| 141 | template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2, |
| 142 | weakly_incrementable O, copy_constructible F, class Proj1 = identity, |
| 143 | class Proj2 = identity> |
| 144 | requires indirectly_writable<O, indirect_result_t<F&, projected<I1, Proj1>, |
| 145 | projected<I2, Proj2>>> |
| 146 | constexpr ranges::binary_transform_result<I1, I2, O> |
| 147 | transform(I1 first1, S1 last1, I2 first2, S2 last2, O result, |
| 148 | F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 |
| 149 | |
| 150 | template<input_range R1, input_range R2, weakly_incrementable O, |
| 151 | copy_constructible F, class Proj1 = identity, class Proj2 = identity> |
| 152 | requires indirectly_writable<O, indirect_result_t<F&, projected<iterator_t<R1>, Proj1>, |
| 153 | projected<iterator_t<R2>, Proj2>>> |
| 154 | constexpr ranges::binary_transform_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>, O> |
| 155 | transform(R1&& r1, R2&& r2, O result, |
| 156 | F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 |
Nikolas Klauser | 1306b10 | 2022-04-07 11:02:02 | [diff] [blame] | 157 | |
| 158 | template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity> |
| 159 | requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*> |
| 160 | constexpr iter_difference_t<I> |
| 161 | count(I first, S last, const T& value, Proj proj = {}); // since C++20 |
| 162 | |
| 163 | template<input_range R, class T, class Proj = identity> |
| 164 | requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*> |
| 165 | constexpr range_difference_t<R> |
| 166 | count(R&& r, const T& value, Proj proj = {}); // since C++20 |
| 167 | |
| 168 | template<input_iterator I, sentinel_for<I> S, class Proj = identity, |
| 169 | indirect_unary_predicate<projected<I, Proj>> Pred> |
| 170 | constexpr iter_difference_t<I> |
| 171 | count_if(I first, S last, Pred pred, Proj proj = {}); // since C++20 |
| 172 | |
| 173 | template<input_range R, class Proj = identity, |
| 174 | indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> |
| 175 | constexpr range_difference_t<R> |
| 176 | count_if(R&& r, Pred pred, Proj proj = {}); // since C++20 |
Nikolas Klauser | 58d9ab7 | 2022-04-13 20:59:09 | [diff] [blame] | 177 | |
| 178 | template<class T, class Proj = identity, |
| 179 | indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less> |
| 180 | constexpr ranges::minmax_result<const T&> |
| 181 | minmax(const T& a, const T& b, Comp comp = {}, Proj proj = {}); // since C++20 |
| 182 | |
| 183 | template<copyable T, class Proj = identity, |
| 184 | indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less> |
| 185 | constexpr ranges::minmax_result<T> |
| 186 | minmax(initializer_list<T> r, Comp comp = {}, Proj proj = {}); // since C++20 |
| 187 | |
| 188 | template<input_range R, class Proj = identity, |
| 189 | indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> |
| 190 | requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*> |
| 191 | constexpr ranges::minmax_result<range_value_t<R>> |
| 192 | minmax(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 |
| 193 | |
| 194 | template<forward_iterator I, sentinel_for<I> S, class Proj = identity, |
| 195 | indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less> |
| 196 | constexpr ranges::minmax_element_result<I> |
| 197 | minmax_element(I first, S last, Comp comp = {}, Proj proj = {}); // since C++20 |
| 198 | |
| 199 | template<forward_range R, class Proj = identity, |
| 200 | indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> |
| 201 | constexpr ranges::minmax_element_result<borrowed_iterator_t<R>> |
| 202 | minmax_element(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 |
Nikolas Klauser | 1d83750 | 2022-04-15 11:43:40 | [diff] [blame] | 203 | |
| 204 | template<class I, class O> |
| 205 | using copy_result = in_out_result<I, O>; // since C++20 |
| 206 | |
| 207 | template<class I, class O> |
| 208 | using copy_n_result = in_out_result<I, O>; // since C++20 |
| 209 | |
| 210 | template<class I, class O> |
| 211 | using copy_if_result = in_out_result<I, O>; // since C++20 |
| 212 | |
| 213 | template<class I1, class I2> |
| 214 | using copy_backward_result = in_out_result<I1, I2>; // since C++20 |
| 215 | |
| 216 | template<input_iterator I, sentinel_for<I> S, weakly_incrementable O> |
| 217 | requires indirectly_copyable<I, O> |
| 218 | constexpr ranges::copy_result<I, O> ranges::copy(I first, S last, O result); // since C++20 |
| 219 | |
| 220 | template<input_range R, weakly_incrementable O> |
| 221 | requires indirectly_copyable<iterator_t<R>, O> |
| 222 | constexpr ranges::copy_result<borrowed_iterator_t<R>, O> ranges::copy(R&& r, O result); // since C++20 |
| 223 | |
| 224 | template<input_iterator I, weakly_incrementable O> |
| 225 | requires indirectly_copyable<I, O> |
| 226 | constexpr ranges::copy_n_result<I, O> |
| 227 | ranges::copy_n(I first, iter_difference_t<I> n, O result); // since C++20 |
| 228 | |
| 229 | template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class Proj = identity, |
| 230 | indirect_unary_predicate<projected<I, Proj>> Pred> |
| 231 | requires indirectly_copyable<I, O> |
| 232 | constexpr ranges::copy_if_result<I, O> |
| 233 | ranges::copy_if(I first, S last, O result, Pred pred, Proj proj = {}); // since C++20 |
| 234 | |
| 235 | template<input_range R, weakly_incrementable O, class Proj = identity, |
| 236 | indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> |
| 237 | requires indirectly_copyable<iterator_t<R>, O> |
| 238 | constexpr ranges::copy_if_result<borrowed_iterator_t<R>, O> |
| 239 | ranges::copy_if(R&& r, O result, Pred pred, Proj proj = {}); // since C++20 |
| 240 | |
| 241 | template<bidirectional_iterator I1, sentinel_for<I1> S1, bidirectional_iterator I2> |
| 242 | requires indirectly_copyable<I1, I2> |
| 243 | constexpr ranges::copy_backward_result<I1, I2> |
| 244 | ranges::copy_backward(I1 first, S1 last, I2 result); // since C++20 |
| 245 | |
| 246 | template<bidirectional_range R, bidirectional_iterator I> |
| 247 | requires indirectly_copyable<iterator_t<R>, I> |
| 248 | constexpr ranges::copy_backward_result<borrowed_iterator_t<R>, I> |
| 249 | ranges::copy_backward(R&& r, I result); // since C++20 |
Nikolas Klauser | 80045e9 | 2022-05-04 18:27:07 | [diff] [blame] | 250 | |
| 251 | template<class I, class F> |
| 252 | using for_each_result = in_fun_result<I, F>; // since C++20 |
| 253 | |
| 254 | template<input_iterator I, sentinel_for<I> S, class Proj = identity, |
| 255 | indirectly_unary_invocable<projected<I, Proj>> Fun> |
| 256 | constexpr ranges::for_each_result<I, Fun> |
| 257 | ranges::for_each(I first, S last, Fun f, Proj proj = {}); // since C++20 |
| 258 | |
| 259 | template<input_range R, class Proj = identity, |
| 260 | indirectly_unary_invocable<projected<iterator_t<R>, Proj>> Fun> |
| 261 | constexpr ranges::for_each_result<borrowed_iterator_t<R>, Fun> |
| 262 | ranges::for_each(R&& r, Fun f, Proj proj = {}); // since C++20 |
| 263 | |
| 264 | template<input_iterator I, class Proj = identity, |
| 265 | indirectly_unary_invocable<projected<I, Proj>> Fun> |
| 266 | constexpr ranges::for_each_n_result<I, Fun> |
| 267 | ranges::for_each_n(I first, iter_difference_t<I> n, Fun f, Proj proj = {}); // since C++20 |
Nikolas Klauser | 37ba1b9 | 2022-05-04 12:19:09 | [diff] [blame] | 268 | |
| 269 | template<input_iterator I, sentinel_for<I> S, class Proj = identity, |
| 270 | indirect_unary_predicate<projected<I, Proj>> Pred> |
| 271 | constexpr bool ranges::is_partitioned(I first, S last, Pred pred, Proj proj = {}); // since C++20 |
| 272 | |
| 273 | template<input_range R, class Proj = identity, |
| 274 | indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> |
| 275 | constexpr bool ranges::is_partitioned(R&& r, Pred pred, Proj proj = {}); // since C++20 |
| 276 | |
Nikolas Klauser | 1d1a191 | 2022-05-24 08:32:50 | [diff] [blame^] | 277 | |
| 278 | template<bidirectional_iterator I, sentinel_for<I> S> |
| 279 | requires permutable<I> |
| 280 | constexpr I ranges::reverse(I first, S last); // since C++20 |
| 281 | |
| 282 | template<bidirectional_range R> |
| 283 | requires permutable<iterator_t<R>> |
| 284 | constexpr borrowed_iterator_t<R> ranges::reverse(R&& r); // since C++20 |
| 285 | |
Nikolas Klauser | d3729bb | 2022-01-14 01:55:51 | [diff] [blame] | 286 | } |
| 287 | |
Marshall Clow | 706ffef | 2018-01-15 17:20:36 | [diff] [blame] | 288 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 289 | all_of(InputIterator first, InputIterator last, Predicate pred); |
| 290 | |
| 291 | template <class InputIterator, class Predicate> |
Marshall Clow | 706ffef | 2018-01-15 17:20:36 | [diff] [blame] | 292 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 293 | any_of(InputIterator first, InputIterator last, Predicate pred); |
| 294 | |
| 295 | template <class InputIterator, class Predicate> |
Marshall Clow | 706ffef | 2018-01-15 17:20:36 | [diff] [blame] | 296 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 297 | none_of(InputIterator first, InputIterator last, Predicate pred); |
| 298 | |
| 299 | template <class InputIterator, class Function> |
Marshall Clow | 1b9a4ff | 2018-01-22 20:44:33 | [diff] [blame] | 300 | constexpr Function // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 301 | for_each(InputIterator first, InputIterator last, Function f); |
| 302 | |
Marshall Clow | d5c65ff | 2017-05-25 02:29:54 | [diff] [blame] | 303 | template<class InputIterator, class Size, class Function> |
Marshall Clow | 1b9a4ff | 2018-01-22 20:44:33 | [diff] [blame] | 304 | constexpr InputIterator // constexpr in C++20 |
| 305 | for_each_n(InputIterator first, Size n, Function f); // C++17 |
Marshall Clow | d5c65ff | 2017-05-25 02:29:54 | [diff] [blame] | 306 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 307 | template <class InputIterator, class T> |
Marshall Clow | 8694428 | 2018-01-15 19:26:05 | [diff] [blame] | 308 | constexpr InputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 309 | find(InputIterator first, InputIterator last, const T& value); |
| 310 | |
| 311 | template <class InputIterator, class Predicate> |
Marshall Clow | 8694428 | 2018-01-15 19:26:05 | [diff] [blame] | 312 | constexpr InputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 313 | find_if(InputIterator first, InputIterator last, Predicate pred); |
| 314 | |
| 315 | template<class InputIterator, class Predicate> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 316 | constexpr InputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 317 | find_if_not(InputIterator first, InputIterator last, Predicate pred); |
| 318 | |
| 319 | template <class ForwardIterator1, class ForwardIterator2> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 320 | constexpr ForwardIterator1 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 321 | find_end(ForwardIterator1 first1, ForwardIterator1 last1, |
| 322 | ForwardIterator2 first2, ForwardIterator2 last2); |
| 323 | |
| 324 | template <class ForwardIterator1, class ForwardIterator2, class BinaryPredicate> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 325 | constexpr ForwardIterator1 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 326 | find_end(ForwardIterator1 first1, ForwardIterator1 last1, |
| 327 | ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); |
| 328 | |
| 329 | template <class ForwardIterator1, class ForwardIterator2> |
Marshall Clow | 8694428 | 2018-01-15 19:26:05 | [diff] [blame] | 330 | constexpr ForwardIterator1 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 331 | find_first_of(ForwardIterator1 first1, ForwardIterator1 last1, |
| 332 | ForwardIterator2 first2, ForwardIterator2 last2); |
| 333 | |
| 334 | template <class ForwardIterator1, class ForwardIterator2, class BinaryPredicate> |
Marshall Clow | 8694428 | 2018-01-15 19:26:05 | [diff] [blame] | 335 | constexpr ForwardIterator1 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 336 | find_first_of(ForwardIterator1 first1, ForwardIterator1 last1, |
| 337 | ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); |
| 338 | |
| 339 | template <class ForwardIterator> |
Marshall Clow | 8694428 | 2018-01-15 19:26:05 | [diff] [blame] | 340 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 341 | adjacent_find(ForwardIterator first, ForwardIterator last); |
| 342 | |
| 343 | template <class ForwardIterator, class BinaryPredicate> |
Marshall Clow | 8694428 | 2018-01-15 19:26:05 | [diff] [blame] | 344 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 345 | adjacent_find(ForwardIterator first, ForwardIterator last, BinaryPredicate pred); |
| 346 | |
| 347 | template <class InputIterator, class T> |
Marshall Clow | 056f15e | 2018-01-15 19:40:34 | [diff] [blame] | 348 | constexpr typename iterator_traits<InputIterator>::difference_type // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 349 | count(InputIterator first, InputIterator last, const T& value); |
| 350 | |
| 351 | template <class InputIterator, class Predicate> |
Marshall Clow | 056f15e | 2018-01-15 19:40:34 | [diff] [blame] | 352 | constexpr typename iterator_traits<InputIterator>::difference_type // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 353 | count_if(InputIterator first, InputIterator last, Predicate pred); |
| 354 | |
| 355 | template <class InputIterator1, class InputIterator2> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 356 | constexpr pair<InputIterator1, InputIterator2> // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 357 | mismatch(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2); |
| 358 | |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 359 | template <class InputIterator1, class InputIterator2> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 360 | constexpr pair<InputIterator1, InputIterator2> // constexpr in C++20 |
Aditya Kumar | 331fb80 | 2016-08-25 11:52:38 | [diff] [blame] | 361 | mismatch(InputIterator1 first1, InputIterator1 last1, |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 362 | InputIterator2 first2, InputIterator2 last2); // **C++14** |
| 363 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 364 | template <class InputIterator1, class InputIterator2, class BinaryPredicate> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 365 | constexpr pair<InputIterator1, InputIterator2> // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 366 | mismatch(InputIterator1 first1, InputIterator1 last1, |
| 367 | InputIterator2 first2, BinaryPredicate pred); |
| 368 | |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 369 | template <class InputIterator1, class InputIterator2, class BinaryPredicate> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 370 | constexpr pair<InputIterator1, InputIterator2> // constexpr in C++20 |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 371 | mismatch(InputIterator1 first1, InputIterator1 last1, |
| 372 | InputIterator2 first2, InputIterator2 last2, |
| 373 | BinaryPredicate pred); // **C++14** |
| 374 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 375 | template <class InputIterator1, class InputIterator2> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 376 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 377 | equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2); |
| 378 | |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 379 | template <class InputIterator1, class InputIterator2> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 380 | constexpr bool // constexpr in C++20 |
Aditya Kumar | 331fb80 | 2016-08-25 11:52:38 | [diff] [blame] | 381 | equal(InputIterator1 first1, InputIterator1 last1, |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 382 | InputIterator2 first2, InputIterator2 last2); // **C++14** |
| 383 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 384 | template <class InputIterator1, class InputIterator2, class BinaryPredicate> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 385 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 386 | equal(InputIterator1 first1, InputIterator1 last1, |
| 387 | InputIterator2 first2, BinaryPredicate pred); |
| 388 | |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 389 | template <class InputIterator1, class InputIterator2, class BinaryPredicate> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 390 | constexpr bool // constexpr in C++20 |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 391 | equal(InputIterator1 first1, InputIterator1 last1, |
| 392 | InputIterator2 first2, InputIterator2 last2, |
| 393 | BinaryPredicate pred); // **C++14** |
| 394 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 395 | template<class ForwardIterator1, class ForwardIterator2> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 396 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 397 | is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, |
| 398 | ForwardIterator2 first2); |
| 399 | |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 400 | template<class ForwardIterator1, class ForwardIterator2> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 401 | constexpr bool // constexpr in C++20 |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 402 | is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, |
| 403 | ForwardIterator2 first2, ForwardIterator2 last2); // **C++14** |
| 404 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 405 | template<class ForwardIterator1, class ForwardIterator2, class BinaryPredicate> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 406 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 407 | is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, |
| 408 | ForwardIterator2 first2, BinaryPredicate pred); |
| 409 | |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 410 | template<class ForwardIterator1, class ForwardIterator2, class BinaryPredicate> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 411 | constexpr bool // constexpr in C++20 |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 412 | is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, |
| 413 | ForwardIterator2 first2, ForwardIterator2 last2, |
| 414 | BinaryPredicate pred); // **C++14** |
| 415 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 416 | template <class ForwardIterator1, class ForwardIterator2> |
Marshall Clow | 12f0a77 | 2018-01-16 15:48:27 | [diff] [blame] | 417 | constexpr ForwardIterator1 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 418 | search(ForwardIterator1 first1, ForwardIterator1 last1, |
| 419 | ForwardIterator2 first2, ForwardIterator2 last2); |
| 420 | |
| 421 | template <class ForwardIterator1, class ForwardIterator2, class BinaryPredicate> |
Marshall Clow | 12f0a77 | 2018-01-16 15:48:27 | [diff] [blame] | 422 | constexpr ForwardIterator1 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 423 | search(ForwardIterator1 first1, ForwardIterator1 last1, |
| 424 | ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); |
| 425 | |
| 426 | template <class ForwardIterator, class Size, class T> |
Marshall Clow | 12f0a77 | 2018-01-16 15:48:27 | [diff] [blame] | 427 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 428 | search_n(ForwardIterator first, ForwardIterator last, Size count, const T& value); |
| 429 | |
| 430 | template <class ForwardIterator, class Size, class T, class BinaryPredicate> |
Marshall Clow | 12f0a77 | 2018-01-16 15:48:27 | [diff] [blame] | 431 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 432 | search_n(ForwardIterator first, ForwardIterator last, |
| 433 | Size count, const T& value, BinaryPredicate pred); |
| 434 | |
| 435 | template <class InputIterator, class OutputIterator> |
Louis Dionne | 13c90a5 | 2019-11-06 12:02:41 | [diff] [blame] | 436 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 437 | copy(InputIterator first, InputIterator last, OutputIterator result); |
| 438 | |
| 439 | template<class InputIterator, class OutputIterator, class Predicate> |
Louis Dionne | 13c90a5 | 2019-11-06 12:02:41 | [diff] [blame] | 440 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 441 | copy_if(InputIterator first, InputIterator last, |
| 442 | OutputIterator result, Predicate pred); |
| 443 | |
| 444 | template<class InputIterator, class Size, class OutputIterator> |
Louis Dionne | 13c90a5 | 2019-11-06 12:02:41 | [diff] [blame] | 445 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 446 | copy_n(InputIterator first, Size n, OutputIterator result); |
| 447 | |
| 448 | template <class BidirectionalIterator1, class BidirectionalIterator2> |
Louis Dionne | 13c90a5 | 2019-11-06 12:02:41 | [diff] [blame] | 449 | constexpr BidirectionalIterator2 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 450 | copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last, |
| 451 | BidirectionalIterator2 result); |
| 452 | |
| 453 | template <class ForwardIterator1, class ForwardIterator2> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 454 | constexpr ForwardIterator2 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 455 | swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2); |
| 456 | |
Nikolas Klauser | 9d90531 | 2022-02-10 12:33:03 | [diff] [blame] | 457 | template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2> |
| 458 | requires indirectly_swappable<I1, I2> |
| 459 | constexpr ranges::swap_ranges_result<I1, I2> |
| 460 | ranges::swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2); |
| 461 | |
| 462 | template<input_range R1, input_range R2> |
| 463 | requires indirectly_swappable<iterator_t<R1>, iterator_t<R2>> |
| 464 | constexpr ranges::swap_ranges_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>> |
| 465 | ranges::swap_ranges(R1&& r1, R2&& r2); |
| 466 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 467 | template <class ForwardIterator1, class ForwardIterator2> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 468 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 469 | iter_swap(ForwardIterator1 a, ForwardIterator2 b); |
| 470 | |
| 471 | template <class InputIterator, class OutputIterator, class UnaryOperation> |
Marshall Clow | 99894b6 | 2018-01-19 17:45:39 | [diff] [blame] | 472 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 473 | transform(InputIterator first, InputIterator last, OutputIterator result, UnaryOperation op); |
| 474 | |
| 475 | template <class InputIterator1, class InputIterator2, class OutputIterator, class BinaryOperation> |
Marshall Clow | 99894b6 | 2018-01-19 17:45:39 | [diff] [blame] | 476 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 477 | transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, |
| 478 | OutputIterator result, BinaryOperation binary_op); |
| 479 | |
| 480 | template <class ForwardIterator, class T> |
Marshall Clow | 12c7423 | 2018-01-19 18:07:29 | [diff] [blame] | 481 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 482 | replace(ForwardIterator first, ForwardIterator last, const T& old_value, const T& new_value); |
| 483 | |
| 484 | template <class ForwardIterator, class Predicate, class T> |
Marshall Clow | 12c7423 | 2018-01-19 18:07:29 | [diff] [blame] | 485 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 486 | replace_if(ForwardIterator first, ForwardIterator last, Predicate pred, const T& new_value); |
| 487 | |
| 488 | template <class InputIterator, class OutputIterator, class T> |
Marshall Clow | 12c7423 | 2018-01-19 18:07:29 | [diff] [blame] | 489 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 490 | replace_copy(InputIterator first, InputIterator last, OutputIterator result, |
| 491 | const T& old_value, const T& new_value); |
| 492 | |
| 493 | template <class InputIterator, class OutputIterator, class Predicate, class T> |
Marshall Clow | 12c7423 | 2018-01-19 18:07:29 | [diff] [blame] | 494 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 495 | replace_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred, const T& new_value); |
| 496 | |
| 497 | template <class ForwardIterator, class T> |
Marshall Clow | 4bfb931 | 2018-01-20 20:14:32 | [diff] [blame] | 498 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 499 | fill(ForwardIterator first, ForwardIterator last, const T& value); |
| 500 | |
| 501 | template <class OutputIterator, class Size, class T> |
Marshall Clow | 4bfb931 | 2018-01-20 20:14:32 | [diff] [blame] | 502 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 503 | fill_n(OutputIterator first, Size n, const T& value); |
| 504 | |
| 505 | template <class ForwardIterator, class Generator> |
Marshall Clow | 4bfb931 | 2018-01-20 20:14:32 | [diff] [blame] | 506 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 507 | generate(ForwardIterator first, ForwardIterator last, Generator gen); |
| 508 | |
| 509 | template <class OutputIterator, class Size, class Generator> |
Marshall Clow | 4bfb931 | 2018-01-20 20:14:32 | [diff] [blame] | 510 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 511 | generate_n(OutputIterator first, Size n, Generator gen); |
| 512 | |
| 513 | template <class ForwardIterator, class T> |
Marshall Clow | e8ea829 | 2018-01-22 21:43:04 | [diff] [blame] | 514 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 515 | remove(ForwardIterator first, ForwardIterator last, const T& value); |
| 516 | |
| 517 | template <class ForwardIterator, class Predicate> |
Marshall Clow | e8ea829 | 2018-01-22 21:43:04 | [diff] [blame] | 518 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 519 | remove_if(ForwardIterator first, ForwardIterator last, Predicate pred); |
| 520 | |
| 521 | template <class InputIterator, class OutputIterator, class T> |
Marshall Clow | e8ea829 | 2018-01-22 21:43:04 | [diff] [blame] | 522 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 523 | remove_copy(InputIterator first, InputIterator last, OutputIterator result, const T& value); |
| 524 | |
| 525 | template <class InputIterator, class OutputIterator, class Predicate> |
Marshall Clow | e8ea829 | 2018-01-22 21:43:04 | [diff] [blame] | 526 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 527 | remove_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred); |
| 528 | |
| 529 | template <class ForwardIterator> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 530 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 531 | unique(ForwardIterator first, ForwardIterator last); |
| 532 | |
| 533 | template <class ForwardIterator, class BinaryPredicate> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 534 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 535 | unique(ForwardIterator first, ForwardIterator last, BinaryPredicate pred); |
| 536 | |
| 537 | template <class InputIterator, class OutputIterator> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 538 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 539 | unique_copy(InputIterator first, InputIterator last, OutputIterator result); |
| 540 | |
| 541 | template <class InputIterator, class OutputIterator, class BinaryPredicate> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 542 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 543 | unique_copy(InputIterator first, InputIterator last, OutputIterator result, BinaryPredicate pred); |
| 544 | |
| 545 | template <class BidirectionalIterator> |
Arthur O'Dwyer | f851db3 | 2020-12-17 05:01:08 | [diff] [blame] | 546 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 547 | reverse(BidirectionalIterator first, BidirectionalIterator last); |
| 548 | |
| 549 | template <class BidirectionalIterator, class OutputIterator> |
Marshall Clow | e8ea829 | 2018-01-22 21:43:04 | [diff] [blame] | 550 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 551 | reverse_copy(BidirectionalIterator first, BidirectionalIterator last, OutputIterator result); |
| 552 | |
| 553 | template <class ForwardIterator> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 554 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 555 | rotate(ForwardIterator first, ForwardIterator middle, ForwardIterator last); |
| 556 | |
| 557 | template <class ForwardIterator, class OutputIterator> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 558 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 559 | rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last, OutputIterator result); |
| 560 | |
| 561 | template <class RandomAccessIterator> |
| 562 | void |
Marshall Clow | 0f37a41 | 2017-03-23 13:43:37 | [diff] [blame] | 563 | random_shuffle(RandomAccessIterator first, RandomAccessIterator last); // deprecated in C++14, removed in C++17 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 564 | |
| 565 | template <class RandomAccessIterator, class RandomNumberGenerator> |
| 566 | void |
Marshall Clow | 06965c1 | 2014-03-03 06:14:19 | [diff] [blame] | 567 | random_shuffle(RandomAccessIterator first, RandomAccessIterator last, |
Marshall Clow | 0f37a41 | 2017-03-23 13:43:37 | [diff] [blame] | 568 | RandomNumberGenerator& rand); // deprecated in C++14, removed in C++17 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 569 | |
Eric Fiselier | e715470 | 2016-08-28 22:14:37 | [diff] [blame] | 570 | template<class PopulationIterator, class SampleIterator, |
| 571 | class Distance, class UniformRandomBitGenerator> |
| 572 | SampleIterator sample(PopulationIterator first, PopulationIterator last, |
| 573 | SampleIterator out, Distance n, |
| 574 | UniformRandomBitGenerator&& g); // C++17 |
| 575 | |
Howard Hinnant | f9d540b | 2010-05-26 17:49:34 | [diff] [blame] | 576 | template<class RandomAccessIterator, class UniformRandomNumberGenerator> |
| 577 | void shuffle(RandomAccessIterator first, RandomAccessIterator last, |
Howard Hinnant | fb34010 | 2010-11-18 01:47:02 | [diff] [blame] | 578 | UniformRandomNumberGenerator&& g); |
Howard Hinnant | f9d540b | 2010-05-26 17:49:34 | [diff] [blame] | 579 | |
Arthur O'Dwyer | 3fbd3ea | 2020-12-26 06:39:03 | [diff] [blame] | 580 | template<class ForwardIterator> |
| 581 | constexpr ForwardIterator |
| 582 | shift_left(ForwardIterator first, ForwardIterator last, |
| 583 | typename iterator_traits<ForwardIterator>::difference_type n); // C++20 |
| 584 | |
| 585 | template<class ForwardIterator> |
| 586 | constexpr ForwardIterator |
| 587 | shift_right(ForwardIterator first, ForwardIterator last, |
| 588 | typename iterator_traits<ForwardIterator>::difference_type n); // C++20 |
| 589 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 590 | template <class InputIterator, class Predicate> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 591 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 592 | is_partitioned(InputIterator first, InputIterator last, Predicate pred); |
| 593 | |
| 594 | template <class ForwardIterator, class Predicate> |
Arthur O'Dwyer | f851db3 | 2020-12-17 05:01:08 | [diff] [blame] | 595 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 596 | partition(ForwardIterator first, ForwardIterator last, Predicate pred); |
| 597 | |
| 598 | template <class InputIterator, class OutputIterator1, |
| 599 | class OutputIterator2, class Predicate> |
Marshall Clow | 1b9a4ff | 2018-01-22 20:44:33 | [diff] [blame] | 600 | constexpr pair<OutputIterator1, OutputIterator2> // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 601 | partition_copy(InputIterator first, InputIterator last, |
| 602 | OutputIterator1 out_true, OutputIterator2 out_false, |
| 603 | Predicate pred); |
| 604 | |
| 605 | template <class ForwardIterator, class Predicate> |
| 606 | ForwardIterator |
| 607 | stable_partition(ForwardIterator first, ForwardIterator last, Predicate pred); |
| 608 | |
| 609 | template<class ForwardIterator, class Predicate> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 610 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 611 | partition_point(ForwardIterator first, ForwardIterator last, Predicate pred); |
| 612 | |
| 613 | template <class ForwardIterator> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 614 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 615 | is_sorted(ForwardIterator first, ForwardIterator last); |
| 616 | |
| 617 | template <class ForwardIterator, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 618 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 619 | is_sorted(ForwardIterator first, ForwardIterator last, Compare comp); |
| 620 | |
| 621 | template<class ForwardIterator> |
Marshall Clow | 056f15e | 2018-01-15 19:40:34 | [diff] [blame] | 622 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 623 | is_sorted_until(ForwardIterator first, ForwardIterator last); |
| 624 | |
| 625 | template <class ForwardIterator, class Compare> |
Marshall Clow | 056f15e | 2018-01-15 19:40:34 | [diff] [blame] | 626 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 627 | is_sorted_until(ForwardIterator first, ForwardIterator last, Compare comp); |
| 628 | |
| 629 | template <class RandomAccessIterator> |
Arthur O'Dwyer | 493f140 | 2020-12-20 20:21:42 | [diff] [blame] | 630 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 631 | sort(RandomAccessIterator first, RandomAccessIterator last); |
| 632 | |
| 633 | template <class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 493f140 | 2020-12-20 20:21:42 | [diff] [blame] | 634 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 635 | sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp); |
| 636 | |
| 637 | template <class RandomAccessIterator> |
| 638 | void |
| 639 | stable_sort(RandomAccessIterator first, RandomAccessIterator last); |
| 640 | |
| 641 | template <class RandomAccessIterator, class Compare> |
| 642 | void |
| 643 | stable_sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp); |
| 644 | |
| 645 | template <class RandomAccessIterator> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 646 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 647 | partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last); |
| 648 | |
| 649 | template <class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 650 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 651 | partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last, Compare comp); |
| 652 | |
| 653 | template <class InputIterator, class RandomAccessIterator> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 654 | constexpr RandomAccessIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 655 | partial_sort_copy(InputIterator first, InputIterator last, |
| 656 | RandomAccessIterator result_first, RandomAccessIterator result_last); |
| 657 | |
| 658 | template <class InputIterator, class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 659 | constexpr RandomAccessIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 660 | partial_sort_copy(InputIterator first, InputIterator last, |
| 661 | RandomAccessIterator result_first, RandomAccessIterator result_last, Compare comp); |
| 662 | |
| 663 | template <class RandomAccessIterator> |
Arthur O'Dwyer | 5d95656 | 2021-02-04 23:12:52 | [diff] [blame] | 664 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 665 | nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last); |
| 666 | |
| 667 | template <class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 5d95656 | 2021-02-04 23:12:52 | [diff] [blame] | 668 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 669 | nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last, Compare comp); |
| 670 | |
| 671 | template <class ForwardIterator, class T> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 672 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 673 | lower_bound(ForwardIterator first, ForwardIterator last, const T& value); |
| 674 | |
| 675 | template <class ForwardIterator, class T, class Compare> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 676 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 677 | lower_bound(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); |
| 678 | |
| 679 | template <class ForwardIterator, class T> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 680 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 681 | upper_bound(ForwardIterator first, ForwardIterator last, const T& value); |
| 682 | |
| 683 | template <class ForwardIterator, class T, class Compare> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 684 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 685 | upper_bound(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); |
| 686 | |
| 687 | template <class ForwardIterator, class T> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 688 | constexpr pair<ForwardIterator, ForwardIterator> // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 689 | equal_range(ForwardIterator first, ForwardIterator last, const T& value); |
| 690 | |
| 691 | template <class ForwardIterator, class T, class Compare> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 692 | constexpr pair<ForwardIterator, ForwardIterator> // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 693 | equal_range(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); |
| 694 | |
| 695 | template <class ForwardIterator, class T> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 696 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 697 | binary_search(ForwardIterator first, ForwardIterator last, const T& value); |
| 698 | |
| 699 | template <class ForwardIterator, class T, class Compare> |
Marshall Clow | 8da1a48 | 2018-01-22 23:10:40 | [diff] [blame] | 700 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 701 | binary_search(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); |
| 702 | |
| 703 | template <class InputIterator1, class InputIterator2, class OutputIterator> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 704 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 705 | merge(InputIterator1 first1, InputIterator1 last1, |
| 706 | InputIterator2 first2, InputIterator2 last2, OutputIterator result); |
| 707 | |
| 708 | template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 709 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 710 | merge(InputIterator1 first1, InputIterator1 last1, |
| 711 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 712 | |
| 713 | template <class BidirectionalIterator> |
| 714 | void |
| 715 | inplace_merge(BidirectionalIterator first, BidirectionalIterator middle, BidirectionalIterator last); |
| 716 | |
| 717 | template <class BidirectionalIterator, class Compare> |
| 718 | void |
| 719 | inplace_merge(BidirectionalIterator first, BidirectionalIterator middle, BidirectionalIterator last, Compare comp); |
| 720 | |
| 721 | template <class InputIterator1, class InputIterator2> |
Marshall Clow | 8da1a48 | 2018-01-22 23:10:40 | [diff] [blame] | 722 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 723 | includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2); |
| 724 | |
| 725 | template <class InputIterator1, class InputIterator2, class Compare> |
Marshall Clow | 8da1a48 | 2018-01-22 23:10:40 | [diff] [blame] | 726 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 727 | includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, Compare comp); |
| 728 | |
| 729 | template <class InputIterator1, class InputIterator2, class OutputIterator> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 730 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 731 | set_union(InputIterator1 first1, InputIterator1 last1, |
| 732 | InputIterator2 first2, InputIterator2 last2, OutputIterator result); |
| 733 | |
| 734 | template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 735 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 736 | set_union(InputIterator1 first1, InputIterator1 last1, |
| 737 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 738 | |
| 739 | template <class InputIterator1, class InputIterator2, class OutputIterator> |
Marshall Clow | 8da1a48 | 2018-01-22 23:10:40 | [diff] [blame] | 740 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 741 | set_intersection(InputIterator1 first1, InputIterator1 last1, |
| 742 | InputIterator2 first2, InputIterator2 last2, OutputIterator result); |
| 743 | |
| 744 | template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare> |
Marshall Clow | 8da1a48 | 2018-01-22 23:10:40 | [diff] [blame] | 745 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 746 | set_intersection(InputIterator1 first1, InputIterator1 last1, |
| 747 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 748 | |
| 749 | template <class InputIterator1, class InputIterator2, class OutputIterator> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 750 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 751 | set_difference(InputIterator1 first1, InputIterator1 last1, |
| 752 | InputIterator2 first2, InputIterator2 last2, OutputIterator result); |
| 753 | |
| 754 | template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 755 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 756 | set_difference(InputIterator1 first1, InputIterator1 last1, |
| 757 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 758 | |
| 759 | template <class InputIterator1, class InputIterator2, class OutputIterator> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 760 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 761 | set_symmetric_difference(InputIterator1 first1, InputIterator1 last1, |
| 762 | InputIterator2 first2, InputIterator2 last2, OutputIterator result); |
| 763 | |
| 764 | template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 765 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 766 | set_symmetric_difference(InputIterator1 first1, InputIterator1 last1, |
| 767 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 768 | |
| 769 | template <class RandomAccessIterator> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 770 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 771 | push_heap(RandomAccessIterator first, RandomAccessIterator last); |
| 772 | |
| 773 | template <class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 774 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 775 | push_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); |
| 776 | |
| 777 | template <class RandomAccessIterator> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 778 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 779 | pop_heap(RandomAccessIterator first, RandomAccessIterator last); |
| 780 | |
| 781 | template <class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 782 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 783 | pop_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); |
| 784 | |
| 785 | template <class RandomAccessIterator> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 786 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 787 | make_heap(RandomAccessIterator first, RandomAccessIterator last); |
| 788 | |
| 789 | template <class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 790 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 791 | make_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); |
| 792 | |
| 793 | template <class RandomAccessIterator> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 794 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 795 | sort_heap(RandomAccessIterator first, RandomAccessIterator last); |
| 796 | |
| 797 | template <class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 798 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 799 | sort_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); |
| 800 | |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 801 | template <class RandomAccessIterator> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 802 | constexpr bool // constexpr in C++20 |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 803 | is_heap(RandomAccessIterator first, RandomAccessiterator last); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 804 | |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 805 | template <class RandomAccessIterator, class Compare> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 806 | constexpr bool // constexpr in C++20 |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 807 | is_heap(RandomAccessIterator first, RandomAccessiterator last, Compare comp); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 808 | |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 809 | template <class RandomAccessIterator> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 810 | constexpr RandomAccessIterator // constexpr in C++20 |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 811 | is_heap_until(RandomAccessIterator first, RandomAccessiterator last); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 812 | |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 813 | template <class RandomAccessIterator, class Compare> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 814 | constexpr RandomAccessIterator // constexpr in C++20 |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 815 | is_heap_until(RandomAccessIterator first, RandomAccessiterator last, Compare comp); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 816 | |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 817 | template <class ForwardIterator> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 818 | constexpr ForwardIterator // constexpr in C++14 |
| 819 | min_element(ForwardIterator first, ForwardIterator last); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 820 | |
| 821 | template <class ForwardIterator, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 822 | constexpr ForwardIterator // constexpr in C++14 |
| 823 | min_element(ForwardIterator first, ForwardIterator last, Compare comp); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 824 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 825 | template <class T> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 826 | constexpr const T& // constexpr in C++14 |
| 827 | min(const T& a, const T& b); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 828 | |
| 829 | template <class T, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 830 | constexpr const T& // constexpr in C++14 |
| 831 | min(const T& a, const T& b, Compare comp); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 832 | |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 833 | template<class T> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 834 | constexpr T // constexpr in C++14 |
| 835 | min(initializer_list<T> t); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 836 | |
| 837 | template<class T, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 838 | constexpr T // constexpr in C++14 |
| 839 | min(initializer_list<T> t, Compare comp); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 840 | |
Marshall Clow | 146c14a | 2016-03-07 22:43:49 | [diff] [blame] | 841 | template<class T> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 842 | constexpr const T& clamp(const T& v, const T& lo, const T& hi); // C++17 |
Marshall Clow | 146c14a | 2016-03-07 22:43:49 | [diff] [blame] | 843 | |
| 844 | template<class T, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 845 | constexpr const T& clamp(const T& v, const T& lo, const T& hi, Compare comp); // C++17 |
Marshall Clow | 146c14a | 2016-03-07 22:43:49 | [diff] [blame] | 846 | |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 847 | template <class ForwardIterator> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 848 | constexpr ForwardIterator // constexpr in C++14 |
| 849 | max_element(ForwardIterator first, ForwardIterator last); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 850 | |
| 851 | template <class ForwardIterator, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 852 | constexpr ForwardIterator // constexpr in C++14 |
| 853 | max_element(ForwardIterator first, ForwardIterator last, Compare comp); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 854 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 855 | template <class T> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 856 | constexpr const T& // constexpr in C++14 |
| 857 | max(const T& a, const T& b); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 858 | |
| 859 | template <class T, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 860 | constexpr const T& // constexpr in C++14 |
| 861 | max(const T& a, const T& b, Compare comp); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 862 | |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 863 | template<class T> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 864 | constexpr T // constexpr in C++14 |
| 865 | max(initializer_list<T> t); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 866 | |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 867 | template<class T, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 868 | constexpr T // constexpr in C++14 |
| 869 | max(initializer_list<T> t, Compare comp); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 870 | |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 871 | template<class ForwardIterator> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 872 | constexpr pair<ForwardIterator, ForwardIterator> // constexpr in C++14 |
| 873 | minmax_element(ForwardIterator first, ForwardIterator last); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 874 | |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 875 | template<class ForwardIterator, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 876 | constexpr pair<ForwardIterator, ForwardIterator> // constexpr in C++14 |
| 877 | minmax_element(ForwardIterator first, ForwardIterator last, Compare comp); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 878 | |
| 879 | template<class T> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 880 | constexpr pair<const T&, const T&> // constexpr in C++14 |
| 881 | minmax(const T& a, const T& b); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 882 | |
| 883 | template<class T, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 884 | constexpr pair<const T&, const T&> // constexpr in C++14 |
| 885 | minmax(const T& a, const T& b, Compare comp); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 886 | |
| 887 | template<class T> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 888 | constexpr pair<T, T> // constexpr in C++14 |
| 889 | minmax(initializer_list<T> t); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 890 | |
| 891 | template<class T, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 892 | constexpr pair<T, T> // constexpr in C++14 |
| 893 | minmax(initializer_list<T> t, Compare comp); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 894 | |
| 895 | template <class InputIterator1, class InputIterator2> |
Marshall Clow | 1b9a4ff | 2018-01-22 20:44:33 | [diff] [blame] | 896 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 897 | lexicographical_compare(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2); |
| 898 | |
| 899 | template <class InputIterator1, class InputIterator2, class Compare> |
Marshall Clow | 1b9a4ff | 2018-01-22 20:44:33 | [diff] [blame] | 900 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 901 | lexicographical_compare(InputIterator1 first1, InputIterator1 last1, |
| 902 | InputIterator2 first2, InputIterator2 last2, Compare comp); |
| 903 | |
| 904 | template <class BidirectionalIterator> |
Arthur O'Dwyer | f851db3 | 2020-12-17 05:01:08 | [diff] [blame] | 905 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 906 | next_permutation(BidirectionalIterator first, BidirectionalIterator last); |
| 907 | |
| 908 | template <class BidirectionalIterator, class Compare> |
Arthur O'Dwyer | f851db3 | 2020-12-17 05:01:08 | [diff] [blame] | 909 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 910 | next_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp); |
| 911 | |
| 912 | template <class BidirectionalIterator> |
Arthur O'Dwyer | f851db3 | 2020-12-17 05:01:08 | [diff] [blame] | 913 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 914 | prev_permutation(BidirectionalIterator first, BidirectionalIterator last); |
| 915 | |
| 916 | template <class BidirectionalIterator, class Compare> |
Arthur O'Dwyer | f851db3 | 2020-12-17 05:01:08 | [diff] [blame] | 917 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 918 | prev_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 919 | } // std |
| 920 | |
| 921 | */ |
| 922 | |
Louis Dionne | 385cc25 | 2022-03-25 16:55:36 | [diff] [blame] | 923 | #include <__assert> // all public C++ headers provide the assertion handler |
Arthur O'Dwyer | ea2206d | 2022-02-04 18:09:30 | [diff] [blame] | 924 | #include <__bits> |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 925 | #include <__config> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 926 | #include <__debug> |
Howard Hinnant | a1d07d5 | 2012-07-26 17:09:09 | [diff] [blame] | 927 | #include <cstddef> |
Arthur O'Dwyer | bfbd73f | 2021-05-19 15:57:04 | [diff] [blame] | 928 | #include <cstring> |
Arthur O'Dwyer | bfbd73f | 2021-05-19 15:57:04 | [diff] [blame] | 929 | #include <initializer_list> |
Arthur O'Dwyer | bfbd73f | 2021-05-19 15:57:04 | [diff] [blame] | 930 | #include <iterator> |
| 931 | #include <memory> |
| 932 | #include <type_traits> |
Marshall Clow | f56972e | 2018-09-12 19:41:40 | [diff] [blame] | 933 | #include <version> |
Howard Hinnant | 5d1a701 | 2013-08-14 18:00:20 | [diff] [blame] | 934 | |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 935 | #include <__algorithm/adjacent_find.h> |
| 936 | #include <__algorithm/all_of.h> |
| 937 | #include <__algorithm/any_of.h> |
| 938 | #include <__algorithm/binary_search.h> |
| 939 | #include <__algorithm/clamp.h> |
| 940 | #include <__algorithm/comp.h> |
| 941 | #include <__algorithm/comp_ref_type.h> |
| 942 | #include <__algorithm/copy.h> |
| 943 | #include <__algorithm/copy_backward.h> |
| 944 | #include <__algorithm/copy_if.h> |
| 945 | #include <__algorithm/copy_n.h> |
| 946 | #include <__algorithm/count.h> |
| 947 | #include <__algorithm/count_if.h> |
| 948 | #include <__algorithm/equal.h> |
| 949 | #include <__algorithm/equal_range.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 950 | #include <__algorithm/fill.h> |
Arthur O'Dwyer | 4d81a46 | 2022-01-07 14:45:05 | [diff] [blame] | 951 | #include <__algorithm/fill_n.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 952 | #include <__algorithm/find.h> |
| 953 | #include <__algorithm/find_end.h> |
| 954 | #include <__algorithm/find_first_of.h> |
| 955 | #include <__algorithm/find_if.h> |
| 956 | #include <__algorithm/find_if_not.h> |
| 957 | #include <__algorithm/for_each.h> |
| 958 | #include <__algorithm/for_each_n.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 959 | #include <__algorithm/generate.h> |
Arthur O'Dwyer | 4d81a46 | 2022-01-07 14:45:05 | [diff] [blame] | 960 | #include <__algorithm/generate_n.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 961 | #include <__algorithm/half_positive.h> |
Nikolas Klauser | 68f4131 | 2022-02-21 22:07:02 | [diff] [blame] | 962 | #include <__algorithm/in_found_result.h> |
Nikolas Klauser | 1e77b39 | 2022-02-11 16:01:58 | [diff] [blame] | 963 | #include <__algorithm/in_fun_result.h> |
Nikolas Klauser | f3514af | 2022-01-25 10:21:47 | [diff] [blame] | 964 | #include <__algorithm/in_in_out_result.h> |
Nikolas Klauser | d3729bb | 2022-01-14 01:55:51 | [diff] [blame] | 965 | #include <__algorithm/in_in_result.h> |
Nikolas Klauser | 610979b | 2022-02-03 01:17:03 | [diff] [blame] | 966 | #include <__algorithm/in_out_out_result.h> |
Konstantin Varlamov | 8d23b74 | 2022-01-11 06:49:37 | [diff] [blame] | 967 | #include <__algorithm/in_out_result.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 968 | #include <__algorithm/includes.h> |
| 969 | #include <__algorithm/inplace_merge.h> |
| 970 | #include <__algorithm/is_heap.h> |
| 971 | #include <__algorithm/is_heap_until.h> |
| 972 | #include <__algorithm/is_partitioned.h> |
| 973 | #include <__algorithm/is_permutation.h> |
| 974 | #include <__algorithm/is_sorted.h> |
| 975 | #include <__algorithm/is_sorted_until.h> |
Christopher Di Bella | 6adbc83 | 2021-06-05 02:47:47 | [diff] [blame] | 976 | #include <__algorithm/iter_swap.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 977 | #include <__algorithm/lexicographical_compare.h> |
| 978 | #include <__algorithm/lower_bound.h> |
| 979 | #include <__algorithm/make_heap.h> |
| 980 | #include <__algorithm/max.h> |
| 981 | #include <__algorithm/max_element.h> |
| 982 | #include <__algorithm/merge.h> |
| 983 | #include <__algorithm/min.h> |
| 984 | #include <__algorithm/min_element.h> |
Nikolas Klauser | 807766b | 2022-02-21 21:48:36 | [diff] [blame] | 985 | #include <__algorithm/min_max_result.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 986 | #include <__algorithm/minmax.h> |
| 987 | #include <__algorithm/minmax_element.h> |
| 988 | #include <__algorithm/mismatch.h> |
| 989 | #include <__algorithm/move.h> |
| 990 | #include <__algorithm/move_backward.h> |
| 991 | #include <__algorithm/next_permutation.h> |
| 992 | #include <__algorithm/none_of.h> |
| 993 | #include <__algorithm/nth_element.h> |
| 994 | #include <__algorithm/partial_sort.h> |
| 995 | #include <__algorithm/partial_sort_copy.h> |
| 996 | #include <__algorithm/partition.h> |
| 997 | #include <__algorithm/partition_copy.h> |
| 998 | #include <__algorithm/partition_point.h> |
| 999 | #include <__algorithm/pop_heap.h> |
| 1000 | #include <__algorithm/prev_permutation.h> |
| 1001 | #include <__algorithm/push_heap.h> |
Nikolas Klauser | 1d83750 | 2022-04-15 11:43:40 | [diff] [blame] | 1002 | #include <__algorithm/ranges_copy.h> |
| 1003 | #include <__algorithm/ranges_copy_backward.h> |
| 1004 | #include <__algorithm/ranges_copy_if.h> |
| 1005 | #include <__algorithm/ranges_copy_n.h> |
Nikolas Klauser | 1306b10 | 2022-04-07 11:02:02 | [diff] [blame] | 1006 | #include <__algorithm/ranges_count.h> |
| 1007 | #include <__algorithm/ranges_count_if.h> |
Nikolas Klauser | ee0f8c4 | 2022-03-12 00:45:35 | [diff] [blame] | 1008 | #include <__algorithm/ranges_find.h> |
| 1009 | #include <__algorithm/ranges_find_if.h> |
| 1010 | #include <__algorithm/ranges_find_if_not.h> |
Nikolas Klauser | 80045e9 | 2022-05-04 18:27:07 | [diff] [blame] | 1011 | #include <__algorithm/ranges_for_each.h> |
| 1012 | #include <__algorithm/ranges_for_each_n.h> |
Nikolas Klauser | 37ba1b9 | 2022-05-04 12:19:09 | [diff] [blame] | 1013 | #include <__algorithm/ranges_is_partitioned.h> |
Nikolas Klauser | e476df5 | 2022-04-03 07:17:01 | [diff] [blame] | 1014 | #include <__algorithm/ranges_max.h> |
Nikolas Klauser | 205557c | 2022-03-07 16:01:52 | [diff] [blame] | 1015 | #include <__algorithm/ranges_max_element.h> |
Nikolas Klauser | f83d833 | 2022-03-18 01:57:08 | [diff] [blame] | 1016 | #include <__algorithm/ranges_min.h> |
Nikolas Klauser | 3b470d1 | 2022-02-11 12:11:57 | [diff] [blame] | 1017 | #include <__algorithm/ranges_min_element.h> |
Nikolas Klauser | 58d9ab7 | 2022-04-13 20:59:09 | [diff] [blame] | 1018 | #include <__algorithm/ranges_minmax.h> |
| 1019 | #include <__algorithm/ranges_minmax_element.h> |
Nikolas Klauser | c2cd15a | 2022-03-08 22:12:35 | [diff] [blame] | 1020 | #include <__algorithm/ranges_mismatch.h> |
Nikolas Klauser | 1d1a191 | 2022-05-24 08:32:50 | [diff] [blame^] | 1021 | #include <__algorithm/ranges_reverse.h> |
Nikolas Klauser | 9d90531 | 2022-02-10 12:33:03 | [diff] [blame] | 1022 | #include <__algorithm/ranges_swap_ranges.h> |
Nikolas Klauser | 3ba8548 | 2022-04-05 09:05:36 | [diff] [blame] | 1023 | #include <__algorithm/ranges_transform.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 1024 | #include <__algorithm/remove.h> |
| 1025 | #include <__algorithm/remove_copy.h> |
| 1026 | #include <__algorithm/remove_copy_if.h> |
| 1027 | #include <__algorithm/remove_if.h> |
| 1028 | #include <__algorithm/replace.h> |
| 1029 | #include <__algorithm/replace_copy.h> |
| 1030 | #include <__algorithm/replace_copy_if.h> |
| 1031 | #include <__algorithm/replace_if.h> |
| 1032 | #include <__algorithm/reverse.h> |
| 1033 | #include <__algorithm/reverse_copy.h> |
| 1034 | #include <__algorithm/rotate.h> |
| 1035 | #include <__algorithm/rotate_copy.h> |
| 1036 | #include <__algorithm/sample.h> |
| 1037 | #include <__algorithm/search.h> |
| 1038 | #include <__algorithm/search_n.h> |
| 1039 | #include <__algorithm/set_difference.h> |
| 1040 | #include <__algorithm/set_intersection.h> |
| 1041 | #include <__algorithm/set_symmetric_difference.h> |
| 1042 | #include <__algorithm/set_union.h> |
| 1043 | #include <__algorithm/shift_left.h> |
| 1044 | #include <__algorithm/shift_right.h> |
| 1045 | #include <__algorithm/shuffle.h> |
| 1046 | #include <__algorithm/sift_down.h> |
| 1047 | #include <__algorithm/sort.h> |
| 1048 | #include <__algorithm/sort_heap.h> |
| 1049 | #include <__algorithm/stable_partition.h> |
| 1050 | #include <__algorithm/stable_sort.h> |
Christopher Di Bella | 6adbc83 | 2021-06-05 02:47:47 | [diff] [blame] | 1051 | #include <__algorithm/swap_ranges.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 1052 | #include <__algorithm/transform.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 1053 | #include <__algorithm/unique.h> |
Arthur O'Dwyer | 4d81a46 | 2022-01-07 14:45:05 | [diff] [blame] | 1054 | #include <__algorithm/unique_copy.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 1055 | #include <__algorithm/unwrap_iter.h> |
| 1056 | #include <__algorithm/upper_bound.h> |
Eric Fiselier | c1bd919 | 2014-08-10 23:53:08 | [diff] [blame] | 1057 | |
Howard Hinnant | 073458b | 2011-10-17 20:05:10 | [diff] [blame] | 1058 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
Arthur O'Dwyer | fa6b9e4 | 2022-02-02 01:16:40 | [diff] [blame] | 1059 | # pragma GCC system_header |
Howard Hinnant | 073458b | 2011-10-17 20:05:10 | [diff] [blame] | 1060 | #endif |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 1061 | |
Louis Dionne | 0a06eb9 | 2019-08-05 18:29:14 | [diff] [blame] | 1062 | #if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17 |
Louis Dionne | 9568924 | 2019-08-06 21:11:24 | [diff] [blame] | 1063 | # include <__pstl_algorithm> |
Louis Dionne | 0a06eb9 | 2019-08-05 18:29:14 | [diff] [blame] | 1064 | #endif |
| 1065 | |
Louis Dionne | 4cd6ca1 | 2021-04-20 16:03:32 | [diff] [blame] | 1066 | #endif // _LIBCPP_ALGORITHM |