brintos

brintos / llvm-project-archived public Read only

0
0
Text · 100.9 KiB · e3450c4 Raw
1925 lines · plain
1// -*- C++ -*-2//===----------------------------------------------------------------------===//3//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-exception7//8//===----------------------------------------------------------------------===//9 10#ifndef _LIBCPP___CXX03_ALGORITHM11#define _LIBCPP___CXX03_ALGORITHM12 13/*14    algorithm synopsis15 16#include <__cxx03/initializer_list>17 18namespace std19{20 21namespace ranges {22 23  // [algorithms.results], algorithm result types24  template <class I, class F>25    struct in_fun_result;                // since C++2026 27  template <class I1, class I2>28    struct in_in_result;                 // since C++2029 30  template <class I, class O>31    struct in_out_result;                // since C++2032 33  template <class I1, class I2, class O>34    struct in_in_out_result;             // since C++2035 36  template <class I, class O1, class O2>37    struct in_out_out_result;            // since C++2038 39  template <class I1, class I2>40    struct min_max_result;               // since C++2041 42  template <class I>43    struct in_found_result;              // since C++2044 45  template <class I, class T>46    struct in_value_result;              // since C++2347 48  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,49    indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>                                   // since C++2050  constexpr I min_element(I first, S last, Comp comp = {}, Proj proj = {});51 52  template<forward_range R, class Proj = identity,53    indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>                       // since C++2054  constexpr borrowed_iterator_t<R> min_element(R&& r, Comp comp = {}, Proj proj = {});55 56  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,57    indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>58  constexpr I ranges::max_element(I first, S last, Comp comp = {}, Proj proj = {});                       // since C++2059 60  template<forward_range R, class Proj = identity,61    indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>62  constexpr borrowed_iterator_t<R> ranges::max_element(R&& r, Comp comp = {}, Proj proj = {});            // since C++2063 64  template<class I1, class I2>65    using mismatch_result = in_in_result<I1, I2>;66 67  template <input_iterator I1, sentinel_for<_I1> S1, input_iterator I2, sentinel_for<_I2> S2,68          class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>69    requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>70  constexpr mismatch_result<_I1, _I2>                                                                     // since C++2071  mismatch()(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {})72 73  template <input_range R1, input_range R2,74          class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>75    requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>76  constexpr mismatch_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>>77  mismatch(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {})                          // since C++2078 79    requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>80    constexpr I find(I first, S last, const T& value, Proj proj = {});                                    // since C++2081 82  template<input_range R, class T, class Proj = identity>83    requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>84    constexpr borrowed_iterator_t<R>85      find(R&& r, const T& value, Proj proj = {});                                                        // since C++2086 87  template<input_iterator I, sentinel_for<I> S, class Proj = identity,88           indirect_unary_predicate<projected<I, Proj>> Pred>89    constexpr I find_if(I first, S last, Pred pred, Proj proj = {});                                      // since C++2090 91  template<input_range R, class Proj = identity,92           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>93    constexpr borrowed_iterator_t<R>94      find_if(R&& r, Pred pred, Proj proj = {});                                                          // since C++2095 96  template<input_iterator I, sentinel_for<I> S, class Proj = identity,97           indirect_unary_predicate<projected<I, Proj>> Pred>98    constexpr I find_if_not(I first, S last, Pred pred, Proj proj = {});                                  // since C++2099 100  template<input_range R, class Proj = identity,101           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>102    constexpr borrowed_iterator_t<R>103      find_if_not(R&& r, Pred pred, Proj proj = {});                                                      // since C++20104 105  template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity>106    requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>107    constexpr subrange<I> find_last(I first, S last, const T& value, Proj proj = {});                     // since C++23108 109  template<forward_range R, class T, class Proj = identity>110    requires111      indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>112    constexpr borrowed_subrange_t<R> find_last(R&& r, const T& value, Proj proj = {});                   // since C++23113 114  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,115           indirect_unary_predicate<projected<I, Proj>> Pred>116    constexpr subrange<I> find_last_if(I first, S last, Pred pred, Proj proj = {});                      // since C++23117 118  template<forward_range R, class Proj = identity,119           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>120    constexpr borrowed_subrange_t<R> find_last_if(R&& r, Pred pred, Proj proj = {});                     // since C++23121 122  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,123           indirect_unary_predicate<projected<I, Proj>> Pred>124    constexpr subrange<I> find_last_if_not(I first, S last, Pred pred, Proj proj = {});                  // since C++23125 126  template<forward_range R, class Proj = identity,127           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>128    constexpr borrowed_subrange_t<R> find_last_if_not(R&& r, Pred pred, Proj proj = {});                 // since C++23129 130  template<class T, class Proj = identity,131           indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>132    constexpr const T& min(const T& a, const T& b, Comp comp = {}, Proj proj = {});                       // since C++20133 134  template<copyable T, class Proj = identity,135           indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>136    constexpr T min(initializer_list<T> r, Comp comp = {}, Proj proj = {});                               // since C++20137 138 template<input_range R, class Proj = identity,139          indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>140   requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*>141   constexpr range_value_t<R>142     min(R&& r, Comp comp = {}, Proj proj = {});                                                          // since C++20143 144  template<class T, class Proj = identity,145           indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>146    constexpr const T& max(const T& a, const T& b, Comp comp = {}, Proj proj = {});                       // since C++20147 148  template<copyable T, class Proj = identity,149           indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>150    constexpr T max(initializer_list<T> r, Comp comp = {}, Proj proj = {});                               // since C++20151 152  template<input_range R, class Proj = identity,153           indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>154    requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*>155    constexpr range_value_t<R>156      max(R&& r, Comp comp = {}, Proj proj = {});                                                         // since C++20157 158  template<class I, class O>159    using unary_transform_result = in_out_result<I, O>;                                                   // since C++20160 161  template<class I1, class I2, class O>162    using binary_transform_result = in_in_out_result<I1, I2, O>;                                          // since C++20163 164  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O,165           copy_constructible F, class Proj = identity>166    requires indirectly_writable<O, indirect_result_t<F&, projected<I, Proj>>>167    constexpr ranges::unary_transform_result<I, O>168      transform(I first1, S last1, O result, F op, Proj proj = {});                                       // since C++20169 170  template<input_range R, weakly_incrementable O, copy_constructible F,171           class Proj = identity>172    requires indirectly_writable<O, indirect_result_t<F&, projected<iterator_t<R>, Proj>>>173    constexpr ranges::unary_transform_result<borrowed_iterator_t<R>, O>174      transform(R&& r, O result, F op, Proj proj = {});                                                   // since C++20175 176  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,177           weakly_incrementable O, copy_constructible F, class Proj1 = identity,178           class Proj2 = identity>179    requires indirectly_writable<O, indirect_result_t<F&, projected<I1, Proj1>,180                                           projected<I2, Proj2>>>181    constexpr ranges::binary_transform_result<I1, I2, O>182      transform(I1 first1, S1 last1, I2 first2, S2 last2, O result,183                        F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {});                                 // since C++20184 185  template<input_range R1, input_range R2, weakly_incrementable O,186           copy_constructible F, class Proj1 = identity, class Proj2 = identity>187    requires indirectly_writable<O, indirect_result_t<F&, projected<iterator_t<R1>, Proj1>,188                                           projected<iterator_t<R2>, Proj2>>>189    constexpr ranges::binary_transform_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>, O>190      transform(R1&& r1, R2&& r2, O result,191                        F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {});                                 // since C++20192 193  template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity>194    requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>195    constexpr iter_difference_t<I>196      count(I first, S last, const T& value, Proj proj = {});                                             // since C++20197 198  template<input_range R, class T, class Proj = identity>199    requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>200    constexpr range_difference_t<R>201      count(R&& r, const T& value, Proj proj = {});                                                       // since C++20202 203  template<input_iterator I, sentinel_for<I> S, class Proj = identity,204           indirect_unary_predicate<projected<I, Proj>> Pred>205    constexpr iter_difference_t<I>206      count_if(I first, S last, Pred pred, Proj proj = {});                                               // since C++20207 208  template<input_range R, class Proj = identity,209           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>210    constexpr range_difference_t<R>211      count_if(R&& r, Pred pred, Proj proj = {});                                                         // since C++20212 213  template<class T>214  using minmax_result = min_max_result<T>;215 216  template<class T, class Proj = identity,217           indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>218    constexpr ranges::minmax_result<const T&>219      minmax(const T& a, const T& b, Comp comp = {}, Proj proj = {});                                     // since C++20220 221  template<copyable T, class Proj = identity,222           indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>223    constexpr ranges::minmax_result<T>224      minmax(initializer_list<T> r, Comp comp = {}, Proj proj = {});                                      // since C++20225 226  template<input_range R, class Proj = identity,227           indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>228    requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*>229    constexpr ranges::minmax_result<range_value_t<R>>230      minmax(R&& r, Comp comp = {}, Proj proj = {});                                                      // since C++20231 232  template<class I>233  using minmax_element_result = min_max_result<I>;234 235  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,236           indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>237    constexpr ranges::minmax_element_result<I>238      minmax_element(I first, S last, Comp comp = {}, Proj proj = {});                                    // since C++20239 240  template<forward_range R, class Proj = identity,241           indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>242    constexpr ranges::minmax_element_result<borrowed_iterator_t<R>>243      minmax_element(R&& r, Comp comp = {}, Proj proj = {});                                              // since C++20244 245  template<forward_iterator I1, sentinel_for<I1> S1,246           forward_iterator I2, sentinel_for<I2> S2,247           class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>248    requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>249    constexpr bool contains_subrange(I1 first1, S1 last1, I2 first2, S2 last2,250                                     Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                // since C++23251 252  template<forward_range R1, forward_range R2,253           class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>254    requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>255    constexpr bool contains_subrange(R1&& r1, R2&& r2, Pred pred = {},256                                     Proj1 proj1 = {}, Proj2 proj2 = {});                                // since C++23257 258  template<class I, class O>259    using copy_result = in_out_result<I, O>;                                                // since C++20260 261  template<class I, class O>262    using copy_n_result = in_out_result<I, O>;                                              // since C++20263 264  template<class I, class O>265    using copy_if_result = in_out_result<I, O>;                                             // since C++20266 267  template<class I1, class I2>268    using copy_backward_result = in_out_result<I1, I2>;                                     // since C++20269 270  template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity>271    requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>272    constexpr bool ranges::contains(I first, S last, const T& value, Proj proj = {});       // since C++23273 274  template<input_range R, class T, class Proj = identity>275    requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>276    constexpr bool ranges::contains(R&& r, const T& value, Proj proj = {});                 // since C++23277 278  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O>279    requires indirectly_copyable<I, O>280    constexpr ranges::copy_result<I, O> ranges::copy(I first, S last, O result);            // since C++20281 282  template<input_range R, weakly_incrementable O>283    requires indirectly_copyable<iterator_t<R>, O>284    constexpr ranges::copy_result<borrowed_iterator_t<R>, O> ranges::copy(R&& r, O result); // since C++20285 286  template<input_iterator I, weakly_incrementable O>287    requires indirectly_copyable<I, O>288    constexpr ranges::copy_n_result<I, O>289      ranges::copy_n(I first, iter_difference_t<I> n, O result);                            // since C++20290 291  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class Proj = identity,292           indirect_unary_predicate<projected<I, Proj>> Pred>293    requires indirectly_copyable<I, O>294    constexpr ranges::copy_if_result<I, O>295      ranges::copy_if(I first, S last, O result, Pred pred, Proj proj = {});                // since C++20296 297  template<input_range R, weakly_incrementable O, class Proj = identity,298           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>299    requires indirectly_copyable<iterator_t<R>, O>300    constexpr ranges::copy_if_result<borrowed_iterator_t<R>, O>301      ranges::copy_if(R&& r, O result, Pred pred, Proj proj = {});                          // since C++20302 303  template<bidirectional_iterator I1, sentinel_for<I1> S1, bidirectional_iterator I2>304    requires indirectly_copyable<I1, I2>305    constexpr ranges::copy_backward_result<I1, I2>306      ranges::copy_backward(I1 first, S1 last, I2 result);                                  // since C++20307 308  template<bidirectional_range R, bidirectional_iterator I>309    requires indirectly_copyable<iterator_t<R>, I>310    constexpr ranges::copy_backward_result<borrowed_iterator_t<R>, I>311      ranges::copy_backward(R&& r, I result);                                               // since C++20312 313  template<class I, class F>314    using for_each_result = in_fun_result<I, F>;                                            // since C++20315 316  template<input_iterator I, sentinel_for<I> S, class Proj = identity,317           indirectly_unary_invocable<projected<I, Proj>> Fun>318    constexpr ranges::for_each_result<I, Fun>319      ranges::for_each(I first, S last, Fun f, Proj proj = {});                             // since C++20320 321  template<input_range R, class Proj = identity,322           indirectly_unary_invocable<projected<iterator_t<R>, Proj>> Fun>323    constexpr ranges::for_each_result<borrowed_iterator_t<R>, Fun>324      ranges::for_each(R&& r, Fun f, Proj proj = {});                                       // since C++20325 326  template<input_iterator I, class Proj = identity,327           indirectly_unary_invocable<projected<I, Proj>> Fun>328    constexpr ranges::for_each_n_result<I, Fun>329      ranges::for_each_n(I first, iter_difference_t<I> n, Fun f, Proj proj = {});           // since C++20330 331  template<input_iterator I, sentinel_for<I> S, class Proj = identity,332           indirect_unary_predicate<projected<I, Proj>> Pred>333    constexpr bool ranges::is_partitioned(I first, S last, Pred pred, Proj proj = {});      // since C++20334 335  template<input_range R, class Proj = identity,336           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>337    constexpr bool ranges::is_partitioned(R&& r, Pred pred, Proj proj = {});                // since C++20338 339  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,340          class Proj = identity>341    requires sortable<I, Comp, Proj>342    constexpr I343      ranges::push_heap(I first, S last, Comp comp = {}, Proj proj = {});                   // since C++20344 345  template<random_access_range R, class Comp = ranges::less, class Proj = identity>346    requires sortable<iterator_t<R>, Comp, Proj>347    constexpr borrowed_iterator_t<R>348      ranges::push_heap(R&& r, Comp comp = {}, Proj proj = {});                             // since C++20349 350  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,351          class Proj = identity>352    requires sortable<I, Comp, Proj>353    constexpr I354      ranges::pop_heap(I first, S last, Comp comp = {}, Proj proj = {});                    // since C++20355 356  template<random_access_range R, class Comp = ranges::less, class Proj = identity>357    requires sortable<iterator_t<R>, Comp, Proj>358    constexpr borrowed_iterator_t<R>359      ranges::pop_heap(R&& r, Comp comp = {}, Proj proj = {});                              // since C++20360 361  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,362          class Proj = identity>363    requires sortable<I, Comp, Proj>364    constexpr I365      ranges::make_heap(I first, S last, Comp comp = {}, Proj proj = {});                   // since C++20366 367  template<random_access_range R, class Comp = ranges::less, class Proj = identity>368    requires sortable<iterator_t<R>, Comp, Proj>369    constexpr borrowed_iterator_t<R>370      ranges::make_heap(R&& r, Comp comp = {}, Proj proj = {});                             // since C++20371 372  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,373          class Proj = identity>374    requires sortable<I, Comp, Proj>375    constexpr I376      ranges::sort_heap(I first, S last, Comp comp = {}, Proj proj = {});                   // since C++20377 378  template<random_access_range R, class Comp = ranges::less, class Proj = identity>379    requires sortable<iterator_t<R>, Comp, Proj>380    constexpr borrowed_iterator_t<R>381      ranges::sort_heap(R&& r, Comp comp = {}, Proj proj = {});                             // since C++20382 383  template<random_access_iterator I, sentinel_for<I> S, class Proj = identity,384            indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>385    constexpr bool is_heap(I first, S last, Comp comp = {}, Proj proj = {});                // since C++20386 387  template<random_access_range R, class Proj = identity,388            indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>389    constexpr bool is_heap(R&& r, Comp comp = {}, Proj proj = {});                          // since C++20390 391  template<random_access_iterator I, sentinel_for<I> S, class Proj = identity,392           indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>393    constexpr I is_heap_until(I first, S last, Comp comp = {}, Proj proj = {});             // since C++20394 395  template<random_access_range R, class Proj = identity,396           indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>397    constexpr borrowed_iterator_t<R>398      is_heap_until(R&& r, Comp comp = {}, Proj proj = {});                                 // since C++20399 400  template<bidirectional_iterator I, sentinel_for<I> S>401    requires permutable<I>402    constexpr I ranges::reverse(I first, S last);                                           // since C++20403 404  template<bidirectional_range R>405    requires permutable<iterator_t<R>>406    constexpr borrowed_iterator_t<R> ranges::reverse(R&& r);                                // since C++20407 408  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,409            class Proj = identity>410    requires sortable<I, Comp, Proj>411    constexpr I412      ranges::sort(I first, S last, Comp comp = {}, Proj proj = {});                        // since C++20413 414  template<random_access_range R, class Comp = ranges::less, class Proj = identity>415    requires sortable<iterator_t<R>, Comp, Proj>416    constexpr borrowed_iterator_t<R>417      ranges::sort(R&& r, Comp comp = {}, Proj proj = {});                                  // since C++20418 419  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,420          class Proj = identity>421    requires sortable<I, Comp, Proj>422    I ranges::stable_sort(I first, S last, Comp comp = {}, Proj proj = {});                 // since C++20423 424  template<random_access_range R, class Comp = ranges::less, class Proj = identity>425    requires sortable<iterator_t<R>, Comp, Proj>426    borrowed_iterator_t<R>427      ranges::stable_sort(R&& r, Comp comp = {}, Proj proj = {});                           // since C++20428 429  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,430           class Proj = identity>431    requires sortable<I, Comp, Proj>432    constexpr I433      ranges::partial_sort(I first, I middle, S last, Comp comp = {}, Proj proj = {});      // since C++20434 435  template<random_access_range R, class Comp = ranges::less, class Proj = identity>436    requires sortable<iterator_t<R>, Comp, Proj>437    constexpr borrowed_iterator_t<R>438      ranges::partial_sort(R&& r, iterator_t<R> middle, Comp comp = {}, Proj proj = {});    // since C++20439 440  template<class T, output_iterator<const T&> O, sentinel_for<O> S>441    constexpr O ranges::fill(O first, S last, const T& value);                              // since C++20442 443  template<class T, output_range<const T&> R>444    constexpr borrowed_iterator_t<R> ranges::fill(R&& r, const T& value);                   // since C++20445 446  template<class T, output_iterator<const T&> O>447    constexpr O ranges::fill_n(O first, iter_difference_t<O> n, const T& value);            // since C++20448 449  template<input_or_output_iterator O, sentinel_for<O> S, copy_constructible F>450    requires invocable<F&> && indirectly_writable<O, invoke_result_t<F&>>451    constexpr O generate(O first, S last, F gen);                                           // since C++20452 453  template<class ExecutionPolicy, class ForwardIterator, class Generator>454    void generate(ExecutionPolicy&& exec,455                  ForwardIterator first, ForwardIterator last,456                  Generator gen);                                                           // since C++17457 458  template<class R, copy_constructible F>459    requires invocable<F&> && output_range<R, invoke_result_t<F&>>460    constexpr borrowed_iterator_t<R> generate(R&& r, F gen);                                // since C++20461 462  template<input_or_output_iterator O, copy_constructible F>463    requires invocable<F&> && indirectly_writable<O, invoke_result_t<F&>>464    constexpr O generate_n(O first, iter_difference_t<O> n, F gen);                         // since C++20465 466  template<class ExecutionPolicy, class ForwardIterator, class Size, class Generator>467    ForwardIterator generate_n(ExecutionPolicy&& exec,468                               ForwardIterator first, Size n, Generator gen);               // since C++17469 470 template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,471          class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>472   requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>473   constexpr bool ranges::equal(I1 first1, S1 last1, I2 first2, S2 last2,474                                Pred pred = {},475                                Proj1 proj1 = {}, Proj2 proj2 = {});                        // since C++20476 477 template<input_range R1, input_range R2, class Pred = ranges::equal_to,478          class Proj1 = identity, class Proj2 = identity>479   requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>480   constexpr bool ranges::equal(R1&& r1, R2&& r2, Pred pred = {},481                                Proj1 proj1 = {}, Proj2 proj2 = {});                        // since C++20482 483  template<input_iterator I, sentinel_for<I> S, class Proj = identity,484           indirect_unary_predicate<projected<I, Proj>> Pred>485    constexpr bool ranges::all_of(I first, S last, Pred pred, Proj proj = {});              // since C++20486 487  template<input_range R, class Proj = identity,488           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>489    constexpr bool ranges::all_of(R&& r, Pred pred, Proj proj = {});                        // since C++20490 491  template<input_iterator I, sentinel_for<I> S, class Proj = identity,492           indirect_unary_predicate<projected<I, Proj>> Pred>493    constexpr bool ranges::any_of(I first, S last, Pred pred, Proj proj = {});              // since C++20494 495  template<input_range R, class Proj = identity,496           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>497    constexpr bool ranges::any_of(R&& r, Pred pred, Proj proj = {});                        // since C++20498 499  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,500          class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>501    requires (forward_iterator<I1> || sized_sentinel_for<S1, I1>) &&502           (forward_iterator<I2> || sized_sentinel_for<S2, I2>) &&503           indirectly_comparable<I1, I2, Pred, Proj1, Proj2>504    constexpr bool ranges::ends_with(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {},505                                   Proj1 proj1 = {}, Proj2 proj2 = {});                     // since C++23506 507  template<input_range R1, input_range R2, class Pred = ranges::equal_to, class Proj1 = identity,508          class Proj2 = identity>509    requires (forward_range<R1> || sized_range<R1>) &&510           (forward_range<R2> || sized_range<R2>) &&511           indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>512    constexpr bool ranges::ends_with(R1&& r1, R2&& r2, Pred pred = {},513                                   Proj1 proj1 = {}, Proj2 proj2 = {});                     // since C++23514 515  template<input_iterator I, sentinel_for<I> S, class Proj = identity,516           indirect_unary_predicate<projected<I, Proj>> Pred>517    constexpr bool ranges::none_of(I first, S last, Pred pred, Proj proj = {});             // since C++20518 519  template<input_range R, class Proj = identity,520           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>521    constexpr bool ranges::none_of(R&& r, Pred pred, Proj proj = {});                       // since C++20522 523  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,524          class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>525    requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>526    constexpr bool ranges::starts_with(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {},527                                      Proj1 proj1 = {}, Proj2 proj2 = {});                 // since C++23528 529  template<input_range R1, input_range R2, class Pred = ranges::equal_to, class Proj1 = identity,530          class Proj2 = identity>531    requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>532    constexpr bool ranges::starts_with(R1&& r1, R2&& r2, Pred pred = {},533                                      Proj1 proj1 = {}, Proj2 proj2 = {});                // since C++23534 535  template<input_iterator I1, sentinel_for<I1> S1,536          random_access_iterator I2, sentinel_for<I2> S2,537          class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity>538    requires indirectly_copyable<I1, I2> && sortable<I2, Comp, Proj2> &&539            indirect_strict_weak_order<Comp, projected<I1, Proj1>, projected<I2, Proj2>>540    constexpr partial_sort_copy_result<I1, I2>541      partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last,542                        Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                // since C++20543 544  template<input_range R1, random_access_range R2, class Comp = ranges::less,545          class Proj1 = identity, class Proj2 = identity>546    requires indirectly_copyable<iterator_t<R1>, iterator_t<R2>> &&547            sortable<iterator_t<R2>, Comp, Proj2> &&548            indirect_strict_weak_order<Comp, projected<iterator_t<R1>, Proj1>,549                                        projected<iterator_t<R2>, Proj2>>550    constexpr partial_sort_copy_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>>551      partial_sort_copy(R1&& r, R2&& result_r, Comp comp = {},552                        Proj1 proj1 = {}, Proj2 proj2 = {});                                // since C++20553 554  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,555           indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>556    constexpr bool ranges::is_sorted(I first, S last, Comp comp = {}, Proj proj = {});      // since C++20557 558  template<forward_range R, class Proj = identity,559           indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>560    constexpr bool ranges::is_sorted(R&& r, Comp comp = {}, Proj proj = {});                // since C++20561 562  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,563           indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>564    constexpr I ranges::is_sorted_until(I first, S last, Comp comp = {}, Proj proj = {});   // since C++20565 566  template<forward_range R, class Proj = identity,567           indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>568    constexpr borrowed_iterator_t<R>569      ranges::is_sorted_until(R&& r, Comp comp = {}, Proj proj = {});                       // since C++20570 571  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,572          class Proj = identity>573    requires sortable<I, Comp, Proj>574    constexpr I575      ranges::nth_element(I first, I nth, S last, Comp comp = {}, Proj proj = {});          // since C++20576 577  template<random_access_range R, class Comp = ranges::less, class Proj = identity>578    requires sortable<iterator_t<R>, Comp, Proj>579    constexpr borrowed_iterator_t<R>580      ranges::nth_element(R&& r, iterator_t<R> nth, Comp comp = {}, Proj proj = {});        // since C++20581 582  template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,583           indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>    // since C++20584    constexpr I upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {});585 586  template<forward_range R, class T, class Proj = identity,587           indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =588             ranges::less>589    constexpr borrowed_iterator_t<R>590      upper_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {});                   // since C++20591 592  template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,593           indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>594    constexpr I lower_bound(I first, S last, const T& value, Comp comp = {},595                                    Proj proj = {});                                        // since C++20596  template<forward_range R, class T, class Proj = identity,597           indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =598             ranges::less>599    constexpr borrowed_iterator_t<R>600      lower_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {});                   // since C++20601 602  template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,603           indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>604    constexpr bool binary_search(I first, S last, const T& value, Comp comp = {},605                                         Proj proj = {});                                   // since C++20606 607  template<forward_range R, class T, class Proj = identity,608           indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =609             ranges::less>610    constexpr bool binary_search(R&& r, const T& value, Comp comp = {},611                                         Proj proj = {});                                   // since C++20612 613  template<permutable I, sentinel_for<I> S, class Proj = identity,614           indirect_unary_predicate<projected<I, Proj>> Pred>615    constexpr subrange<I>616      partition(I first, S last, Pred pred, Proj proj = {});                                // since C++20617 618  template<forward_range R, class Proj = identity,619           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>620    requires permutable<iterator_t<R>>621    constexpr borrowed_subrange_t<R>622      partition(R&& r, Pred pred, Proj proj = {});                                          // since C++20623 624  template<bidirectional_iterator I, sentinel_for<I> S, class Proj = identity,625           indirect_unary_predicate<projected<I, Proj>> Pred>626    requires permutable<I>627    subrange<I> stable_partition(I first, S last, Pred pred, Proj proj = {});               // since C++20628 629  template<bidirectional_range R, class Proj = identity,630           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>631    requires permutable<iterator_t<R>>632    borrowed_subrange_t<R> stable_partition(R&& r, Pred pred, Proj proj = {});              // since C++20633 634  template<input_iterator I1, sentinel_for<I1> S1, forward_iterator I2, sentinel_for<I2> S2,635           class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>636    requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>637    constexpr I1 ranges::find_first_of(I1 first1, S1 last1, I2 first2, S2 last2,638                                       Pred pred = {},639                                       Proj1 proj1 = {}, Proj2 proj2 = {});                 // since C++20640 641  template<input_range R1, forward_range R2,642           class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>643    requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>644    constexpr borrowed_iterator_t<R1>645      ranges::find_first_of(R1&& r1, R2&& r2,646                            Pred pred = {},647                            Proj1 proj1 = {}, Proj2 proj2 = {});                            // since C++20648 649  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,650           indirect_binary_predicate<projected<I, Proj>,651                                     projected<I, Proj>> Pred = ranges::equal_to>652    constexpr I ranges::adjacent_find(I first, S last, Pred pred = {}, Proj proj = {});     // since C++20653 654  template<forward_range R, class Proj = identity,655           indirect_binary_predicate<projected<iterator_t<R>, Proj>,656                                     projected<iterator_t<R>, Proj>> Pred = ranges::equal_to>657    constexpr borrowed_iterator_t<R> ranges::adjacent_find(R&& r, Pred pred = {}, Proj proj = {});  // since C++20658 659  template<input_iterator I, sentinel_for<I> S, class T1, class T2, class Proj = identity>660    requires indirectly_writable<I, const T2&> &&661             indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T1*>662    constexpr I663      ranges::replace(I first, S last, const T1& old_value, const T2& new_value, Proj proj = {});   // since C++20664 665  template<input_range R, class T1, class T2, class Proj = identity>666    requires indirectly_writable<iterator_t<R>, const T2&> &&667             indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T1*>668    constexpr borrowed_iterator_t<R>669      ranges::replace(R&& r, const T1& old_value, const T2& new_value, Proj proj = {});             // since C++20670 671  template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity,672           indirect_unary_predicate<projected<I, Proj>> Pred>673    requires indirectly_writable<I, const T&>674    constexpr I ranges::replace_if(I first, S last, Pred pred, const T& new_value, Proj proj = {}); // since C++20675 676  template<input_range R, class T, class Proj = identity,677           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>678    requires indirectly_writable<iterator_t<R>, const T&>679    constexpr borrowed_iterator_t<R>680      ranges::replace_if(R&& r, Pred pred, const T& new_value, Proj proj = {});                     // since C++20681 682  template<class T, class Proj = identity,683           indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>684    constexpr const T&685      ranges::clamp(const T& v, const T& lo, const T& hi, Comp comp = {}, Proj proj = {});          // since C++20686 687  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,688           class Proj1 = identity, class Proj2 = identity,689           indirect_strict_weak_order<projected<I1, Proj1>,690                                      projected<I2, Proj2>> Comp = ranges::less>691    constexpr bool692      ranges::lexicographical_compare(I1 first1, S1 last1, I2 first2, S2 last2,693                                      Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});          // since C++20694 695  template<input_range R1, input_range R2, class Proj1 = identity,696           class Proj2 = identity,697           indirect_strict_weak_order<projected<iterator_t<R1>, Proj1>,698                                      projected<iterator_t<R2>, Proj2>> Comp = ranges::less>699    constexpr bool700      ranges::lexicographical_compare(R1&& r1, R2&& r2, Comp comp = {},701                                      Proj1 proj1 = {}, Proj2 proj2 = {});                          // since C++20702 703  template<bidirectional_iterator I1, sentinel_for<I1> S1, bidirectional_iterator I2>704    requires indirectly_movable<I1, I2>705    constexpr ranges::move_backward_result<I1, I2>706      ranges::move_backward(I1 first, S1 last, I2 result);                                          // since C++20707 708  template<bidirectional_range R, bidirectional_iterator I>709    requires indirectly_movable<iterator_t<R>, I>710    constexpr ranges::move_backward_result<borrowed_iterator_t<R>, I>711      ranges::move_backward(R&& r, I result);                                                       // since C++20712 713  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O>714    requires indirectly_movable<I, O>715    constexpr ranges::move_result<I, O>716      ranges::move(I first, S last, O result);                                                      // since C++20717 718  template<input_range R, weakly_incrementable O>719    requires indirectly_movable<iterator_t<R>, O>720    constexpr ranges::move_result<borrowed_iterator_t<R>, O>721      ranges::move(R&& r, O result);                                                                // since C++20722 723  template<class I, class O1, class O2>724      using partition_copy_result = in_out_out_result<I, O1, O2>;                                   // since C++20725 726  template<input_iterator I, sentinel_for<I> S,727          weakly_incrementable O1, weakly_incrementable O2,728          class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred>729    requires indirectly_copyable<I, O1> && indirectly_copyable<I, O2>730    constexpr partition_copy_result<I, O1, O2>731      partition_copy(I first, S last, O1 out_true, O2 out_false, Pred pred,732                    Proj proj = {});                                                                // since C++20733 734  template<input_range R, weakly_incrementable O1, weakly_incrementable O2,735          class Proj = identity,736          indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>737    requires indirectly_copyable<iterator_t<R>, O1> &&738            indirectly_copyable<iterator_t<R>, O2>739    constexpr partition_copy_result<borrowed_iterator_t<R>, O1, O2>740      partition_copy(R&& r, O1 out_true, O2 out_false, Pred pred, Proj proj = {});                  // since C++20741 742  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,743           indirect_unary_predicate<projected<I, Proj>> Pred>744    constexpr I partition_point(I first, S last, Pred pred, Proj proj = {});                        // since C++20745 746  template<forward_range R, class Proj = identity,747           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>748    constexpr borrowed_iterator_t<R>749      partition_point(R&& r, Pred pred, Proj proj = {});                                            // since C++20750 751  template<class I1, class I2, class O>752    using merge_result = in_in_out_result<I1, I2, O>;                                               // since C++20753 754  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,755           weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity,756           class Proj2 = identity>757    requires mergeable<I1, I2, O, Comp, Proj1, Proj2>758    constexpr merge_result<I1, I2, O>759      merge(I1 first1, S1 last1, I2 first2, S2 last2, O result,760            Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                                    // since C++20761 762  template<input_range R1, input_range R2, weakly_incrementable O, class Comp = ranges::less,763           class Proj1 = identity, class Proj2 = identity>764    requires mergeable<iterator_t<R1>, iterator_t<R2>, O, Comp, Proj1, Proj2>765    constexpr merge_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>, O>766      merge(R1&& r1, R2&& r2, O result,767            Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                                    // since C++20768 769  template<permutable I, sentinel_for<I> S, class T, class Proj = identity>770    requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>771    constexpr subrange<I> ranges::remove(I first, S last, const T& value, Proj proj = {});          // since C++20772 773  template<forward_range R, class T, class Proj = identity>774    requires permutable<iterator_t<R>> &&775             indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>776    constexpr borrowed_subrange_t<R>777      ranges::remove(R&& r, const T& value, Proj proj = {});                                        // since C++20778 779  template<permutable I, sentinel_for<I> S, class Proj = identity,780           indirect_unary_predicate<projected<I, Proj>> Pred>781    constexpr subrange<I> ranges::remove_if(I first, S last, Pred pred, Proj proj = {});            // since C++20782 783  template<forward_range R, class Proj = identity,784           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>785    requires permutable<iterator_t<R>>786    constexpr borrowed_subrange_t<R>787      ranges::remove_if(R&& r, Pred pred, Proj proj = {});                                          // since C++20788 789  template<class I, class O>790    using set_difference_result = in_out_result<I, O>;                                              // since C++20791 792  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,793           weakly_incrementable O, class Comp = ranges::less,794           class Proj1 = identity, class Proj2 = identity>795    requires mergeable<I1, I2, O, Comp, Proj1, Proj2>796    constexpr set_difference_result<I1, O>797      set_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result,798                     Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                           // since C++20799 800  template<input_range R1, input_range R2, weakly_incrementable O,801           class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity>802    requires mergeable<iterator_t<R1>, iterator_t<R2>, O, Comp, Proj1, Proj2>803    constexpr set_difference_result<borrowed_iterator_t<R1>, O>804      set_difference(R1&& r1, R2&& r2, O result,805                     Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                           // since C++20806 807  template<class I1, class I2, class O>808    using set_intersection_result = in_in_out_result<I1, I2, O>;                                    // since C++20809 810  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,811           weakly_incrementable O, class Comp = ranges::less,812           class Proj1 = identity, class Proj2 = identity>813    requires mergeable<I1, I2, O, Comp, Proj1, Proj2>814    constexpr set_intersection_result<I1, I2, O>815      set_intersection(I1 first1, S1 last1, I2 first2, S2 last2, O result,816                       Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                         // since C++20817 818  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,819           weakly_incrementable O, class Comp = ranges::less,820           class Proj1 = identity, class Proj2 = identity>821    requires mergeable<I1, I2, O, Comp, Proj1, Proj2>822    constexpr set_intersection_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>, O>823      set_intersection(R1&& r1, R2&& r2, O result,824                       Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                         // since C++20825 826  template <class _InIter, class _OutIter>827  using reverse_copy_result = in_out_result<_InIter, _OutIter>;                                     // since C++20828 829  template<bidirectional_iterator I, sentinel_for<I> S, weakly_incrementable O>830    requires indirectly_copyable<I, O>831    constexpr ranges::reverse_copy_result<I, O>832      ranges::reverse_copy(I first, S last, O result);                                              // since C++20833 834  template<bidirectional_range R, weakly_incrementable O>835    requires indirectly_copyable<iterator_t<R>, O>836    constexpr ranges::reverse_copy_result<borrowed_iterator_t<R>, O>837      ranges::reverse_copy(R&& r, O result);                                                        // since C++20838 839  template<permutable I, sentinel_for<I> S>840    constexpr subrange<I> rotate(I first, I middle, S last);                                        // since C++20841 842  template<forward_range R>843    requires permutable<iterator_t<R>>844    constexpr borrowed_subrange_t<R> rotate(R&& r, iterator_t<R> middle);                           // since C++20845 846  template <class _InIter, class _OutIter>847  using rotate_copy_result = in_out_result<_InIter, _OutIter>;                                      // since C++20848 849  template<forward_iterator I, sentinel_for<I> S, weakly_incrementable O>850    requires indirectly_copyable<I, O>851    constexpr ranges::rotate_copy_result<I, O>852      ranges::rotate_copy(I first, I middle, S last, O result);                                     // since C++20853 854  template<forward_range R, weakly_incrementable O>855    requires indirectly_copyable<iterator_t<R>, O>856    constexpr ranges::rotate_copy_result<borrowed_iterator_t<R>, O>857      ranges::rotate_copy(R&& r, iterator_t<R> middle, O result);                                   // since C++20858 859  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class Gen>860    requires (forward_iterator<I> || random_access_iterator<O>) &&861            indirectly_copyable<I, O> &&862            uniform_random_bit_generator<remove_reference_t<Gen>>863    O sample(I first, S last, O out, iter_difference_t<I> n, Gen&& g);                              // since C++20864 865  template<input_range R, weakly_incrementable O, class Gen>866    requires (forward_range<R> || random_access_iterator<O>) &&867            indirectly_copyable<iterator_t<R>, O> &&868            uniform_random_bit_generator<remove_reference_t<Gen>>869    O sample(R&& r, O out, range_difference_t<R> n, Gen&& g);                                       // since C++20870 871  template<random_access_iterator I, sentinel_for<I> S, class Gen>872    requires permutable<I> &&873            uniform_random_bit_generator<remove_reference_t<Gen>>874    I shuffle(I first, S last, Gen&& g);                                                            // since C++20875 876  template<random_access_range R, class Gen>877    requires permutable<iterator_t<R>> &&878            uniform_random_bit_generator<remove_reference_t<Gen>>879    borrowed_iterator_t<R> shuffle(R&& r, Gen&& g);                                                 // since C++20880 881  template<forward_iterator I1, sentinel_for<I1> S1, forward_iterator I2,882         sentinel_for<I2> S2, class Proj1 = identity, class Proj2 = identity,883         indirect_equivalence_relation<projected<I1, Proj1>,884                                       projected<I2, Proj2>> Pred = ranges::equal_to>885  constexpr bool ranges::is_permutation(I1 first1, S1 last1, I2 first2, S2 last2,886                                        Pred pred = {},887                                        Proj1 proj1 = {}, Proj2 proj2 = {});                       // since C++20888 889  template<forward_range R1, forward_range R2,890         class Proj1 = identity, class Proj2 = identity,891         indirect_equivalence_relation<projected<iterator_t<R1>, Proj1>,892                                       projected<iterator_t<R2>, Proj2>> Pred = ranges::equal_to>893  constexpr bool ranges::is_permutation(R1&& r1, R2&& r2, Pred pred = {},894                                        Proj1 proj1 = {}, Proj2 proj2 = {});                       // since C++20895 896  template<forward_iterator I1, sentinel_for<I1> S1, forward_iterator I2,897           sentinel_for<I2> S2, class Pred = ranges::equal_to,898           class Proj1 = identity, class Proj2 = identity>899    requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>900    constexpr subrange<I1>901      ranges::search(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {},902                     Proj1 proj1 = {}, Proj2 proj2 = {});                                           // since C++20903 904  template<forward_range R1, forward_range R2, class Pred = ranges::equal_to,905           class Proj1 = identity, class Proj2 = identity>906    requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>907    constexpr borrowed_subrange_t<R1>908      ranges::search(R1&& r1, R2&& r2, Pred pred = {},909                     Proj1 proj1 = {}, Proj2 proj2 = {});                                           // since C++20910 911  template<forward_iterator I, sentinel_for<I> S, class T,912           class Pred = ranges::equal_to, class Proj = identity>913    requires indirectly_comparable<I, const T*, Pred, Proj>914    constexpr subrange<I>915      ranges::search_n(I first, S last, iter_difference_t<I> count,916                       const T& value, Pred pred = {}, Proj proj = {});                             // since C++20917 918  template<forward_range R, class T, class Pred = ranges::equal_to,919           class Proj = identity>920    requires indirectly_comparable<iterator_t<R>, const T*, Pred, Proj>921    constexpr borrowed_subrange_t<R>922      ranges::search_n(R&& r, range_difference_t<R> count,923                       const T& value, Pred pred = {}, Proj proj = {});                             // since C++20924 925  template<input_iterator I, sentinel_for<I> S, class T,926           indirectly-binary-left-foldable<T, I> F>927    constexpr auto ranges::fold_left(I first, S last, T init, F f);                                 // since C++23928 929  template<input_range R, class T, indirectly-binary-left-foldable<T, iterator_t<R>> F>930    constexpr auto fold_left(R&& r, T init, F f);                                                   // since C++23931 932  template<class I, class T>933    using fold_left_with_iter_result = in_value_result<I, T>;                                       // since C++23934 935  template<input_iterator I, sentinel_for<I> S, class T,936           indirectly-binary-left-foldable<T, I> F>937    constexpr see below fold_left_with_iter(I first, S last, T init, F f);                          // since C++23938 939  template<input_range R, class T, indirectly-binary-left-foldable<T, iterator_t<R>> F>940    constexpr see below fold_left_with_iter(R&& r, T init, F f);                                    // since C++23941 942  template<forward_iterator I1, sentinel_for<I1> S1, forward_iterator I2, sentinel_for<I2> S2,943           class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>944    requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>945    constexpr subrange<I1>946      ranges::find_end(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {},947                       Proj1 proj1 = {}, Proj2 proj2 = {});                                         // since C++20948 949  template<forward_range R1, forward_range R2,950           class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>951    requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>952    constexpr borrowed_subrange_t<R1>953      ranges::find_end(R1&& r1, R2&& r2, Pred pred = {},954                       Proj1 proj1 = {}, Proj2 proj2 = {});                                         // since C++20955 956  template<class I1, class I2, class O>957    using set_symmetric_difference_result = in_in_out_result<I1, I2, O>;                            // since C++20958 959  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,960           weakly_incrementable O, class Comp = ranges::less,961           class Proj1 = identity, class Proj2 = identity>962    requires mergeable<I1, I2, O, Comp, Proj1, Proj2>963    constexpr set_symmetric_difference_result<I1, I2, O>964      set_symmetric_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result,965                               Comp comp = {}, Proj1 proj1 = {},966                               Proj2 proj2 = {});                                                   // since C++20967 968  template<input_range R1, input_range R2, weakly_incrementable O,969           class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity>970    requires mergeable<iterator_t<R1>, iterator_t<R2>, O, Comp, Proj1, Proj2>971    constexpr set_symmetric_difference_result<borrowed_iterator_t<R1>,972                                                      borrowed_iterator_t<R2>, O>973      set_symmetric_difference(R1&& r1, R2&& r2, O result, Comp comp = {},974                               Proj1 proj1 = {}, Proj2 proj2 = {});                                 // since C++20975 976  template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,977           indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>978    constexpr subrange<I>979      equal_range(I first, S last, const T& value, Comp comp = {}, Proj proj = {});                 // since C++20980 981  template<forward_range R, class T, class Proj = identity,982           indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =983             ranges::less>984    constexpr borrowed_subrange_t<R>985      equal_range(R&& r, const T& value, Comp comp = {}, Proj proj = {});                           // since C++20986 987  template<class I1, class I2, class O>988    using set_union_result = in_in_out_result<I1, I2, O>;                                           // since C++20989 990  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,991           weakly_incrementable O, class Comp = ranges::less,992           class Proj1 = identity, class Proj2 = identity>993    requires mergeable<I1, I2, O, Comp, Proj1, Proj2>994    constexpr set_union_result<I1, I2, O>995      set_union(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {},996                Proj1 proj1 = {}, Proj2 proj2 = {});                                                // since C++20997 998  template<input_range R1, input_range R2, weakly_incrementable O,999           class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity>1000    requires mergeable<iterator_t<R1>, iterator_t<R2>, O, Comp, Proj1, Proj2>1001    constexpr set_union_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>, O>1002      set_union(R1&& r1, R2&& r2, O result, Comp comp = {},1003                Proj1 proj1 = {}, Proj2 proj2 = {});                                                // since C++201004 1005  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,1006           class Proj1 = identity, class Proj2 = identity,1007           indirect_strict_weak_order<projected<I1, Proj1>, projected<I2, Proj2>> Comp =1008             ranges::less>1009    constexpr bool includes(I1 first1, S1 last1, I2 first2, S2 last2, Comp comp = {},1010                            Proj1 proj1 = {}, Proj2 proj2 = {});                                   // since C++201011 1012  template<input_range R1, input_range R2, class Proj1 = identity,1013           class Proj2 = identity,1014           indirect_strict_weak_order<projected<iterator_t<R1>, Proj1>,1015                                      projected<iterator_t<R2>, Proj2>> Comp = ranges::less>1016    constexpr bool includes(R1&& r1, R2&& r2, Comp comp = {},1017                            Proj1 proj1 = {}, Proj2 proj2 = {});                                   // since C++201018 1019  template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less,1020           class Proj = identity>1021    requires sortable<I, Comp, Proj>1022    I inplace_merge(I first, I middle, S last, Comp comp = {}, Proj proj = {});                    // since C++201023 1024  template<bidirectional_range R, class Comp = ranges::less, class Proj = identity>1025    requires sortable<iterator_t<R>, Comp, Proj>1026    borrowed_iterator_t<R>1027      inplace_merge(R&& r, iterator_t<R> middle, Comp comp = {},1028                    Proj proj = {});                                                               // since C++201029 1030  template<permutable I, sentinel_for<I> S, class Proj = identity,1031           indirect_equivalence_relation<projected<I, Proj>> C = ranges::equal_to>1032    constexpr subrange<I> unique(I first, S last, C comp = {}, Proj proj = {});                    // since C++201033 1034  template<forward_range R, class Proj = identity,1035           indirect_equivalence_relation<projected<iterator_t<R>, Proj>> C = ranges::equal_to>1036    requires permutable<iterator_t<R>>1037    constexpr borrowed_subrange_t<R>1038      unique(R&& r, C comp = {}, Proj proj = {});                                                  // since C++201039 1040  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class Proj = identity,1041           indirect_equivalence_relation<projected<I, Proj>> C = ranges::equal_to>1042    requires indirectly_copyable<I, O> &&1043             (forward_iterator<I> ||1044              (input_iterator<O> && same_as<iter_value_t<I>, iter_value_t<O>>) ||1045              indirectly_copyable_storable<I, O>)1046    constexpr unique_copy_result<I, O>1047      unique_copy(I first, S last, O result, C comp = {}, Proj proj = {});                         // since C++201048 1049  template<input_range R, weakly_incrementable O, class Proj = identity,1050           indirect_equivalence_relation<projected<iterator_t<R>, Proj>> C = ranges::equal_to>1051    requires indirectly_copyable<iterator_t<R>, O> &&1052             (forward_iterator<iterator_t<R>> ||1053              (input_iterator<O> && same_as<range_value_t<R>, iter_value_t<O>>) ||1054              indirectly_copyable_storable<iterator_t<R>, O>)1055    constexpr unique_copy_result<borrowed_iterator_t<R>, O>1056      unique_copy(R&& r, O result, C comp = {}, Proj proj = {});                                   // since C++201057 1058  template<class I, class O>1059      using remove_copy_result = in_out_result<I, O>;                                              // since C++201060 1061  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class T,1062           class Proj = identity>1063             indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>1064    constexpr remove_copy_result<I, O>1065      remove_copy(I first, S last, O result, const T& value, Proj proj = {});                      // since C++201066 1067  template<input_range R, weakly_incrementable O, class T, class Proj = identity>1068    requires indirectly_copyable<iterator_t<R>, O> &&1069             indirect_binary_predicate<ranges::equal_to,1070                                       projected<iterator_t<R>, Proj>, const T*>1071    constexpr remove_copy_result<borrowed_iterator_t<R>, O>1072      remove_copy(R&& r, O result, const T& value, Proj proj = {});                                // since C++201073 1074  template<class I, class O>1075      using remove_copy_if_result = in_out_result<I, O>;                                           // since C++201076 1077  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O,1078           class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred>1079    requires indirectly_copyable<I, O>1080    constexpr remove_copy_if_result<I, O>1081      remove_copy_if(I first, S last, O result, Pred pred, Proj proj = {});                        // since C++201082 1083  template<input_range R, weakly_incrementable O, class Proj = identity,1084           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>1085    requires indirectly_copyable<iterator_t<R>, O>1086    constexpr remove_copy_if_result<borrowed_iterator_t<R>, O>1087      remove_copy_if(R&& r, O result, Pred pred, Proj proj = {});                                  // since C++201088 1089  template<class I, class O>1090      using replace_copy_result = in_out_result<I, O>;                                             // since C++201091 1092  template<input_iterator I, sentinel_for<I> S, class T1, class T2,1093           output_iterator<const T2&> O, class Proj = identity>1094    requires indirectly_copyable<I, O> &&1095             indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T1*>1096    constexpr replace_copy_result<I, O>1097      replace_copy(I first, S last, O result, const T1& old_value, const T2& new_value,1098                   Proj proj = {});                                                                // since C++201099 1100  template<input_range R, class T1, class T2, output_iterator<const T2&> O,1101           class Proj = identity>1102    requires indirectly_copyable<iterator_t<R>, O> &&1103             indirect_binary_predicate<ranges::equal_to,1104                                       projected<iterator_t<R>, Proj>, const T1*>1105    constexpr replace_copy_result<borrowed_iterator_t<R>, O>1106      replace_copy(R&& r, O result, const T1& old_value, const T2& new_value,1107                   Proj proj = {});                                                                // since C++201108 1109  template<class I, class O>1110      using replace_copy_if_result = in_out_result<I, O>;                                          // since C++201111 1112  template<input_iterator I, sentinel_for<I> S, class T, output_iterator<const T&> O,1113           class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred>1114    requires indirectly_copyable<I, O>1115    constexpr replace_copy_if_result<I, O>1116      replace_copy_if(I first, S last, O result, Pred pred, const T& new_value,1117                      Proj proj = {});                                                             // since C++201118 1119  template<input_range R, class T, output_iterator<const T&> O, class Proj = identity,1120           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>1121    requires indirectly_copyable<iterator_t<R>, O>1122    constexpr replace_copy_if_result<borrowed_iterator_t<R>, O>1123      replace_copy_if(R&& r, O result, Pred pred, const T& new_value,1124                      Proj proj = {});                                                             // since C++201125 1126  template<class I>1127    using prev_permutation_result = in_found_result<I>;                                            // since C++201128 1129  template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less,1130           class Proj = identity>1131    requires sortable<I, Comp, Proj>1132    constexpr ranges::prev_permutation_result<I>1133      ranges::prev_permutation(I first, S last, Comp comp = {}, Proj proj = {});                   // since C++201134 1135  template<bidirectional_range R, class Comp = ranges::less,1136           class Proj = identity>1137    requires sortable<iterator_t<R>, Comp, Proj>1138    constexpr ranges::prev_permutation_result<borrowed_iterator_t<R>>1139      ranges::prev_permutation(R&& r, Comp comp = {}, Proj proj = {});                             // since C++201140 1141  template<class I>1142    using next_permutation_result = in_found_result<I>;                                            // since C++201143 1144  template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less,1145           class Proj = identity>1146    requires sortable<I, Comp, Proj>1147    constexpr ranges::next_permutation_result<I>1148      ranges::next_permutation(I first, S last, Comp comp = {}, Proj proj = {});                   // since C++201149 1150  template<bidirectional_range R, class Comp = ranges::less,1151           class Proj = identity>1152    requires sortable<iterator_t<R>, Comp, Proj>1153    constexpr ranges::next_permutation_result<borrowed_iterator_t<R>>1154      ranges::next_permutation(R&& r, Comp comp = {}, Proj proj = {});                             // since C++201155 1156}1157 1158template <class InputIterator, class Predicate>1159    constexpr bool     // constexpr in C++201160    all_of(InputIterator first, InputIterator last, Predicate pred);1161 1162template <class InputIterator, class Predicate>1163    constexpr bool     // constexpr in C++201164    any_of(InputIterator first, InputIterator last, Predicate pred);1165 1166template <class InputIterator, class Predicate>1167    constexpr bool     // constexpr in C++201168    none_of(InputIterator first, InputIterator last, Predicate pred);1169 1170template <class InputIterator, class Function>1171    constexpr Function          // constexpr in C++201172    for_each(InputIterator first, InputIterator last, Function f);1173 1174template<class InputIterator, class Size, class Function>1175    constexpr InputIterator     // constexpr in C++201176    for_each_n(InputIterator first, Size n, Function f); // C++171177 1178template <class InputIterator, class T>1179    constexpr InputIterator     // constexpr in C++201180    find(InputIterator first, InputIterator last, const T& value);1181 1182template <class InputIterator, class Predicate>1183    constexpr InputIterator     // constexpr in C++201184    find_if(InputIterator first, InputIterator last, Predicate pred);1185 1186template<class InputIterator, class Predicate>1187    constexpr InputIterator     // constexpr in C++201188    find_if_not(InputIterator first, InputIterator last, Predicate pred);1189 1190template <class ForwardIterator1, class ForwardIterator2>1191    constexpr ForwardIterator1  // constexpr in C++201192    find_end(ForwardIterator1 first1, ForwardIterator1 last1,1193             ForwardIterator2 first2, ForwardIterator2 last2);1194 1195template <class ForwardIterator1, class ForwardIterator2, class BinaryPredicate>1196    constexpr ForwardIterator1  // constexpr in C++201197    find_end(ForwardIterator1 first1, ForwardIterator1 last1,1198             ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred);1199 1200template <class ForwardIterator1, class ForwardIterator2>1201    constexpr ForwardIterator1  // constexpr in C++201202    find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,1203                  ForwardIterator2 first2, ForwardIterator2 last2);1204 1205template <class ForwardIterator1, class ForwardIterator2, class BinaryPredicate>1206    constexpr ForwardIterator1  // constexpr in C++201207    find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,1208                  ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred);1209 1210template <class ForwardIterator>1211    constexpr ForwardIterator   // constexpr in C++201212    adjacent_find(ForwardIterator first, ForwardIterator last);1213 1214template <class ForwardIterator, class BinaryPredicate>1215    constexpr ForwardIterator   // constexpr in C++201216    adjacent_find(ForwardIterator first, ForwardIterator last, BinaryPredicate pred);1217 1218template <class InputIterator, class T>1219    constexpr typename iterator_traits<InputIterator>::difference_type  // constexpr in C++201220    count(InputIterator first, InputIterator last, const T& value);1221 1222template <class InputIterator, class Predicate>1223    constexpr typename iterator_traits<InputIterator>::difference_type // constexpr in C++201224    count_if(InputIterator first, InputIterator last, Predicate pred);1225 1226template <class InputIterator1, class InputIterator2>1227    constexpr pair<InputIterator1, InputIterator2>   // constexpr in C++201228    mismatch(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2);1229 1230template <class InputIterator1, class InputIterator2>1231    constexpr pair<InputIterator1, InputIterator2>   // constexpr in C++201232    mismatch(InputIterator1 first1, InputIterator1 last1,1233             InputIterator2 first2, InputIterator2 last2); // **C++14**1234 1235template <class InputIterator1, class InputIterator2, class BinaryPredicate>1236    constexpr pair<InputIterator1, InputIterator2>   // constexpr in C++201237    mismatch(InputIterator1 first1, InputIterator1 last1,1238             InputIterator2 first2, BinaryPredicate pred);1239 1240template <class InputIterator1, class InputIterator2, class BinaryPredicate>1241    constexpr pair<InputIterator1, InputIterator2>   // constexpr in C++201242    mismatch(InputIterator1 first1, InputIterator1 last1,1243             InputIterator2 first2, InputIterator2 last2,1244             BinaryPredicate pred); // **C++14**1245 1246template <class InputIterator1, class InputIterator2>1247    constexpr bool      // constexpr in C++201248    equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2);1249 1250template <class InputIterator1, class InputIterator2>1251    constexpr bool      // constexpr in C++201252    equal(InputIterator1 first1, InputIterator1 last1,1253          InputIterator2 first2, InputIterator2 last2); // **C++14**1254 1255template <class InputIterator1, class InputIterator2, class BinaryPredicate>1256    constexpr bool      // constexpr in C++201257    equal(InputIterator1 first1, InputIterator1 last1,1258          InputIterator2 first2, BinaryPredicate pred);1259 1260template <class InputIterator1, class InputIterator2, class BinaryPredicate>1261    constexpr bool      // constexpr in C++201262    equal(InputIterator1 first1, InputIterator1 last1,1263          InputIterator2 first2, InputIterator2 last2,1264          BinaryPredicate pred); // **C++14**1265 1266template<class ForwardIterator1, class ForwardIterator2>1267    constexpr bool      // constexpr in C++201268    is_permutation(ForwardIterator1 first1, ForwardIterator1 last1,1269                   ForwardIterator2 first2);1270 1271template<class ForwardIterator1, class ForwardIterator2>1272    constexpr bool      // constexpr in C++201273    is_permutation(ForwardIterator1 first1, ForwardIterator1 last1,1274                   ForwardIterator2 first2, ForwardIterator2 last2); // **C++14**1275 1276template<class ForwardIterator1, class ForwardIterator2, class BinaryPredicate>1277    constexpr bool      // constexpr in C++201278    is_permutation(ForwardIterator1 first1, ForwardIterator1 last1,1279                   ForwardIterator2 first2, BinaryPredicate pred);1280 1281template<class ForwardIterator1, class ForwardIterator2, class BinaryPredicate>1282    constexpr bool      // constexpr in C++201283    is_permutation(ForwardIterator1 first1, ForwardIterator1 last1,1284                   ForwardIterator2 first2, ForwardIterator2 last2,1285                   BinaryPredicate pred);  // **C++14**1286 1287template <class ForwardIterator1, class ForwardIterator2>1288    constexpr ForwardIterator1      // constexpr in C++201289    search(ForwardIterator1 first1, ForwardIterator1 last1,1290           ForwardIterator2 first2, ForwardIterator2 last2);1291 1292template <class ForwardIterator1, class ForwardIterator2, class BinaryPredicate>1293    constexpr ForwardIterator1      // constexpr in C++201294    search(ForwardIterator1 first1, ForwardIterator1 last1,1295           ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred);1296 1297template <class ForwardIterator, class Size, class T>1298    constexpr ForwardIterator       // constexpr in C++201299    search_n(ForwardIterator first, ForwardIterator last, Size count, const T& value);1300 1301template <class ForwardIterator, class Size, class T, class BinaryPredicate>1302    constexpr ForwardIterator       // constexpr in C++201303    search_n(ForwardIterator first, ForwardIterator last,1304             Size count, const T& value, BinaryPredicate pred);1305 1306template <class InputIterator, class OutputIterator>1307    constexpr OutputIterator      // constexpr in C++201308    copy(InputIterator first, InputIterator last, OutputIterator result);1309 1310template<class InputIterator, class OutputIterator, class Predicate>1311    constexpr OutputIterator      // constexpr in C++201312    copy_if(InputIterator first, InputIterator last,1313            OutputIterator result, Predicate pred);1314 1315template<class InputIterator, class Size, class OutputIterator>1316    constexpr OutputIterator      // constexpr in C++201317    copy_n(InputIterator first, Size n, OutputIterator result);1318 1319template <class BidirectionalIterator1, class BidirectionalIterator2>1320    constexpr BidirectionalIterator2      // constexpr in C++201321    copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last,1322                  BidirectionalIterator2 result);1323 1324// [alg.move], move1325template<class InputIterator, class OutputIterator>1326    constexpr OutputIterator move(InputIterator first, InputIterator last,1327                                OutputIterator result);1328 1329template<class BidirectionalIterator1, class BidirectionalIterator2>1330    constexpr BidirectionalIterator21331    move_backward(BidirectionalIterator1 first, BidirectionalIterator1 last,1332                  BidirectionalIterator2 result);1333 1334template <class ForwardIterator1, class ForwardIterator2>1335    constexpr ForwardIterator2    // constexpr in C++201336    swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2);1337 1338namespace ranges {1339    template<class I1, class I2>1340    using swap_ranges_result = in_in_result<I1, I2>;1341 1342template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2>1343        requires indirectly_swappable<I1, I2>1344    constexpr ranges::swap_ranges_result<I1, I2>1345        swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2);1346 1347template<input_range R1, input_range R2>1348        requires indirectly_swappable<iterator_t<R1>, iterator_t<R2>>1349    constexpr ranges::swap_ranges_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>>1350        swap_ranges(R1&& r1, R2&& r2);1351}1352 1353template <class ForwardIterator1, class ForwardIterator2>1354    constexpr void                // constexpr in C++201355    iter_swap(ForwardIterator1 a, ForwardIterator2 b);1356 1357template <class InputIterator, class OutputIterator, class UnaryOperation>1358    constexpr OutputIterator      // constexpr in C++201359    transform(InputIterator first, InputIterator last, OutputIterator result, UnaryOperation op);1360 1361template <class InputIterator1, class InputIterator2, class OutputIterator, class BinaryOperation>1362    constexpr OutputIterator      // constexpr in C++201363    transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2,1364              OutputIterator result, BinaryOperation binary_op);1365 1366template <class ForwardIterator, class T>1367    constexpr void      // constexpr in C++201368    replace(ForwardIterator first, ForwardIterator last, const T& old_value, const T& new_value);1369 1370template <class ForwardIterator, class Predicate, class T>1371    constexpr void      // constexpr in C++201372    replace_if(ForwardIterator first, ForwardIterator last, Predicate pred, const T& new_value);1373 1374template <class InputIterator, class OutputIterator, class T>1375    constexpr OutputIterator      // constexpr in C++201376    replace_copy(InputIterator first, InputIterator last, OutputIterator result,1377                 const T& old_value, const T& new_value);1378 1379template <class InputIterator, class OutputIterator, class Predicate, class T>1380    constexpr OutputIterator      // constexpr in C++201381    replace_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred, const T& new_value);1382 1383template <class ForwardIterator, class T>1384    constexpr void      // constexpr in C++201385    fill(ForwardIterator first, ForwardIterator last, const T& value);1386 1387template <class OutputIterator, class Size, class T>1388    constexpr OutputIterator      // constexpr in C++201389    fill_n(OutputIterator first, Size n, const T& value);1390 1391template <class ForwardIterator, class Generator>1392    constexpr void      // constexpr in C++201393    generate(ForwardIterator first, ForwardIterator last, Generator gen);1394 1395template <class OutputIterator, class Size, class Generator>1396    constexpr OutputIterator      // constexpr in C++201397    generate_n(OutputIterator first, Size n, Generator gen);1398 1399template <class ForwardIterator, class T>1400    constexpr ForwardIterator     // constexpr in C++201401    remove(ForwardIterator first, ForwardIterator last, const T& value);1402 1403template <class ForwardIterator, class Predicate>1404    constexpr ForwardIterator     // constexpr in C++201405    remove_if(ForwardIterator first, ForwardIterator last, Predicate pred);1406 1407template <class InputIterator, class OutputIterator, class T>1408    constexpr OutputIterator     // constexpr in C++201409    remove_copy(InputIterator first, InputIterator last, OutputIterator result, const T& value);1410 1411template <class InputIterator, class OutputIterator, class Predicate>1412    constexpr OutputIterator     // constexpr in C++201413    remove_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred);1414 1415template <class ForwardIterator>1416    constexpr ForwardIterator    // constexpr in C++201417    unique(ForwardIterator first, ForwardIterator last);1418 1419template <class ForwardIterator, class BinaryPredicate>1420    constexpr ForwardIterator    // constexpr in C++201421    unique(ForwardIterator first, ForwardIterator last, BinaryPredicate pred);1422 1423template <class InputIterator, class OutputIterator>1424    constexpr OutputIterator     // constexpr in C++201425    unique_copy(InputIterator first, InputIterator last, OutputIterator result);1426 1427template <class InputIterator, class OutputIterator, class BinaryPredicate>1428    constexpr OutputIterator     // constexpr in C++201429    unique_copy(InputIterator first, InputIterator last, OutputIterator result, BinaryPredicate pred);1430 1431template <class BidirectionalIterator>1432    constexpr void               // constexpr in C++201433    reverse(BidirectionalIterator first, BidirectionalIterator last);1434 1435template <class BidirectionalIterator, class OutputIterator>1436    constexpr OutputIterator       // constexpr in C++201437    reverse_copy(BidirectionalIterator first, BidirectionalIterator last, OutputIterator result);1438 1439template <class ForwardIterator>1440    constexpr ForwardIterator      // constexpr in C++201441    rotate(ForwardIterator first, ForwardIterator middle, ForwardIterator last);1442 1443template <class ForwardIterator, class OutputIterator>1444    constexpr OutputIterator       // constexpr in C++201445    rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last, OutputIterator result);1446 1447template <class RandomAccessIterator>1448    void1449    random_shuffle(RandomAccessIterator first, RandomAccessIterator last); // deprecated in C++14, removed in C++171450 1451template <class RandomAccessIterator, class RandomNumberGenerator>1452    void1453    random_shuffle(RandomAccessIterator first, RandomAccessIterator last,1454                   RandomNumberGenerator& rand);  // deprecated in C++14, removed in C++171455 1456template<class PopulationIterator, class SampleIterator,1457         class Distance, class UniformRandomBitGenerator>1458    SampleIterator sample(PopulationIterator first, PopulationIterator last,1459                          SampleIterator out, Distance n,1460                          UniformRandomBitGenerator&& g); // C++171461 1462template<class RandomAccessIterator, class UniformRandomNumberGenerator>1463    void shuffle(RandomAccessIterator first, RandomAccessIterator last,1464                 UniformRandomNumberGenerator&& g);1465 1466template<class ForwardIterator>1467  constexpr ForwardIterator1468    shift_left(ForwardIterator first, ForwardIterator last,1469               typename iterator_traits<ForwardIterator>::difference_type n); // C++201470 1471template<class ForwardIterator>1472  constexpr ForwardIterator1473    shift_right(ForwardIterator first, ForwardIterator last,1474                typename iterator_traits<ForwardIterator>::difference_type n); // C++201475 1476template <class InputIterator, class Predicate>1477    constexpr bool  // constexpr in C++201478    is_partitioned(InputIterator first, InputIterator last, Predicate pred);1479 1480template <class ForwardIterator, class Predicate>1481    constexpr ForwardIterator  // constexpr in C++201482    partition(ForwardIterator first, ForwardIterator last, Predicate pred);1483 1484template <class InputIterator, class OutputIterator1,1485          class OutputIterator2, class Predicate>1486    constexpr pair<OutputIterator1, OutputIterator2>   // constexpr in C++201487    partition_copy(InputIterator first, InputIterator last,1488                   OutputIterator1 out_true, OutputIterator2 out_false,1489                   Predicate pred);1490 1491template <class ForwardIterator, class Predicate>1492    ForwardIterator1493    stable_partition(ForwardIterator first, ForwardIterator last, Predicate pred);1494 1495template<class ForwardIterator, class Predicate>1496    constexpr ForwardIterator  // constexpr in C++201497    partition_point(ForwardIterator first, ForwardIterator last, Predicate pred);1498 1499template <class ForwardIterator>1500    constexpr bool  // constexpr in C++201501    is_sorted(ForwardIterator first, ForwardIterator last);1502 1503template <class ForwardIterator, class Compare>1504    constexpr bool  // constexpr in C++201505    is_sorted(ForwardIterator first, ForwardIterator last, Compare comp);1506 1507template<class ForwardIterator>1508    constexpr ForwardIterator    // constexpr in C++201509    is_sorted_until(ForwardIterator first, ForwardIterator last);1510 1511template <class ForwardIterator, class Compare>1512    constexpr ForwardIterator    // constexpr in C++201513    is_sorted_until(ForwardIterator first, ForwardIterator last, Compare comp);1514 1515template <class RandomAccessIterator>1516    constexpr void               // constexpr in C++201517    sort(RandomAccessIterator first, RandomAccessIterator last);1518 1519template <class RandomAccessIterator, class Compare>1520    constexpr void               // constexpr in C++201521    sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp);1522 1523template <class RandomAccessIterator>1524    void1525    stable_sort(RandomAccessIterator first, RandomAccessIterator last);1526 1527template <class RandomAccessIterator, class Compare>1528    void1529    stable_sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp);1530 1531template <class RandomAccessIterator>1532    constexpr void                    // constexpr in C++201533    partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last);1534 1535template <class RandomAccessIterator, class Compare>1536    constexpr void                    // constexpr in C++201537    partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last, Compare comp);1538 1539template <class InputIterator, class RandomAccessIterator>1540    constexpr RandomAccessIterator    // constexpr in C++201541    partial_sort_copy(InputIterator first, InputIterator last,1542                      RandomAccessIterator result_first, RandomAccessIterator result_last);1543 1544template <class InputIterator, class RandomAccessIterator, class Compare>1545    constexpr RandomAccessIterator    // constexpr in C++201546    partial_sort_copy(InputIterator first, InputIterator last,1547                      RandomAccessIterator result_first, RandomAccessIterator result_last, Compare comp);1548 1549template <class RandomAccessIterator>1550    constexpr void                    // constexpr in C++201551    nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last);1552 1553template <class RandomAccessIterator, class Compare>1554    constexpr void                    // constexpr in C++201555    nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last, Compare comp);1556 1557template <class ForwardIterator, class T>1558    constexpr ForwardIterator                         // constexpr in C++201559    lower_bound(ForwardIterator first, ForwardIterator last, const T& value);1560 1561template <class ForwardIterator, class T, class Compare>1562    constexpr ForwardIterator                         // constexpr in C++201563    lower_bound(ForwardIterator first, ForwardIterator last, const T& value, Compare comp);1564 1565template <class ForwardIterator, class T>1566    constexpr ForwardIterator                         // constexpr in C++201567    upper_bound(ForwardIterator first, ForwardIterator last, const T& value);1568 1569template <class ForwardIterator, class T, class Compare>1570    constexpr ForwardIterator                         // constexpr in C++201571    upper_bound(ForwardIterator first, ForwardIterator last, const T& value, Compare comp);1572 1573template <class ForwardIterator, class T>1574    constexpr pair<ForwardIterator, ForwardIterator>  // constexpr in C++201575    equal_range(ForwardIterator first, ForwardIterator last, const T& value);1576 1577template <class ForwardIterator, class T, class Compare>1578    constexpr pair<ForwardIterator, ForwardIterator>  // constexpr in C++201579    equal_range(ForwardIterator first, ForwardIterator last, const T& value, Compare comp);1580 1581template <class ForwardIterator, class T>1582    constexpr bool                                    // constexpr in C++201583    binary_search(ForwardIterator first, ForwardIterator last, const T& value);1584 1585template <class ForwardIterator, class T, class Compare>1586    constexpr bool                                    // constexpr in C++201587    binary_search(ForwardIterator first, ForwardIterator last, const T& value, Compare comp);1588 1589template <class InputIterator1, class InputIterator2, class OutputIterator>1590    constexpr OutputIterator                          // constexpr in C++201591    merge(InputIterator1 first1, InputIterator1 last1,1592          InputIterator2 first2, InputIterator2 last2, OutputIterator result);1593 1594template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare>1595    constexpr OutputIterator                          // constexpr in C++201596    merge(InputIterator1 first1, InputIterator1 last1,1597          InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp);1598 1599template <class BidirectionalIterator>1600    void1601    inplace_merge(BidirectionalIterator first, BidirectionalIterator middle, BidirectionalIterator last);1602 1603template <class BidirectionalIterator, class Compare>1604    void1605    inplace_merge(BidirectionalIterator first, BidirectionalIterator middle, BidirectionalIterator last, Compare comp);1606 1607template <class InputIterator1, class InputIterator2>1608    constexpr bool                                    // constexpr in C++201609    includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2);1610 1611template <class InputIterator1, class InputIterator2, class Compare>1612    constexpr bool                                    // constexpr in C++201613    includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, Compare comp);1614 1615template <class InputIterator1, class InputIterator2, class OutputIterator>1616    constexpr OutputIterator                          // constexpr in C++201617    set_union(InputIterator1 first1, InputIterator1 last1,1618              InputIterator2 first2, InputIterator2 last2, OutputIterator result);1619 1620template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare>1621    constexpr OutputIterator                          // constexpr in C++201622    set_union(InputIterator1 first1, InputIterator1 last1,1623              InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp);1624 1625template <class InputIterator1, class InputIterator2, class OutputIterator>1626    constexpr OutputIterator                         // constexpr in C++201627    set_intersection(InputIterator1 first1, InputIterator1 last1,1628                     InputIterator2 first2, InputIterator2 last2, OutputIterator result);1629 1630template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare>1631    constexpr OutputIterator                         // constexpr in C++201632    set_intersection(InputIterator1 first1, InputIterator1 last1,1633                     InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp);1634 1635template <class InputIterator1, class InputIterator2, class OutputIterator>1636    constexpr OutputIterator                         // constexpr in C++201637    set_difference(InputIterator1 first1, InputIterator1 last1,1638                   InputIterator2 first2, InputIterator2 last2, OutputIterator result);1639 1640template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare>1641    constexpr OutputIterator                         // constexpr in C++201642    set_difference(InputIterator1 first1, InputIterator1 last1,1643                   InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp);1644 1645template <class InputIterator1, class InputIterator2, class OutputIterator>1646    constexpr OutputIterator                         // constexpr in C++201647    set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,1648                             InputIterator2 first2, InputIterator2 last2, OutputIterator result);1649 1650template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare>1651    constexpr OutputIterator                         // constexpr in C++201652    set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,1653                             InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp);1654 1655template <class RandomAccessIterator>1656    constexpr void                                   // constexpr in C++201657    push_heap(RandomAccessIterator first, RandomAccessIterator last);1658 1659template <class RandomAccessIterator, class Compare>1660    constexpr void                                   // constexpr in C++201661    push_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp);1662 1663template <class RandomAccessIterator>1664    constexpr void                                   // constexpr in C++201665    pop_heap(RandomAccessIterator first, RandomAccessIterator last);1666 1667template <class RandomAccessIterator, class Compare>1668    constexpr void                                   // constexpr in C++201669    pop_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp);1670 1671template <class RandomAccessIterator>1672    constexpr void                                   // constexpr in C++201673    make_heap(RandomAccessIterator first, RandomAccessIterator last);1674 1675template <class RandomAccessIterator, class Compare>1676    constexpr void                                   // constexpr in C++201677    make_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp);1678 1679template <class RandomAccessIterator>1680    constexpr void                                   // constexpr in C++201681    sort_heap(RandomAccessIterator first, RandomAccessIterator last);1682 1683template <class RandomAccessIterator, class Compare>1684    constexpr void                                   // constexpr in C++201685    sort_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp);1686 1687template <class RandomAccessIterator>1688    constexpr bool   // constexpr in C++201689    is_heap(RandomAccessIterator first, RandomAccessiterator last);1690 1691template <class RandomAccessIterator, class Compare>1692    constexpr bool   // constexpr in C++201693    is_heap(RandomAccessIterator first, RandomAccessiterator last, Compare comp);1694 1695template <class RandomAccessIterator>1696    constexpr RandomAccessIterator   // constexpr in C++201697    is_heap_until(RandomAccessIterator first, RandomAccessiterator last);1698 1699template <class RandomAccessIterator, class Compare>1700    constexpr RandomAccessIterator   // constexpr in C++201701    is_heap_until(RandomAccessIterator first, RandomAccessiterator last, Compare comp);1702 1703template <class ForwardIterator>1704    constexpr ForwardIterator        // constexpr in C++141705    min_element(ForwardIterator first, ForwardIterator last);1706 1707template <class ForwardIterator, class Compare>1708    constexpr ForwardIterator        // constexpr in C++141709    min_element(ForwardIterator first, ForwardIterator last, Compare comp);1710 1711template <class T>1712    constexpr const T&               // constexpr in C++141713    min(const T& a, const T& b);1714 1715template <class T, class Compare>1716    constexpr const T&               // constexpr in C++141717    min(const T& a, const T& b, Compare comp);1718 1719template<class T>1720    constexpr T                      // constexpr in C++141721    min(initializer_list<T> t);1722 1723template<class T, class Compare>1724    constexpr T                      // constexpr in C++141725    min(initializer_list<T> t, Compare comp);1726 1727template<class T>1728    constexpr const T& clamp(const T& v, const T& lo, const T& hi);               // C++171729 1730template<class T, class Compare>1731    constexpr const T& clamp(const T& v, const T& lo, const T& hi, Compare comp); // C++171732 1733template <class ForwardIterator>1734    constexpr ForwardIterator        // constexpr in C++141735    max_element(ForwardIterator first, ForwardIterator last);1736 1737template <class ForwardIterator, class Compare>1738    constexpr ForwardIterator        // constexpr in C++141739    max_element(ForwardIterator first, ForwardIterator last, Compare comp);1740 1741template <class T>1742    constexpr const T&               // constexpr in C++141743    max(const T& a, const T& b);1744 1745template <class T, class Compare>1746    constexpr const T&               // constexpr in C++141747    max(const T& a, const T& b, Compare comp);1748 1749template<class T>1750    constexpr T                      // constexpr in C++141751    max(initializer_list<T> t);1752 1753template<class T, class Compare>1754    constexpr T                      // constexpr in C++141755    max(initializer_list<T> t, Compare comp);1756 1757template<class ForwardIterator>1758    constexpr pair<ForwardIterator, ForwardIterator>  // constexpr in C++141759    minmax_element(ForwardIterator first, ForwardIterator last);1760 1761template<class ForwardIterator, class Compare>1762    constexpr pair<ForwardIterator, ForwardIterator>  // constexpr in C++141763    minmax_element(ForwardIterator first, ForwardIterator last, Compare comp);1764 1765template<class T>1766    constexpr pair<const T&, const T&>  // constexpr in C++141767    minmax(const T& a, const T& b);1768 1769template<class T, class Compare>1770    constexpr pair<const T&, const T&>  // constexpr in C++141771    minmax(const T& a, const T& b, Compare comp);1772 1773template<class T>1774    constexpr pair<T, T>                // constexpr in C++141775    minmax(initializer_list<T> t);1776 1777template<class T, class Compare>1778    constexpr pair<T, T>                // constexpr in C++141779    minmax(initializer_list<T> t, Compare comp);1780 1781template <class InputIterator1, class InputIterator2>1782    constexpr bool     // constexpr in C++201783    lexicographical_compare(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2);1784 1785template <class InputIterator1, class InputIterator2, class Compare>1786    constexpr bool     // constexpr in C++201787    lexicographical_compare(InputIterator1 first1, InputIterator1 last1,1788                            InputIterator2 first2, InputIterator2 last2, Compare comp);1789 1790template<class InputIterator1, class InputIterator2, class Cmp>1791    constexpr auto1792    lexicographical_compare_three_way(InputIterator1 first1, InputIterator1 last1,1793                                      InputIterator2 first2, InputIterator2 last2,1794                                      Cmp comp)1795      -> decltype(comp(*b1, *b2));                                                        // since C++201796 1797template<class InputIterator1, class InputIterator2>1798    constexpr auto1799    lexicographical_compare_three_way(InputIterator1 first1, InputIterator1 last1,1800                                      InputIterator2 first2, InputIterator2 last2);      // since C++201801 1802template <class BidirectionalIterator>1803    constexpr bool     // constexpr in C++201804    next_permutation(BidirectionalIterator first, BidirectionalIterator last);1805 1806template <class BidirectionalIterator, class Compare>1807    constexpr bool     // constexpr in C++201808    next_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp);1809 1810template <class BidirectionalIterator>1811    constexpr bool     // constexpr in C++201812    prev_permutation(BidirectionalIterator first, BidirectionalIterator last);1813 1814template <class BidirectionalIterator, class Compare>1815    constexpr bool     // constexpr in C++201816    prev_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp);1817}  // std1818 1819*/1820 1821#include <__cxx03/__config>1822 1823#include <__cxx03/__algorithm/adjacent_find.h>1824#include <__cxx03/__algorithm/all_of.h>1825#include <__cxx03/__algorithm/any_of.h>1826#include <__cxx03/__algorithm/binary_search.h>1827#include <__cxx03/__algorithm/copy.h>1828#include <__cxx03/__algorithm/copy_backward.h>1829#include <__cxx03/__algorithm/copy_if.h>1830#include <__cxx03/__algorithm/copy_n.h>1831#include <__cxx03/__algorithm/count.h>1832#include <__cxx03/__algorithm/count_if.h>1833#include <__cxx03/__algorithm/equal.h>1834#include <__cxx03/__algorithm/equal_range.h>1835#include <__cxx03/__algorithm/fill.h>1836#include <__cxx03/__algorithm/fill_n.h>1837#include <__cxx03/__algorithm/find.h>1838#include <__cxx03/__algorithm/find_end.h>1839#include <__cxx03/__algorithm/find_first_of.h>1840#include <__cxx03/__algorithm/find_if.h>1841#include <__cxx03/__algorithm/find_if_not.h>1842#include <__cxx03/__algorithm/for_each.h>1843#include <__cxx03/__algorithm/generate.h>1844#include <__cxx03/__algorithm/generate_n.h>1845#include <__cxx03/__algorithm/includes.h>1846#include <__cxx03/__algorithm/inplace_merge.h>1847#include <__cxx03/__algorithm/is_heap.h>1848#include <__cxx03/__algorithm/is_heap_until.h>1849#include <__cxx03/__algorithm/is_partitioned.h>1850#include <__cxx03/__algorithm/is_permutation.h>1851#include <__cxx03/__algorithm/is_sorted.h>1852#include <__cxx03/__algorithm/is_sorted_until.h>1853#include <__cxx03/__algorithm/iter_swap.h>1854#include <__cxx03/__algorithm/lexicographical_compare.h>1855#include <__cxx03/__algorithm/lower_bound.h>1856#include <__cxx03/__algorithm/make_heap.h>1857#include <__cxx03/__algorithm/max.h>1858#include <__cxx03/__algorithm/max_element.h>1859#include <__cxx03/__algorithm/merge.h>1860#include <__cxx03/__algorithm/min.h>1861#include <__cxx03/__algorithm/min_element.h>1862#include <__cxx03/__algorithm/minmax.h>1863#include <__cxx03/__algorithm/minmax_element.h>1864#include <__cxx03/__algorithm/mismatch.h>1865#include <__cxx03/__algorithm/move.h>1866#include <__cxx03/__algorithm/move_backward.h>1867#include <__cxx03/__algorithm/next_permutation.h>1868#include <__cxx03/__algorithm/none_of.h>1869#include <__cxx03/__algorithm/nth_element.h>1870#include <__cxx03/__algorithm/partial_sort.h>1871#include <__cxx03/__algorithm/partial_sort_copy.h>1872#include <__cxx03/__algorithm/partition.h>1873#include <__cxx03/__algorithm/partition_copy.h>1874#include <__cxx03/__algorithm/partition_point.h>1875#include <__cxx03/__algorithm/pop_heap.h>1876#include <__cxx03/__algorithm/prev_permutation.h>1877#include <__cxx03/__algorithm/push_heap.h>1878#include <__cxx03/__algorithm/remove.h>1879#include <__cxx03/__algorithm/remove_copy.h>1880#include <__cxx03/__algorithm/remove_copy_if.h>1881#include <__cxx03/__algorithm/remove_if.h>1882#include <__cxx03/__algorithm/replace.h>1883#include <__cxx03/__algorithm/replace_copy.h>1884#include <__cxx03/__algorithm/replace_copy_if.h>1885#include <__cxx03/__algorithm/replace_if.h>1886#include <__cxx03/__algorithm/reverse.h>1887#include <__cxx03/__algorithm/reverse_copy.h>1888#include <__cxx03/__algorithm/rotate.h>1889#include <__cxx03/__algorithm/rotate_copy.h>1890#include <__cxx03/__algorithm/search.h>1891#include <__cxx03/__algorithm/search_n.h>1892#include <__cxx03/__algorithm/set_difference.h>1893#include <__cxx03/__algorithm/set_intersection.h>1894#include <__cxx03/__algorithm/set_symmetric_difference.h>1895#include <__cxx03/__algorithm/set_union.h>1896#include <__cxx03/__algorithm/shuffle.h>1897#include <__cxx03/__algorithm/sort.h>1898#include <__cxx03/__algorithm/sort_heap.h>1899#include <__cxx03/__algorithm/stable_partition.h>1900#include <__cxx03/__algorithm/stable_sort.h>1901#include <__cxx03/__algorithm/swap_ranges.h>1902#include <__cxx03/__algorithm/transform.h>1903#include <__cxx03/__algorithm/unique.h>1904#include <__cxx03/__algorithm/unique_copy.h>1905#include <__cxx03/__algorithm/upper_bound.h>1906 1907#include <__cxx03/version>1908 1909#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)1910#  pragma GCC system_header1911#endif1912 1913#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES)1914#  include <__cxx03/atomic>1915#  include <__cxx03/cstdlib>1916#  include <__cxx03/cstring>1917#  include <__cxx03/iterator>1918#  include <__cxx03/memory>1919#  include <__cxx03/stdexcept>1920#  include <__cxx03/type_traits>1921#  include <__cxx03/utility>1922#endif1923 1924#endif // _LIBCPP___CXX03_ALGORITHM1925