Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 1 | // -*- C++ -*- |
Louis Dionne | eb8650a | 2021-11-17 21:25:01 | [diff] [blame] | 2 | //===----------------------------------------------------------------------===// |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 3 | // |
Chandler Carruth | 57b08b0 | 2019-01-19 10:56:40 | [diff] [blame] | 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 5 | // See https://llvm.org/LICENSE.txt for license information. |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef _LIBCPP_ALGORITHM |
| 11 | #define _LIBCPP_ALGORITHM |
| 12 | |
| 13 | /* |
| 14 | algorithm synopsis |
| 15 | |
| 16 | #include <initializer_list> |
| 17 | |
| 18 | namespace std |
| 19 | { |
| 20 | |
Nikolas Klauser | d3729bb | 2022-01-14 01:55:51 | [diff] [blame] | 21 | namespace ranges { |
| 22 | template <class I1, class I2> |
Nikolas Klauser | f3514af | 2022-01-25 10:21:47 | [diff] [blame] | 23 | struct in_in_result; // since C++20 |
| 24 | |
| 25 | template <class I1, class I2, class O> |
| 26 | struct in_in_out_result; // since C++20 |
Nikolas Klauser | 610979b | 2022-02-03 01:17:03 | [diff] [blame^] | 27 | |
| 28 | template <class I, class O1, class O2> |
| 29 | struct in_out_out_result; // since C++20 |
Nikolas Klauser | d3729bb | 2022-01-14 01:55:51 | [diff] [blame] | 30 | } |
| 31 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 32 | template <class InputIterator, class Predicate> |
Marshall Clow | 706ffef | 2018-01-15 17:20:36 | [diff] [blame] | 33 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 34 | all_of(InputIterator first, InputIterator last, Predicate pred); |
| 35 | |
| 36 | template <class InputIterator, class Predicate> |
Marshall Clow | 706ffef | 2018-01-15 17:20:36 | [diff] [blame] | 37 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 38 | any_of(InputIterator first, InputIterator last, Predicate pred); |
| 39 | |
| 40 | template <class InputIterator, class Predicate> |
Marshall Clow | 706ffef | 2018-01-15 17:20:36 | [diff] [blame] | 41 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 42 | none_of(InputIterator first, InputIterator last, Predicate pred); |
| 43 | |
| 44 | template <class InputIterator, class Function> |
Marshall Clow | 1b9a4ff | 2018-01-22 20:44:33 | [diff] [blame] | 45 | constexpr Function // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 46 | for_each(InputIterator first, InputIterator last, Function f); |
| 47 | |
Marshall Clow | d5c65ff | 2017-05-25 02:29:54 | [diff] [blame] | 48 | template<class InputIterator, class Size, class Function> |
Marshall Clow | 1b9a4ff | 2018-01-22 20:44:33 | [diff] [blame] | 49 | constexpr InputIterator // constexpr in C++20 |
| 50 | for_each_n(InputIterator first, Size n, Function f); // C++17 |
Marshall Clow | d5c65ff | 2017-05-25 02:29:54 | [diff] [blame] | 51 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 52 | template <class InputIterator, class T> |
Marshall Clow | 8694428 | 2018-01-15 19:26:05 | [diff] [blame] | 53 | constexpr InputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 54 | find(InputIterator first, InputIterator last, const T& value); |
| 55 | |
| 56 | template <class InputIterator, class Predicate> |
Marshall Clow | 8694428 | 2018-01-15 19:26:05 | [diff] [blame] | 57 | constexpr InputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 58 | find_if(InputIterator first, InputIterator last, Predicate pred); |
| 59 | |
| 60 | template<class InputIterator, class Predicate> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 61 | constexpr InputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 62 | find_if_not(InputIterator first, InputIterator last, Predicate pred); |
| 63 | |
| 64 | template <class ForwardIterator1, class ForwardIterator2> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 65 | constexpr ForwardIterator1 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 66 | find_end(ForwardIterator1 first1, ForwardIterator1 last1, |
| 67 | ForwardIterator2 first2, ForwardIterator2 last2); |
| 68 | |
| 69 | template <class ForwardIterator1, class ForwardIterator2, class BinaryPredicate> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 70 | constexpr ForwardIterator1 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 71 | find_end(ForwardIterator1 first1, ForwardIterator1 last1, |
| 72 | ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); |
| 73 | |
| 74 | template <class ForwardIterator1, class ForwardIterator2> |
Marshall Clow | 8694428 | 2018-01-15 19:26:05 | [diff] [blame] | 75 | constexpr ForwardIterator1 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 76 | find_first_of(ForwardIterator1 first1, ForwardIterator1 last1, |
| 77 | ForwardIterator2 first2, ForwardIterator2 last2); |
| 78 | |
| 79 | template <class ForwardIterator1, class ForwardIterator2, class BinaryPredicate> |
Marshall Clow | 8694428 | 2018-01-15 19:26:05 | [diff] [blame] | 80 | constexpr ForwardIterator1 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 81 | find_first_of(ForwardIterator1 first1, ForwardIterator1 last1, |
| 82 | ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); |
| 83 | |
| 84 | template <class ForwardIterator> |
Marshall Clow | 8694428 | 2018-01-15 19:26:05 | [diff] [blame] | 85 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 86 | adjacent_find(ForwardIterator first, ForwardIterator last); |
| 87 | |
| 88 | template <class ForwardIterator, class BinaryPredicate> |
Marshall Clow | 8694428 | 2018-01-15 19:26:05 | [diff] [blame] | 89 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 90 | adjacent_find(ForwardIterator first, ForwardIterator last, BinaryPredicate pred); |
| 91 | |
| 92 | template <class InputIterator, class T> |
Marshall Clow | 056f15e | 2018-01-15 19:40:34 | [diff] [blame] | 93 | constexpr typename iterator_traits<InputIterator>::difference_type // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 94 | count(InputIterator first, InputIterator last, const T& value); |
| 95 | |
| 96 | template <class InputIterator, class Predicate> |
Marshall Clow | 056f15e | 2018-01-15 19:40:34 | [diff] [blame] | 97 | constexpr typename iterator_traits<InputIterator>::difference_type // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 98 | count_if(InputIterator first, InputIterator last, Predicate pred); |
| 99 | |
| 100 | template <class InputIterator1, class InputIterator2> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 101 | constexpr pair<InputIterator1, InputIterator2> // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 102 | mismatch(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2); |
| 103 | |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 104 | template <class InputIterator1, class InputIterator2> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 105 | constexpr pair<InputIterator1, InputIterator2> // constexpr in C++20 |
Aditya Kumar | 331fb80 | 2016-08-25 11:52:38 | [diff] [blame] | 106 | mismatch(InputIterator1 first1, InputIterator1 last1, |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 107 | InputIterator2 first2, InputIterator2 last2); // **C++14** |
| 108 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 109 | template <class InputIterator1, class InputIterator2, class BinaryPredicate> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 110 | constexpr pair<InputIterator1, InputIterator2> // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 111 | mismatch(InputIterator1 first1, InputIterator1 last1, |
| 112 | InputIterator2 first2, BinaryPredicate pred); |
| 113 | |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 114 | template <class InputIterator1, class InputIterator2, class BinaryPredicate> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 115 | constexpr pair<InputIterator1, InputIterator2> // constexpr in C++20 |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 116 | mismatch(InputIterator1 first1, InputIterator1 last1, |
| 117 | InputIterator2 first2, InputIterator2 last2, |
| 118 | BinaryPredicate pred); // **C++14** |
| 119 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 120 | template <class InputIterator1, class InputIterator2> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 121 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 122 | equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2); |
| 123 | |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 124 | template <class InputIterator1, class InputIterator2> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 125 | constexpr bool // constexpr in C++20 |
Aditya Kumar | 331fb80 | 2016-08-25 11:52:38 | [diff] [blame] | 126 | equal(InputIterator1 first1, InputIterator1 last1, |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 127 | InputIterator2 first2, InputIterator2 last2); // **C++14** |
| 128 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 129 | template <class InputIterator1, class InputIterator2, class BinaryPredicate> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 130 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 131 | equal(InputIterator1 first1, InputIterator1 last1, |
| 132 | InputIterator2 first2, BinaryPredicate pred); |
| 133 | |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 134 | template <class InputIterator1, class InputIterator2, class BinaryPredicate> |
Marshall Clow | 6538e28d | 2018-01-16 02:04:10 | [diff] [blame] | 135 | constexpr bool // constexpr in C++20 |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 136 | equal(InputIterator1 first1, InputIterator1 last1, |
| 137 | InputIterator2 first2, InputIterator2 last2, |
| 138 | BinaryPredicate pred); // **C++14** |
| 139 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 140 | template<class ForwardIterator1, class ForwardIterator2> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 141 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 142 | is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, |
| 143 | ForwardIterator2 first2); |
| 144 | |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 145 | template<class ForwardIterator1, class ForwardIterator2> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 146 | constexpr bool // constexpr in C++20 |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 147 | is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, |
| 148 | ForwardIterator2 first2, ForwardIterator2 last2); // **C++14** |
| 149 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 150 | template<class ForwardIterator1, class ForwardIterator2, class BinaryPredicate> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 151 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 152 | is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, |
| 153 | ForwardIterator2 first2, BinaryPredicate pred); |
| 154 | |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 155 | template<class ForwardIterator1, class ForwardIterator2, class BinaryPredicate> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 156 | constexpr bool // constexpr in C++20 |
Marshall Clow | 0b0bbd2 | 2013-05-09 21:14:23 | [diff] [blame] | 157 | is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, |
| 158 | ForwardIterator2 first2, ForwardIterator2 last2, |
| 159 | BinaryPredicate pred); // **C++14** |
| 160 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 161 | template <class ForwardIterator1, class ForwardIterator2> |
Marshall Clow | 12f0a77 | 2018-01-16 15:48:27 | [diff] [blame] | 162 | constexpr ForwardIterator1 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 163 | search(ForwardIterator1 first1, ForwardIterator1 last1, |
| 164 | ForwardIterator2 first2, ForwardIterator2 last2); |
| 165 | |
| 166 | template <class ForwardIterator1, class ForwardIterator2, class BinaryPredicate> |
Marshall Clow | 12f0a77 | 2018-01-16 15:48:27 | [diff] [blame] | 167 | constexpr ForwardIterator1 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 168 | search(ForwardIterator1 first1, ForwardIterator1 last1, |
| 169 | ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); |
| 170 | |
| 171 | template <class ForwardIterator, class Size, class T> |
Marshall Clow | 12f0a77 | 2018-01-16 15:48:27 | [diff] [blame] | 172 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 173 | search_n(ForwardIterator first, ForwardIterator last, Size count, const T& value); |
| 174 | |
| 175 | template <class ForwardIterator, class Size, class T, class BinaryPredicate> |
Marshall Clow | 12f0a77 | 2018-01-16 15:48:27 | [diff] [blame] | 176 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 177 | search_n(ForwardIterator first, ForwardIterator last, |
| 178 | Size count, const T& value, BinaryPredicate pred); |
| 179 | |
| 180 | template <class InputIterator, class OutputIterator> |
Louis Dionne | 13c90a5 | 2019-11-06 12:02:41 | [diff] [blame] | 181 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 182 | copy(InputIterator first, InputIterator last, OutputIterator result); |
| 183 | |
| 184 | template<class InputIterator, class OutputIterator, class Predicate> |
Louis Dionne | 13c90a5 | 2019-11-06 12:02:41 | [diff] [blame] | 185 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 186 | copy_if(InputIterator first, InputIterator last, |
| 187 | OutputIterator result, Predicate pred); |
| 188 | |
| 189 | template<class InputIterator, class Size, class OutputIterator> |
Louis Dionne | 13c90a5 | 2019-11-06 12:02:41 | [diff] [blame] | 190 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 191 | copy_n(InputIterator first, Size n, OutputIterator result); |
| 192 | |
| 193 | template <class BidirectionalIterator1, class BidirectionalIterator2> |
Louis Dionne | 13c90a5 | 2019-11-06 12:02:41 | [diff] [blame] | 194 | constexpr BidirectionalIterator2 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 195 | copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last, |
| 196 | BidirectionalIterator2 result); |
| 197 | |
| 198 | template <class ForwardIterator1, class ForwardIterator2> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 199 | constexpr ForwardIterator2 // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 200 | swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2); |
| 201 | |
| 202 | template <class ForwardIterator1, class ForwardIterator2> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 203 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 204 | iter_swap(ForwardIterator1 a, ForwardIterator2 b); |
| 205 | |
| 206 | template <class InputIterator, class OutputIterator, class UnaryOperation> |
Marshall Clow | 99894b6 | 2018-01-19 17:45:39 | [diff] [blame] | 207 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 208 | transform(InputIterator first, InputIterator last, OutputIterator result, UnaryOperation op); |
| 209 | |
| 210 | template <class InputIterator1, class InputIterator2, class OutputIterator, class BinaryOperation> |
Marshall Clow | 99894b6 | 2018-01-19 17:45:39 | [diff] [blame] | 211 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 212 | transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, |
| 213 | OutputIterator result, BinaryOperation binary_op); |
| 214 | |
| 215 | template <class ForwardIterator, class T> |
Marshall Clow | 12c7423 | 2018-01-19 18:07:29 | [diff] [blame] | 216 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 217 | replace(ForwardIterator first, ForwardIterator last, const T& old_value, const T& new_value); |
| 218 | |
| 219 | template <class ForwardIterator, class Predicate, class T> |
Marshall Clow | 12c7423 | 2018-01-19 18:07:29 | [diff] [blame] | 220 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 221 | replace_if(ForwardIterator first, ForwardIterator last, Predicate pred, const T& new_value); |
| 222 | |
| 223 | template <class InputIterator, class OutputIterator, class T> |
Marshall Clow | 12c7423 | 2018-01-19 18:07:29 | [diff] [blame] | 224 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 225 | replace_copy(InputIterator first, InputIterator last, OutputIterator result, |
| 226 | const T& old_value, const T& new_value); |
| 227 | |
| 228 | template <class InputIterator, class OutputIterator, class Predicate, class T> |
Marshall Clow | 12c7423 | 2018-01-19 18:07:29 | [diff] [blame] | 229 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 230 | replace_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred, const T& new_value); |
| 231 | |
| 232 | template <class ForwardIterator, class T> |
Marshall Clow | 4bfb931 | 2018-01-20 20:14:32 | [diff] [blame] | 233 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 234 | fill(ForwardIterator first, ForwardIterator last, const T& value); |
| 235 | |
| 236 | template <class OutputIterator, class Size, class T> |
Marshall Clow | 4bfb931 | 2018-01-20 20:14:32 | [diff] [blame] | 237 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 238 | fill_n(OutputIterator first, Size n, const T& value); |
| 239 | |
| 240 | template <class ForwardIterator, class Generator> |
Marshall Clow | 4bfb931 | 2018-01-20 20:14:32 | [diff] [blame] | 241 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 242 | generate(ForwardIterator first, ForwardIterator last, Generator gen); |
| 243 | |
| 244 | template <class OutputIterator, class Size, class Generator> |
Marshall Clow | 4bfb931 | 2018-01-20 20:14:32 | [diff] [blame] | 245 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 246 | generate_n(OutputIterator first, Size n, Generator gen); |
| 247 | |
| 248 | template <class ForwardIterator, class T> |
Marshall Clow | e8ea829 | 2018-01-22 21:43:04 | [diff] [blame] | 249 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 250 | remove(ForwardIterator first, ForwardIterator last, const T& value); |
| 251 | |
| 252 | template <class ForwardIterator, class Predicate> |
Marshall Clow | e8ea829 | 2018-01-22 21:43:04 | [diff] [blame] | 253 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 254 | remove_if(ForwardIterator first, ForwardIterator last, Predicate pred); |
| 255 | |
| 256 | template <class InputIterator, class OutputIterator, class T> |
Marshall Clow | e8ea829 | 2018-01-22 21:43:04 | [diff] [blame] | 257 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 258 | remove_copy(InputIterator first, InputIterator last, OutputIterator result, const T& value); |
| 259 | |
| 260 | template <class InputIterator, class OutputIterator, class Predicate> |
Marshall Clow | e8ea829 | 2018-01-22 21:43:04 | [diff] [blame] | 261 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 262 | remove_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred); |
| 263 | |
| 264 | template <class ForwardIterator> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 265 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 266 | unique(ForwardIterator first, ForwardIterator last); |
| 267 | |
| 268 | template <class ForwardIterator, class BinaryPredicate> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 269 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 270 | unique(ForwardIterator first, ForwardIterator last, BinaryPredicate pred); |
| 271 | |
| 272 | template <class InputIterator, class OutputIterator> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 273 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 274 | unique_copy(InputIterator first, InputIterator last, OutputIterator result); |
| 275 | |
| 276 | template <class InputIterator, class OutputIterator, class BinaryPredicate> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 277 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 278 | unique_copy(InputIterator first, InputIterator last, OutputIterator result, BinaryPredicate pred); |
| 279 | |
| 280 | template <class BidirectionalIterator> |
Arthur O'Dwyer | f851db3 | 2020-12-17 05:01:08 | [diff] [blame] | 281 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 282 | reverse(BidirectionalIterator first, BidirectionalIterator last); |
| 283 | |
| 284 | template <class BidirectionalIterator, class OutputIterator> |
Marshall Clow | e8ea829 | 2018-01-22 21:43:04 | [diff] [blame] | 285 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 286 | reverse_copy(BidirectionalIterator first, BidirectionalIterator last, OutputIterator result); |
| 287 | |
| 288 | template <class ForwardIterator> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 289 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 290 | rotate(ForwardIterator first, ForwardIterator middle, ForwardIterator last); |
| 291 | |
| 292 | template <class ForwardIterator, class OutputIterator> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 293 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 294 | rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last, OutputIterator result); |
| 295 | |
| 296 | template <class RandomAccessIterator> |
| 297 | void |
Marshall Clow | 0f37a41 | 2017-03-23 13:43:37 | [diff] [blame] | 298 | random_shuffle(RandomAccessIterator first, RandomAccessIterator last); // deprecated in C++14, removed in C++17 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 299 | |
| 300 | template <class RandomAccessIterator, class RandomNumberGenerator> |
| 301 | void |
Marshall Clow | 06965c1 | 2014-03-03 06:14:19 | [diff] [blame] | 302 | random_shuffle(RandomAccessIterator first, RandomAccessIterator last, |
Marshall Clow | 0f37a41 | 2017-03-23 13:43:37 | [diff] [blame] | 303 | RandomNumberGenerator& rand); // deprecated in C++14, removed in C++17 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 304 | |
Eric Fiselier | e715470 | 2016-08-28 22:14:37 | [diff] [blame] | 305 | template<class PopulationIterator, class SampleIterator, |
| 306 | class Distance, class UniformRandomBitGenerator> |
| 307 | SampleIterator sample(PopulationIterator first, PopulationIterator last, |
| 308 | SampleIterator out, Distance n, |
| 309 | UniformRandomBitGenerator&& g); // C++17 |
| 310 | |
Howard Hinnant | f9d540b | 2010-05-26 17:49:34 | [diff] [blame] | 311 | template<class RandomAccessIterator, class UniformRandomNumberGenerator> |
| 312 | void shuffle(RandomAccessIterator first, RandomAccessIterator last, |
Howard Hinnant | fb34010 | 2010-11-18 01:47:02 | [diff] [blame] | 313 | UniformRandomNumberGenerator&& g); |
Howard Hinnant | f9d540b | 2010-05-26 17:49:34 | [diff] [blame] | 314 | |
Arthur O'Dwyer | 3fbd3ea | 2020-12-26 06:39:03 | [diff] [blame] | 315 | template<class ForwardIterator> |
| 316 | constexpr ForwardIterator |
| 317 | shift_left(ForwardIterator first, ForwardIterator last, |
| 318 | typename iterator_traits<ForwardIterator>::difference_type n); // C++20 |
| 319 | |
| 320 | template<class ForwardIterator> |
| 321 | constexpr ForwardIterator |
| 322 | shift_right(ForwardIterator first, ForwardIterator last, |
| 323 | typename iterator_traits<ForwardIterator>::difference_type n); // C++20 |
| 324 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 325 | template <class InputIterator, class Predicate> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 326 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 327 | is_partitioned(InputIterator first, InputIterator last, Predicate pred); |
| 328 | |
| 329 | template <class ForwardIterator, class Predicate> |
Arthur O'Dwyer | f851db3 | 2020-12-17 05:01:08 | [diff] [blame] | 330 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 331 | partition(ForwardIterator first, ForwardIterator last, Predicate pred); |
| 332 | |
| 333 | template <class InputIterator, class OutputIterator1, |
| 334 | class OutputIterator2, class Predicate> |
Marshall Clow | 1b9a4ff | 2018-01-22 20:44:33 | [diff] [blame] | 335 | constexpr pair<OutputIterator1, OutputIterator2> // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 336 | partition_copy(InputIterator first, InputIterator last, |
| 337 | OutputIterator1 out_true, OutputIterator2 out_false, |
| 338 | Predicate pred); |
| 339 | |
| 340 | template <class ForwardIterator, class Predicate> |
| 341 | ForwardIterator |
| 342 | stable_partition(ForwardIterator first, ForwardIterator last, Predicate pred); |
| 343 | |
| 344 | template<class ForwardIterator, class Predicate> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 345 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 346 | partition_point(ForwardIterator first, ForwardIterator last, Predicate pred); |
| 347 | |
| 348 | template <class ForwardIterator> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 349 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 350 | is_sorted(ForwardIterator first, ForwardIterator last); |
| 351 | |
| 352 | template <class ForwardIterator, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 353 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 354 | is_sorted(ForwardIterator first, ForwardIterator last, Compare comp); |
| 355 | |
| 356 | template<class ForwardIterator> |
Marshall Clow | 056f15e | 2018-01-15 19:40:34 | [diff] [blame] | 357 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 358 | is_sorted_until(ForwardIterator first, ForwardIterator last); |
| 359 | |
| 360 | template <class ForwardIterator, class Compare> |
Marshall Clow | 056f15e | 2018-01-15 19:40:34 | [diff] [blame] | 361 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 362 | is_sorted_until(ForwardIterator first, ForwardIterator last, Compare comp); |
| 363 | |
| 364 | template <class RandomAccessIterator> |
Arthur O'Dwyer | 493f140 | 2020-12-20 20:21:42 | [diff] [blame] | 365 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 366 | sort(RandomAccessIterator first, RandomAccessIterator last); |
| 367 | |
| 368 | template <class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 493f140 | 2020-12-20 20:21:42 | [diff] [blame] | 369 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 370 | sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp); |
| 371 | |
| 372 | template <class RandomAccessIterator> |
| 373 | void |
| 374 | stable_sort(RandomAccessIterator first, RandomAccessIterator last); |
| 375 | |
| 376 | template <class RandomAccessIterator, class Compare> |
| 377 | void |
| 378 | stable_sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp); |
| 379 | |
| 380 | template <class RandomAccessIterator> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 381 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 382 | partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last); |
| 383 | |
| 384 | template <class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 385 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 386 | partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last, Compare comp); |
| 387 | |
| 388 | template <class InputIterator, class RandomAccessIterator> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 389 | constexpr RandomAccessIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 390 | partial_sort_copy(InputIterator first, InputIterator last, |
| 391 | RandomAccessIterator result_first, RandomAccessIterator result_last); |
| 392 | |
| 393 | template <class InputIterator, class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 394 | constexpr RandomAccessIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 395 | partial_sort_copy(InputIterator first, InputIterator last, |
| 396 | RandomAccessIterator result_first, RandomAccessIterator result_last, Compare comp); |
| 397 | |
| 398 | template <class RandomAccessIterator> |
Arthur O'Dwyer | 5d95656 | 2021-02-04 23:12:52 | [diff] [blame] | 399 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 400 | nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last); |
| 401 | |
| 402 | template <class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 5d95656 | 2021-02-04 23:12:52 | [diff] [blame] | 403 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 404 | nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last, Compare comp); |
| 405 | |
| 406 | template <class ForwardIterator, class T> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 407 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 408 | lower_bound(ForwardIterator first, ForwardIterator last, const T& value); |
| 409 | |
| 410 | template <class ForwardIterator, class T, class Compare> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 411 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 412 | lower_bound(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); |
| 413 | |
| 414 | template <class ForwardIterator, class T> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 415 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 416 | upper_bound(ForwardIterator first, ForwardIterator last, const T& value); |
| 417 | |
| 418 | template <class ForwardIterator, class T, class Compare> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 419 | constexpr ForwardIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 420 | upper_bound(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); |
| 421 | |
| 422 | template <class ForwardIterator, class T> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 423 | constexpr pair<ForwardIterator, ForwardIterator> // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 424 | equal_range(ForwardIterator first, ForwardIterator last, const T& value); |
| 425 | |
| 426 | template <class ForwardIterator, class T, class Compare> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 427 | constexpr pair<ForwardIterator, ForwardIterator> // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 428 | equal_range(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); |
| 429 | |
| 430 | template <class ForwardIterator, class T> |
Marshall Clow | d57c03d | 2018-01-16 02:34:41 | [diff] [blame] | 431 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 432 | binary_search(ForwardIterator first, ForwardIterator last, const T& value); |
| 433 | |
| 434 | template <class ForwardIterator, class T, class Compare> |
Marshall Clow | 8da1a48 | 2018-01-22 23:10:40 | [diff] [blame] | 435 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 436 | binary_search(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); |
| 437 | |
| 438 | template <class InputIterator1, class InputIterator2, class OutputIterator> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 439 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 440 | merge(InputIterator1 first1, InputIterator1 last1, |
| 441 | InputIterator2 first2, InputIterator2 last2, OutputIterator result); |
| 442 | |
| 443 | template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 444 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 445 | merge(InputIterator1 first1, InputIterator1 last1, |
| 446 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 447 | |
| 448 | template <class BidirectionalIterator> |
| 449 | void |
| 450 | inplace_merge(BidirectionalIterator first, BidirectionalIterator middle, BidirectionalIterator last); |
| 451 | |
| 452 | template <class BidirectionalIterator, class Compare> |
| 453 | void |
| 454 | inplace_merge(BidirectionalIterator first, BidirectionalIterator middle, BidirectionalIterator last, Compare comp); |
| 455 | |
| 456 | template <class InputIterator1, class InputIterator2> |
Marshall Clow | 8da1a48 | 2018-01-22 23:10:40 | [diff] [blame] | 457 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 458 | includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2); |
| 459 | |
| 460 | template <class InputIterator1, class InputIterator2, class Compare> |
Marshall Clow | 8da1a48 | 2018-01-22 23:10:40 | [diff] [blame] | 461 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 462 | includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, Compare comp); |
| 463 | |
| 464 | template <class InputIterator1, class InputIterator2, class OutputIterator> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 465 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 466 | set_union(InputIterator1 first1, InputIterator1 last1, |
| 467 | InputIterator2 first2, InputIterator2 last2, OutputIterator result); |
| 468 | |
| 469 | template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 470 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 471 | set_union(InputIterator1 first1, InputIterator1 last1, |
| 472 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 473 | |
| 474 | template <class InputIterator1, class InputIterator2, class OutputIterator> |
Marshall Clow | 8da1a48 | 2018-01-22 23:10:40 | [diff] [blame] | 475 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 476 | set_intersection(InputIterator1 first1, InputIterator1 last1, |
| 477 | InputIterator2 first2, InputIterator2 last2, OutputIterator result); |
| 478 | |
| 479 | template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare> |
Marshall Clow | 8da1a48 | 2018-01-22 23:10:40 | [diff] [blame] | 480 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 481 | set_intersection(InputIterator1 first1, InputIterator1 last1, |
| 482 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 483 | |
| 484 | template <class InputIterator1, class InputIterator2, class OutputIterator> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 485 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 486 | set_difference(InputIterator1 first1, InputIterator1 last1, |
| 487 | InputIterator2 first2, InputIterator2 last2, OutputIterator result); |
| 488 | |
| 489 | template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 490 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 491 | set_difference(InputIterator1 first1, InputIterator1 last1, |
| 492 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 493 | |
| 494 | template <class InputIterator1, class InputIterator2, class OutputIterator> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 495 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 496 | set_symmetric_difference(InputIterator1 first1, InputIterator1 last1, |
| 497 | InputIterator2 first2, InputIterator2 last2, OutputIterator result); |
| 498 | |
| 499 | template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare> |
Arthur O'Dwyer | 14098cf | 2020-12-04 18:47:12 | [diff] [blame] | 500 | constexpr OutputIterator // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 501 | set_symmetric_difference(InputIterator1 first1, InputIterator1 last1, |
| 502 | InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp); |
| 503 | |
| 504 | template <class RandomAccessIterator> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 505 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 506 | push_heap(RandomAccessIterator first, RandomAccessIterator last); |
| 507 | |
| 508 | template <class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 509 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 510 | push_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); |
| 511 | |
| 512 | template <class RandomAccessIterator> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 513 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 514 | pop_heap(RandomAccessIterator first, RandomAccessIterator last); |
| 515 | |
| 516 | template <class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 517 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 518 | pop_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); |
| 519 | |
| 520 | template <class RandomAccessIterator> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 521 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 522 | make_heap(RandomAccessIterator first, RandomAccessIterator last); |
| 523 | |
| 524 | template <class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 525 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 526 | make_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); |
| 527 | |
| 528 | template <class RandomAccessIterator> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 529 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 530 | sort_heap(RandomAccessIterator first, RandomAccessIterator last); |
| 531 | |
| 532 | template <class RandomAccessIterator, class Compare> |
Arthur O'Dwyer | 5386aa2 | 2020-12-17 05:26:18 | [diff] [blame] | 533 | constexpr void // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 534 | sort_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); |
| 535 | |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 536 | template <class RandomAccessIterator> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 537 | constexpr bool // constexpr in C++20 |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 538 | is_heap(RandomAccessIterator first, RandomAccessiterator last); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 539 | |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 540 | template <class RandomAccessIterator, class Compare> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 541 | constexpr bool // constexpr in C++20 |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 542 | is_heap(RandomAccessIterator first, RandomAccessiterator last, Compare comp); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 543 | |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 544 | template <class RandomAccessIterator> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 545 | constexpr RandomAccessIterator // constexpr in C++20 |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 546 | is_heap_until(RandomAccessIterator first, RandomAccessiterator last); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 547 | |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 548 | template <class RandomAccessIterator, class Compare> |
Marshall Clow | 49c7643 | 2018-01-15 16:16:32 | [diff] [blame] | 549 | constexpr RandomAccessIterator // constexpr in C++20 |
Howard Hinnant | b3371f6 | 2010-08-22 00:02:43 | [diff] [blame] | 550 | is_heap_until(RandomAccessIterator first, RandomAccessiterator last, Compare comp); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 551 | |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 552 | template <class ForwardIterator> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 553 | constexpr ForwardIterator // constexpr in C++14 |
| 554 | min_element(ForwardIterator first, ForwardIterator last); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 555 | |
| 556 | template <class ForwardIterator, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 557 | constexpr ForwardIterator // constexpr in C++14 |
| 558 | min_element(ForwardIterator first, ForwardIterator last, Compare comp); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 559 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 560 | template <class T> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 561 | constexpr const T& // constexpr in C++14 |
| 562 | min(const T& a, const T& b); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 563 | |
| 564 | template <class T, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 565 | constexpr const T& // constexpr in C++14 |
| 566 | min(const T& a, const T& b, Compare comp); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 567 | |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 568 | template<class T> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 569 | constexpr T // constexpr in C++14 |
| 570 | min(initializer_list<T> t); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 571 | |
| 572 | template<class T, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 573 | constexpr T // constexpr in C++14 |
| 574 | min(initializer_list<T> t, Compare comp); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 575 | |
Marshall Clow | 146c14a | 2016-03-07 22:43:49 | [diff] [blame] | 576 | template<class T> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 577 | constexpr const T& clamp(const T& v, const T& lo, const T& hi); // C++17 |
Marshall Clow | 146c14a | 2016-03-07 22:43:49 | [diff] [blame] | 578 | |
| 579 | template<class T, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 580 | constexpr const T& clamp(const T& v, const T& lo, const T& hi, Compare comp); // C++17 |
Marshall Clow | 146c14a | 2016-03-07 22:43:49 | [diff] [blame] | 581 | |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 582 | template <class ForwardIterator> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 583 | constexpr ForwardIterator // constexpr in C++14 |
| 584 | max_element(ForwardIterator first, ForwardIterator last); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 585 | |
| 586 | template <class ForwardIterator, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 587 | constexpr ForwardIterator // constexpr in C++14 |
| 588 | max_element(ForwardIterator first, ForwardIterator last, Compare comp); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 589 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 590 | template <class T> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 591 | constexpr const T& // constexpr in C++14 |
| 592 | max(const T& a, const T& b); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 593 | |
| 594 | template <class T, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 595 | constexpr const T& // constexpr in C++14 |
| 596 | max(const T& a, const T& b, Compare comp); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 597 | |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 598 | template<class T> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 599 | constexpr T // constexpr in C++14 |
| 600 | max(initializer_list<T> t); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 601 | |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 602 | template<class T, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 603 | constexpr T // constexpr in C++14 |
| 604 | max(initializer_list<T> t, Compare comp); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 605 | |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 606 | template<class ForwardIterator> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 607 | constexpr pair<ForwardIterator, ForwardIterator> // constexpr in C++14 |
| 608 | minmax_element(ForwardIterator first, ForwardIterator last); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 609 | |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 610 | template<class ForwardIterator, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 611 | constexpr pair<ForwardIterator, ForwardIterator> // constexpr in C++14 |
| 612 | minmax_element(ForwardIterator first, ForwardIterator last, Compare comp); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 613 | |
| 614 | template<class T> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 615 | constexpr pair<const T&, const T&> // constexpr in C++14 |
| 616 | minmax(const T& a, const T& b); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 617 | |
| 618 | template<class T, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 619 | constexpr pair<const T&, const T&> // constexpr in C++14 |
| 620 | minmax(const T& a, const T& b, Compare comp); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 621 | |
| 622 | template<class T> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 623 | constexpr pair<T, T> // constexpr in C++14 |
| 624 | minmax(initializer_list<T> t); |
Howard Hinnant | 4eb27b7 | 2010-08-21 20:10:01 | [diff] [blame] | 625 | |
| 626 | template<class T, class Compare> |
Arthur O'Dwyer | b8bc4e1 | 2020-12-03 01:02:18 | [diff] [blame] | 627 | constexpr pair<T, T> // constexpr in C++14 |
| 628 | minmax(initializer_list<T> t, Compare comp); |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 629 | |
| 630 | template <class InputIterator1, class InputIterator2> |
Marshall Clow | 1b9a4ff | 2018-01-22 20:44:33 | [diff] [blame] | 631 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 632 | lexicographical_compare(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2); |
| 633 | |
| 634 | template <class InputIterator1, class InputIterator2, class Compare> |
Marshall Clow | 1b9a4ff | 2018-01-22 20:44:33 | [diff] [blame] | 635 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 636 | lexicographical_compare(InputIterator1 first1, InputIterator1 last1, |
| 637 | InputIterator2 first2, InputIterator2 last2, Compare comp); |
| 638 | |
| 639 | template <class BidirectionalIterator> |
Arthur O'Dwyer | f851db3 | 2020-12-17 05:01:08 | [diff] [blame] | 640 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 641 | next_permutation(BidirectionalIterator first, BidirectionalIterator last); |
| 642 | |
| 643 | template <class BidirectionalIterator, class Compare> |
Arthur O'Dwyer | f851db3 | 2020-12-17 05:01:08 | [diff] [blame] | 644 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 645 | next_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp); |
| 646 | |
| 647 | template <class BidirectionalIterator> |
Arthur O'Dwyer | f851db3 | 2020-12-17 05:01:08 | [diff] [blame] | 648 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 649 | prev_permutation(BidirectionalIterator first, BidirectionalIterator last); |
| 650 | |
| 651 | template <class BidirectionalIterator, class Compare> |
Arthur O'Dwyer | f851db3 | 2020-12-17 05:01:08 | [diff] [blame] | 652 | constexpr bool // constexpr in C++20 |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 653 | prev_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp); |
| 654 | |
Konstantin Varlamov | 8d23b74 | 2022-01-11 06:49:37 | [diff] [blame] | 655 | namespace ranges { |
| 656 | // [algorithms.results], algorithm result types |
| 657 | template<class InputIterator, class OutputIterator> |
| 658 | struct in_out_result; |
| 659 | } |
| 660 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 661 | } // std |
| 662 | |
| 663 | */ |
| 664 | |
Nikolas Klauser | cf54cb2 | 2022-01-03 00:24:09 | [diff] [blame] | 665 | #include <__bits> // __libcpp_clz |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 666 | #include <__config> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 667 | #include <__debug> |
Howard Hinnant | a1d07d5 | 2012-07-26 17:09:09 | [diff] [blame] | 668 | #include <cstddef> |
Arthur O'Dwyer | bfbd73f | 2021-05-19 15:57:04 | [diff] [blame] | 669 | #include <cstring> |
| 670 | #include <functional> |
| 671 | #include <initializer_list> |
Arthur O'Dwyer | bfbd73f | 2021-05-19 15:57:04 | [diff] [blame] | 672 | #include <iterator> |
| 673 | #include <memory> |
| 674 | #include <type_traits> |
| 675 | #include <utility> // swap_ranges |
Marshall Clow | f56972e | 2018-09-12 19:41:40 | [diff] [blame] | 676 | #include <version> |
Howard Hinnant | 5d1a701 | 2013-08-14 18:00:20 | [diff] [blame] | 677 | |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 678 | #include <__algorithm/adjacent_find.h> |
| 679 | #include <__algorithm/all_of.h> |
| 680 | #include <__algorithm/any_of.h> |
| 681 | #include <__algorithm/binary_search.h> |
| 682 | #include <__algorithm/clamp.h> |
| 683 | #include <__algorithm/comp.h> |
| 684 | #include <__algorithm/comp_ref_type.h> |
| 685 | #include <__algorithm/copy.h> |
| 686 | #include <__algorithm/copy_backward.h> |
| 687 | #include <__algorithm/copy_if.h> |
| 688 | #include <__algorithm/copy_n.h> |
| 689 | #include <__algorithm/count.h> |
| 690 | #include <__algorithm/count_if.h> |
| 691 | #include <__algorithm/equal.h> |
| 692 | #include <__algorithm/equal_range.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 693 | #include <__algorithm/fill.h> |
Arthur O'Dwyer | 4d81a46 | 2022-01-07 14:45:05 | [diff] [blame] | 694 | #include <__algorithm/fill_n.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 695 | #include <__algorithm/find.h> |
| 696 | #include <__algorithm/find_end.h> |
| 697 | #include <__algorithm/find_first_of.h> |
| 698 | #include <__algorithm/find_if.h> |
| 699 | #include <__algorithm/find_if_not.h> |
| 700 | #include <__algorithm/for_each.h> |
| 701 | #include <__algorithm/for_each_n.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 702 | #include <__algorithm/generate.h> |
Arthur O'Dwyer | 4d81a46 | 2022-01-07 14:45:05 | [diff] [blame] | 703 | #include <__algorithm/generate_n.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 704 | #include <__algorithm/half_positive.h> |
Nikolas Klauser | f3514af | 2022-01-25 10:21:47 | [diff] [blame] | 705 | #include <__algorithm/in_in_out_result.h> |
Nikolas Klauser | d3729bb | 2022-01-14 01:55:51 | [diff] [blame] | 706 | #include <__algorithm/in_in_result.h> |
Nikolas Klauser | 610979b | 2022-02-03 01:17:03 | [diff] [blame^] | 707 | #include <__algorithm/in_out_out_result.h> |
Konstantin Varlamov | 8d23b74 | 2022-01-11 06:49:37 | [diff] [blame] | 708 | #include <__algorithm/in_out_result.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 709 | #include <__algorithm/includes.h> |
| 710 | #include <__algorithm/inplace_merge.h> |
| 711 | #include <__algorithm/is_heap.h> |
| 712 | #include <__algorithm/is_heap_until.h> |
| 713 | #include <__algorithm/is_partitioned.h> |
| 714 | #include <__algorithm/is_permutation.h> |
| 715 | #include <__algorithm/is_sorted.h> |
| 716 | #include <__algorithm/is_sorted_until.h> |
Christopher Di Bella | 6adbc83 | 2021-06-05 02:47:47 | [diff] [blame] | 717 | #include <__algorithm/iter_swap.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 718 | #include <__algorithm/lexicographical_compare.h> |
| 719 | #include <__algorithm/lower_bound.h> |
| 720 | #include <__algorithm/make_heap.h> |
| 721 | #include <__algorithm/max.h> |
| 722 | #include <__algorithm/max_element.h> |
| 723 | #include <__algorithm/merge.h> |
| 724 | #include <__algorithm/min.h> |
| 725 | #include <__algorithm/min_element.h> |
| 726 | #include <__algorithm/minmax.h> |
| 727 | #include <__algorithm/minmax_element.h> |
| 728 | #include <__algorithm/mismatch.h> |
| 729 | #include <__algorithm/move.h> |
| 730 | #include <__algorithm/move_backward.h> |
| 731 | #include <__algorithm/next_permutation.h> |
| 732 | #include <__algorithm/none_of.h> |
| 733 | #include <__algorithm/nth_element.h> |
| 734 | #include <__algorithm/partial_sort.h> |
| 735 | #include <__algorithm/partial_sort_copy.h> |
| 736 | #include <__algorithm/partition.h> |
| 737 | #include <__algorithm/partition_copy.h> |
| 738 | #include <__algorithm/partition_point.h> |
| 739 | #include <__algorithm/pop_heap.h> |
| 740 | #include <__algorithm/prev_permutation.h> |
| 741 | #include <__algorithm/push_heap.h> |
| 742 | #include <__algorithm/remove.h> |
| 743 | #include <__algorithm/remove_copy.h> |
| 744 | #include <__algorithm/remove_copy_if.h> |
| 745 | #include <__algorithm/remove_if.h> |
| 746 | #include <__algorithm/replace.h> |
| 747 | #include <__algorithm/replace_copy.h> |
| 748 | #include <__algorithm/replace_copy_if.h> |
| 749 | #include <__algorithm/replace_if.h> |
| 750 | #include <__algorithm/reverse.h> |
| 751 | #include <__algorithm/reverse_copy.h> |
| 752 | #include <__algorithm/rotate.h> |
| 753 | #include <__algorithm/rotate_copy.h> |
| 754 | #include <__algorithm/sample.h> |
| 755 | #include <__algorithm/search.h> |
| 756 | #include <__algorithm/search_n.h> |
| 757 | #include <__algorithm/set_difference.h> |
| 758 | #include <__algorithm/set_intersection.h> |
| 759 | #include <__algorithm/set_symmetric_difference.h> |
| 760 | #include <__algorithm/set_union.h> |
| 761 | #include <__algorithm/shift_left.h> |
| 762 | #include <__algorithm/shift_right.h> |
| 763 | #include <__algorithm/shuffle.h> |
| 764 | #include <__algorithm/sift_down.h> |
| 765 | #include <__algorithm/sort.h> |
| 766 | #include <__algorithm/sort_heap.h> |
| 767 | #include <__algorithm/stable_partition.h> |
| 768 | #include <__algorithm/stable_sort.h> |
Christopher Di Bella | 6adbc83 | 2021-06-05 02:47:47 | [diff] [blame] | 769 | #include <__algorithm/swap_ranges.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 770 | #include <__algorithm/transform.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 771 | #include <__algorithm/unique.h> |
Arthur O'Dwyer | 4d81a46 | 2022-01-07 14:45:05 | [diff] [blame] | 772 | #include <__algorithm/unique_copy.h> |
Louis Dionne | 134723e | 2021-06-17 15:30:11 | [diff] [blame] | 773 | #include <__algorithm/unwrap_iter.h> |
| 774 | #include <__algorithm/upper_bound.h> |
Eric Fiselier | c1bd919 | 2014-08-10 23:53:08 | [diff] [blame] | 775 | |
Howard Hinnant | 073458b | 2011-10-17 20:05:10 | [diff] [blame] | 776 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 777 | #pragma GCC system_header |
Howard Hinnant | 073458b | 2011-10-17 20:05:10 | [diff] [blame] | 778 | #endif |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 | [diff] [blame] | 779 | |
Louis Dionne | 0a06eb9 | 2019-08-05 18:29:14 | [diff] [blame] | 780 | #if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17 |
Louis Dionne | 9568924 | 2019-08-06 21:11:24 | [diff] [blame] | 781 | # include <__pstl_algorithm> |
Louis Dionne | 0a06eb9 | 2019-08-05 18:29:14 | [diff] [blame] | 782 | #endif |
| 783 | |
Louis Dionne | 4cd6ca1 | 2021-04-20 16:03:32 | [diff] [blame] | 784 | #endif // _LIBCPP_ALGORITHM |