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