]>
Commit | Line | Data |
---|---|---|
cd1e6665 | 1 | // <algorithm> Forward declarations -*- C++ -*- |
c2ba9709 | 2 | |
6441eb6d | 3 | // Copyright (C) 2007-2025 Free Software Foundation, Inc. |
c2ba9709 JS |
4 | // |
5 | // This file is part of the GNU ISO C++ Library. This library is free | |
6 | // software; you can redistribute it and/or modify it under the | |
7 | // terms of the GNU General Public License as published by the | |
748086b7 | 8 | // Free Software Foundation; either version 3, or (at your option) |
c2ba9709 JS |
9 | // any later version. |
10 | ||
11 | // This library is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | ||
748086b7 JJ |
16 | // Under Section 7 of GPL version 3, you are granted additional |
17 | // permissions described in the GCC Runtime Library Exception, version | |
18 | // 3.1, as published by the Free Software Foundation. | |
19 | ||
20 | // You should have received a copy of the GNU General Public License and | |
21 | // a copy of the GCC Runtime Library Exception along with this program; | |
22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |
23 | // <http://www.gnu.org/licenses/>. | |
c2ba9709 JS |
24 | |
25 | /** @file bits/algorithmfwd.h | |
26 | * This is an internal header file, included by other library headers. | |
f910786b | 27 | * Do not attempt to use it directly. @headername{algorithm} |
c2ba9709 JS |
28 | */ |
29 | ||
c2ba9709 JS |
30 | #ifndef _GLIBCXX_ALGORITHMFWD_H |
31 | #define _GLIBCXX_ALGORITHMFWD_H 1 | |
32 | ||
63a598de | 33 | #ifdef _GLIBCXX_SYSHDR |
c2ba9709 | 34 | #pragma GCC system_header |
63a598de | 35 | #endif |
c2ba9709 JS |
36 | |
37 | #include <bits/c++config.h> | |
38 | #include <bits/stl_pair.h> | |
39 | #include <bits/stl_iterator_base_types.h> | |
734f5023 | 40 | #if __cplusplus >= 201103L |
1edd1a83 | 41 | #include <initializer_list> |
a7d5d7e2 | 42 | #endif |
c2ba9709 | 43 | |
d3a7302e JM |
44 | #pragma GCC diagnostic push |
45 | #pragma GCC diagnostic ignored "-Wc++11-extensions" | |
46 | ||
12ffa228 BK |
47 | namespace std _GLIBCXX_VISIBILITY(default) |
48 | { | |
49 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | |
c2ba9709 | 50 | |
aac2878e BK |
51 | /* |
52 | adjacent_find | |
4f5f9962 JW |
53 | all_of (C++11) |
54 | any_of (C++11) | |
aac2878e | 55 | binary_search |
4db1cb44 | 56 | clamp (C++17) |
aac2878e BK |
57 | copy |
58 | copy_backward | |
4f5f9962 JW |
59 | copy_if (C++11) |
60 | copy_n (C++11) | |
aac2878e BK |
61 | count |
62 | count_if | |
63 | equal | |
64 | equal_range | |
65 | fill | |
66 | fill_n | |
67 | find | |
68 | find_end | |
69 | find_first_of | |
70 | find_if | |
4f5f9962 | 71 | find_if_not (C++11) |
aac2878e BK |
72 | for_each |
73 | generate | |
74 | generate_n | |
75 | includes | |
76 | inplace_merge | |
4f5f9962 JW |
77 | is_heap (C++11) |
78 | is_heap_until (C++11) | |
79 | is_partitioned (C++11) | |
80 | is_sorted (C++11) | |
81 | is_sorted_until (C++11) | |
aac2878e BK |
82 | iter_swap |
83 | lexicographical_compare | |
84 | lower_bound | |
85 | make_heap | |
86 | max | |
87 | max_element | |
88 | merge | |
89 | min | |
90 | min_element | |
4f5f9962 JW |
91 | minmax (C++11) |
92 | minmax_element (C++11) | |
aac2878e BK |
93 | mismatch |
94 | next_permutation | |
4f5f9962 | 95 | none_of (C++11) |
aac2878e BK |
96 | nth_element |
97 | partial_sort | |
98 | partial_sort_copy | |
99 | partition | |
4f5f9962 JW |
100 | partition_copy (C++11) |
101 | partition_point (C++11) | |
aac2878e BK |
102 | pop_heap |
103 | prev_permutation | |
104 | push_heap | |
105 | random_shuffle | |
106 | remove | |
107 | remove_copy | |
108 | remove_copy_if | |
109 | remove_if | |
110 | replace | |
111 | replace_copy | |
112 | replace_copy_if | |
113 | replace_if | |
114 | reverse | |
115 | reverse_copy | |
116 | rotate | |
117 | rotate_copy | |
118 | search | |
119 | search_n | |
120 | set_difference | |
121 | set_intersection | |
122 | set_symmetric_difference | |
123 | set_union | |
4f5f9962 | 124 | shuffle (C++11) |
aac2878e BK |
125 | sort |
126 | sort_heap | |
127 | stable_partition | |
128 | stable_sort | |
129 | swap | |
130 | swap_ranges | |
131 | transform | |
132 | unique | |
133 | unique_copy | |
134 | upper_bound | |
135 | */ | |
136 | ||
137 | /** | |
138 | * @defgroup algorithms Algorithms | |
139 | * | |
140 | * Components for performing algorithmic operations. Includes | |
141 | * non-modifying sequence, modifying (mutating) sequence, sorting, | |
142 | * searching, merge, partition, heap, set, minima, maxima, and | |
143 | * permutation operations. | |
144 | */ | |
145 | ||
146 | /** | |
5ab3a5af | 147 | * @defgroup mutating_algorithms Mutating |
5b9daa7e BK |
148 | * @ingroup algorithms |
149 | */ | |
150 | ||
151 | /** | |
5ab3a5af | 152 | * @defgroup non_mutating_algorithms Non-Mutating |
5b9daa7e BK |
153 | * @ingroup algorithms |
154 | */ | |
155 | ||
156 | /** | |
5ab3a5af | 157 | * @defgroup sorting_algorithms Sorting |
aac2878e | 158 | * @ingroup algorithms |
5b9daa7e BK |
159 | */ |
160 | ||
161 | /** | |
ed920373 | 162 | * @defgroup set_algorithms Set Operations |
5b9daa7e | 163 | * @ingroup sorting_algorithms |
aac2878e BK |
164 | * |
165 | * These algorithms are common set operations performed on sequences | |
166 | * that are already sorted. The number of comparisons will be | |
167 | * linear. | |
168 | */ | |
169 | ||
170 | /** | |
5ab3a5af | 171 | * @defgroup binary_search_algorithms Binary Search |
5b9daa7e | 172 | * @ingroup sorting_algorithms |
aac2878e BK |
173 | * |
174 | * These algorithms are variations of a classic binary search, and | |
175 | * all assume that the sequence being searched is already sorted. | |
9a38acdf | 176 | * |
aac2878e BK |
177 | * The number of comparisons will be logarithmic (and as few as |
178 | * possible). The number of steps through the sequence will be | |
179 | * logarithmic for random-access iterators (e.g., pointers), and | |
180 | * linear otherwise. | |
9a38acdf | 181 | * |
aac2878e BK |
182 | * The LWG has passed Defect Report 270, which notes: <em>The |
183 | * proposed resolution reinterprets binary search. Instead of | |
184 | * thinking about searching for a value in a sorted range, we view | |
185 | * that as an important special case of a more general algorithm: | |
186 | * searching for the partition point in a partitioned range. We | |
187 | * also add a guarantee that the old wording did not: we ensure that | |
188 | * the upper bound is no earlier than the lower bound, that the pair | |
189 | * returned by equal_range is a valid range, and that the first part | |
190 | * of that pair is the lower bound.</em> | |
191 | * | |
192 | * The actual effect of the first sentence is that a comparison | |
193 | * functor passed by the user doesn't necessarily need to induce a | |
194 | * strict weak ordering relation. Rather, it partitions the range. | |
195 | */ | |
196 | ||
c2ba9709 JS |
197 | // adjacent_find |
198 | ||
734f5023 | 199 | #if __cplusplus >= 201103L |
688a7a07 | 200 | template<typename _IIter, typename _Predicate> |
3a66e68a | 201 | _GLIBCXX20_CONSTEXPR |
688a7a07 PC |
202 | bool |
203 | all_of(_IIter, _IIter, _Predicate); | |
204 | ||
205 | template<typename _IIter, typename _Predicate> | |
3a66e68a | 206 | _GLIBCXX20_CONSTEXPR |
688a7a07 PC |
207 | bool |
208 | any_of(_IIter, _IIter, _Predicate); | |
209 | #endif | |
210 | ||
dc47add7 | 211 | template<typename _FIter, typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_FIter)> |
3a66e68a | 212 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 213 | bool |
c2ba9709 JS |
214 | binary_search(_FIter, _FIter, const _Tp&); |
215 | ||
dc47add7 JW |
216 | template<typename _FIter, typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_FIter), |
217 | typename _Compare> | |
3a66e68a | 218 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 219 | bool |
c2ba9709 JS |
220 | binary_search(_FIter, _FIter, const _Tp&, _Compare); |
221 | ||
4db1cb44 ESR |
222 | #if __cplusplus > 201402L |
223 | template<typename _Tp> | |
224 | _GLIBCXX14_CONSTEXPR | |
225 | const _Tp& | |
226 | clamp(const _Tp&, const _Tp&, const _Tp&); | |
227 | ||
228 | template<typename _Tp, typename _Compare> | |
229 | _GLIBCXX14_CONSTEXPR | |
230 | const _Tp& | |
231 | clamp(const _Tp&, const _Tp&, const _Tp&, _Compare); | |
232 | #endif | |
233 | ||
c2ba9709 | 234 | template<typename _IIter, typename _OIter> |
3a66e68a | 235 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 236 | _OIter |
c2ba9709 JS |
237 | copy(_IIter, _IIter, _OIter); |
238 | ||
239 | template<typename _BIter1, typename _BIter2> | |
3a66e68a | 240 | _GLIBCXX20_CONSTEXPR |
c2ba9709 | 241 | _BIter2 |
4f99f3d0 | 242 | copy_backward(_BIter1, _BIter1, _BIter2); |
c2ba9709 | 243 | |
734f5023 | 244 | #if __cplusplus >= 201103L |
688a7a07 | 245 | template<typename _IIter, typename _OIter, typename _Predicate> |
3a66e68a | 246 | _GLIBCXX20_CONSTEXPR |
688a7a07 PC |
247 | _OIter |
248 | copy_if(_IIter, _IIter, _OIter, _Predicate); | |
b0371776 PC |
249 | |
250 | template<typename _IIter, typename _Size, typename _OIter> | |
3a66e68a | 251 | _GLIBCXX20_CONSTEXPR |
b0371776 PC |
252 | _OIter |
253 | copy_n(_IIter, _Size, _OIter); | |
688a7a07 PC |
254 | #endif |
255 | ||
c2ba9709 JS |
256 | // count |
257 | // count_if | |
258 | ||
dc47add7 | 259 | template<typename _FIter, typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_FIter)> |
3a66e68a | 260 | _GLIBCXX20_CONSTEXPR |
c2ba9709 JS |
261 | pair<_FIter, _FIter> |
262 | equal_range(_FIter, _FIter, const _Tp&); | |
263 | ||
dc47add7 JW |
264 | template<typename _FIter, typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_FIter), |
265 | typename _Compare> | |
3a66e68a | 266 | _GLIBCXX20_CONSTEXPR |
c2ba9709 JS |
267 | pair<_FIter, _FIter> |
268 | equal_range(_FIter, _FIter, const _Tp&, _Compare); | |
269 | ||
dc47add7 | 270 | template<typename _FIter, typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_FIter)> |
3a66e68a | 271 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 272 | void |
c2ba9709 JS |
273 | fill(_FIter, _FIter, const _Tp&); |
274 | ||
dc47add7 JW |
275 | template<typename _OIter, typename _Size, |
276 | typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_OIter)> | |
3a66e68a | 277 | _GLIBCXX20_CONSTEXPR |
c2ba9709 JS |
278 | _OIter |
279 | fill_n(_OIter, _Size, const _Tp&); | |
280 | ||
281 | // find | |
6f95a65a BK |
282 | |
283 | template<typename _FIter1, typename _FIter2> | |
3a66e68a | 284 | _GLIBCXX20_CONSTEXPR |
6f95a65a BK |
285 | _FIter1 |
286 | find_end(_FIter1, _FIter1, _FIter2, _FIter2); | |
287 | ||
288 | template<typename _FIter1, typename _FIter2, typename _BinaryPredicate> | |
3a66e68a | 289 | _GLIBCXX20_CONSTEXPR |
6f95a65a BK |
290 | _FIter1 |
291 | find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); | |
292 | ||
c2ba9709 JS |
293 | // find_first_of |
294 | // find_if | |
c2ba9709 | 295 | |
734f5023 | 296 | #if __cplusplus >= 201103L |
76cc1b70 | 297 | template<typename _IIter, typename _Predicate> |
3a66e68a | 298 | _GLIBCXX20_CONSTEXPR |
76cc1b70 PC |
299 | _IIter |
300 | find_if_not(_IIter, _IIter, _Predicate); | |
301 | #endif | |
302 | ||
688a7a07 PC |
303 | // for_each |
304 | // generate | |
305 | // generate_n | |
306 | ||
c2ba9709 | 307 | template<typename _IIter1, typename _IIter2> |
3a66e68a | 308 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 309 | bool |
c2ba9709 JS |
310 | includes(_IIter1, _IIter1, _IIter2, _IIter2); |
311 | ||
312 | template<typename _IIter1, typename _IIter2, typename _Compare> | |
3a66e68a | 313 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 314 | bool |
c2ba9709 JS |
315 | includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); |
316 | ||
317 | template<typename _BIter> | |
698ef4b2 | 318 | _GLIBCXX26_CONSTEXPR |
9a38acdf | 319 | void |
c2ba9709 JS |
320 | inplace_merge(_BIter, _BIter, _BIter); |
321 | ||
322 | template<typename _BIter, typename _Compare> | |
698ef4b2 | 323 | _GLIBCXX26_CONSTEXPR |
9a38acdf | 324 | void |
c2ba9709 JS |
325 | inplace_merge(_BIter, _BIter, _BIter, _Compare); |
326 | ||
734f5023 | 327 | #if __cplusplus >= 201103L |
e69f1bad | 328 | template<typename _RAIter> |
3a66e68a | 329 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 330 | bool |
e69f1bad PC |
331 | is_heap(_RAIter, _RAIter); |
332 | ||
333 | template<typename _RAIter, typename _Compare> | |
3a66e68a | 334 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 335 | bool |
e69f1bad PC |
336 | is_heap(_RAIter, _RAIter, _Compare); |
337 | ||
338 | template<typename _RAIter> | |
3a66e68a | 339 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 340 | _RAIter |
e69f1bad PC |
341 | is_heap_until(_RAIter, _RAIter); |
342 | ||
343 | template<typename _RAIter, typename _Compare> | |
3a66e68a | 344 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 345 | _RAIter |
e69f1bad | 346 | is_heap_until(_RAIter, _RAIter, _Compare); |
4b7ed13a | 347 | |
04dbd891 | 348 | template<typename _IIter, typename _Predicate> |
3a66e68a | 349 | _GLIBCXX20_CONSTEXPR |
04dbd891 PC |
350 | bool |
351 | is_partitioned(_IIter, _IIter, _Predicate); | |
352 | ||
632469d0 | 353 | template<typename _FIter1, typename _FIter2> |
3a66e68a | 354 | _GLIBCXX20_CONSTEXPR |
632469d0 PC |
355 | bool |
356 | is_permutation(_FIter1, _FIter1, _FIter2); | |
357 | ||
358 | template<typename _FIter1, typename _FIter2, | |
359 | typename _BinaryPredicate> | |
3a66e68a | 360 | _GLIBCXX20_CONSTEXPR |
632469d0 PC |
361 | bool |
362 | is_permutation(_FIter1, _FIter1, _FIter2, _BinaryPredicate); | |
363 | ||
4b7ed13a | 364 | template<typename _FIter> |
3a66e68a | 365 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 366 | bool |
4b7ed13a PC |
367 | is_sorted(_FIter, _FIter); |
368 | ||
369 | template<typename _FIter, typename _Compare> | |
3a66e68a | 370 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 371 | bool |
4b7ed13a PC |
372 | is_sorted(_FIter, _FIter, _Compare); |
373 | ||
374 | template<typename _FIter> | |
3a66e68a | 375 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 376 | _FIter |
4b7ed13a PC |
377 | is_sorted_until(_FIter, _FIter); |
378 | ||
379 | template<typename _FIter, typename _Compare> | |
3a66e68a | 380 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 381 | _FIter |
4b7ed13a | 382 | is_sorted_until(_FIter, _FIter, _Compare); |
e69f1bad PC |
383 | #endif |
384 | ||
c2ba9709 | 385 | template<typename _FIter1, typename _FIter2> |
7a91c710 | 386 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 387 | void |
c2ba9709 JS |
388 | iter_swap(_FIter1, _FIter2); |
389 | ||
dc47add7 | 390 | template<typename _FIter, typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_FIter)> |
3a66e68a | 391 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 392 | _FIter |
c2ba9709 JS |
393 | lower_bound(_FIter, _FIter, const _Tp&); |
394 | ||
dc47add7 JW |
395 | template<typename _FIter, typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_FIter), |
396 | typename _Compare> | |
3a66e68a | 397 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 398 | _FIter |
c2ba9709 JS |
399 | lower_bound(_FIter, _FIter, const _Tp&, _Compare); |
400 | ||
401 | template<typename _RAIter> | |
7a91c710 | 402 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 403 | void |
c2ba9709 JS |
404 | make_heap(_RAIter, _RAIter); |
405 | ||
406 | template<typename _RAIter, typename _Compare> | |
7a91c710 | 407 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 408 | void |
c2ba9709 JS |
409 | make_heap(_RAIter, _RAIter, _Compare); |
410 | ||
9a38acdf | 411 | template<typename _Tp> |
8dff34fe | 412 | _GLIBCXX14_CONSTEXPR |
9a38acdf | 413 | const _Tp& |
c2ba9709 JS |
414 | max(const _Tp&, const _Tp&); |
415 | ||
416 | template<typename _Tp, typename _Compare> | |
8dff34fe | 417 | _GLIBCXX14_CONSTEXPR |
9a38acdf | 418 | const _Tp& |
c2ba9709 JS |
419 | max(const _Tp&, const _Tp&, _Compare); |
420 | ||
421 | // max_element | |
422 | // merge | |
423 | ||
9a38acdf | 424 | template<typename _Tp> |
8dff34fe | 425 | _GLIBCXX14_CONSTEXPR |
9a38acdf | 426 | const _Tp& |
c2ba9709 JS |
427 | min(const _Tp&, const _Tp&); |
428 | ||
429 | template<typename _Tp, typename _Compare> | |
8dff34fe | 430 | _GLIBCXX14_CONSTEXPR |
9a38acdf | 431 | const _Tp& |
c2ba9709 JS |
432 | min(const _Tp&, const _Tp&, _Compare); |
433 | ||
434 | // min_element | |
f6547b68 | 435 | |
734f5023 | 436 | #if __cplusplus >= 201103L |
f6547b68 | 437 | template<typename _Tp> |
8dff34fe | 438 | _GLIBCXX14_CONSTEXPR |
9a38acdf | 439 | pair<const _Tp&, const _Tp&> |
f6547b68 PC |
440 | minmax(const _Tp&, const _Tp&); |
441 | ||
442 | template<typename _Tp, typename _Compare> | |
8dff34fe | 443 | _GLIBCXX14_CONSTEXPR |
f6547b68 PC |
444 | pair<const _Tp&, const _Tp&> |
445 | minmax(const _Tp&, const _Tp&, _Compare); | |
446 | ||
447 | template<typename _FIter> | |
8dff34fe | 448 | _GLIBCXX14_CONSTEXPR |
f6547b68 PC |
449 | pair<_FIter, _FIter> |
450 | minmax_element(_FIter, _FIter); | |
451 | ||
452 | template<typename _FIter, typename _Compare> | |
8dff34fe | 453 | _GLIBCXX14_CONSTEXPR |
f6547b68 PC |
454 | pair<_FIter, _FIter> |
455 | minmax_element(_FIter, _FIter, _Compare); | |
1edd1a83 PC |
456 | |
457 | template<typename _Tp> | |
8dff34fe | 458 | _GLIBCXX14_CONSTEXPR |
116a365b | 459 | _Tp |
1edd1a83 PC |
460 | min(initializer_list<_Tp>); |
461 | ||
462 | template<typename _Tp, typename _Compare> | |
8dff34fe | 463 | _GLIBCXX14_CONSTEXPR |
116a365b | 464 | _Tp |
1edd1a83 PC |
465 | min(initializer_list<_Tp>, _Compare); |
466 | ||
467 | template<typename _Tp> | |
8dff34fe | 468 | _GLIBCXX14_CONSTEXPR |
116a365b | 469 | _Tp |
1edd1a83 PC |
470 | max(initializer_list<_Tp>); |
471 | ||
472 | template<typename _Tp, typename _Compare> | |
8dff34fe | 473 | _GLIBCXX14_CONSTEXPR |
116a365b | 474 | _Tp |
1edd1a83 PC |
475 | max(initializer_list<_Tp>, _Compare); |
476 | ||
477 | template<typename _Tp> | |
8dff34fe | 478 | _GLIBCXX14_CONSTEXPR |
116a365b | 479 | pair<_Tp, _Tp> |
1edd1a83 PC |
480 | minmax(initializer_list<_Tp>); |
481 | ||
482 | template<typename _Tp, typename _Compare> | |
8dff34fe | 483 | _GLIBCXX14_CONSTEXPR |
116a365b | 484 | pair<_Tp, _Tp> |
1edd1a83 | 485 | minmax(initializer_list<_Tp>, _Compare); |
f6547b68 PC |
486 | #endif |
487 | ||
c2ba9709 JS |
488 | // mismatch |
489 | ||
490 | template<typename _BIter> | |
7a91c710 | 491 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 492 | bool |
c2ba9709 JS |
493 | next_permutation(_BIter, _BIter); |
494 | ||
495 | template<typename _BIter, typename _Compare> | |
7a91c710 | 496 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 497 | bool |
c2ba9709 JS |
498 | next_permutation(_BIter, _BIter, _Compare); |
499 | ||
734f5023 | 500 | #if __cplusplus >= 201103L |
688a7a07 | 501 | template<typename _IIter, typename _Predicate> |
3a66e68a | 502 | _GLIBCXX20_CONSTEXPR |
688a7a07 PC |
503 | bool |
504 | none_of(_IIter, _IIter, _Predicate); | |
505 | #endif | |
506 | ||
c2ba9709 JS |
507 | // nth_element |
508 | // partial_sort | |
509 | ||
510 | template<typename _IIter, typename _RAIter> | |
7a91c710 | 511 | _GLIBCXX20_CONSTEXPR |
c2ba9709 JS |
512 | _RAIter |
513 | partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); | |
514 | ||
515 | template<typename _IIter, typename _RAIter, typename _Compare> | |
7a91c710 | 516 | _GLIBCXX20_CONSTEXPR |
c2ba9709 JS |
517 | _RAIter |
518 | partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); | |
519 | ||
688a7a07 PC |
520 | // partition |
521 | ||
734f5023 | 522 | #if __cplusplus >= 201103L |
688a7a07 PC |
523 | template<typename _IIter, typename _OIter1, |
524 | typename _OIter2, typename _Predicate> | |
3a66e68a | 525 | _GLIBCXX20_CONSTEXPR |
688a7a07 PC |
526 | pair<_OIter1, _OIter2> |
527 | partition_copy(_IIter, _IIter, _OIter1, _OIter2, _Predicate); | |
d9be9bb3 PC |
528 | |
529 | template<typename _FIter, typename _Predicate> | |
3a66e68a | 530 | _GLIBCXX20_CONSTEXPR |
d9be9bb3 PC |
531 | _FIter |
532 | partition_point(_FIter, _FIter, _Predicate); | |
688a7a07 PC |
533 | #endif |
534 | ||
c2ba9709 | 535 | template<typename _RAIter> |
7a91c710 | 536 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 537 | void |
c2ba9709 JS |
538 | pop_heap(_RAIter, _RAIter); |
539 | ||
540 | template<typename _RAIter, typename _Compare> | |
7a91c710 | 541 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 542 | void |
c2ba9709 JS |
543 | pop_heap(_RAIter, _RAIter, _Compare); |
544 | ||
545 | template<typename _BIter> | |
7a91c710 | 546 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 547 | bool |
c2ba9709 JS |
548 | prev_permutation(_BIter, _BIter); |
549 | ||
550 | template<typename _BIter, typename _Compare> | |
7a91c710 | 551 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 552 | bool |
c2ba9709 JS |
553 | prev_permutation(_BIter, _BIter, _Compare); |
554 | ||
555 | template<typename _RAIter> | |
7a91c710 | 556 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 557 | void |
c2ba9709 JS |
558 | push_heap(_RAIter, _RAIter); |
559 | ||
560 | template<typename _RAIter, typename _Compare> | |
7a91c710 | 561 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 562 | void |
c2ba9709 JS |
563 | push_heap(_RAIter, _RAIter, _Compare); |
564 | ||
565 | // random_shuffle | |
566 | ||
dc47add7 | 567 | template<typename _FIter, typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_FIter)> |
3a66e68a | 568 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 569 | _FIter |
c2ba9709 JS |
570 | remove(_FIter, _FIter, const _Tp&); |
571 | ||
572 | template<typename _FIter, typename _Predicate> | |
3a66e68a | 573 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 574 | _FIter |
c2ba9709 JS |
575 | remove_if(_FIter, _FIter, _Predicate); |
576 | ||
dc47add7 JW |
577 | template<typename _IIter, typename _OIter, |
578 | typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_IIter)> | |
3a66e68a | 579 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 580 | _OIter |
c2ba9709 JS |
581 | remove_copy(_IIter, _IIter, _OIter, const _Tp&); |
582 | ||
583 | template<typename _IIter, typename _OIter, typename _Predicate> | |
3a66e68a | 584 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 585 | _OIter |
c2ba9709 JS |
586 | remove_copy_if(_IIter, _IIter, _OIter, _Predicate); |
587 | ||
588 | // replace | |
589 | ||
590 | template<typename _IIter, typename _OIter, typename _Tp> | |
3a66e68a | 591 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 592 | _OIter |
c2ba9709 JS |
593 | replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); |
594 | ||
dc47add7 JW |
595 | template<typename _Iter, typename _OIter, typename _Predicate, |
596 | typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_OIter)> | |
3a66e68a | 597 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 598 | _OIter |
c2ba9709 JS |
599 | replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); |
600 | ||
601 | // replace_if | |
602 | ||
603 | template<typename _BIter> | |
7a91c710 | 604 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 605 | void |
c2ba9709 JS |
606 | reverse(_BIter, _BIter); |
607 | ||
608 | template<typename _BIter, typename _OIter> | |
3a66e68a | 609 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 610 | _OIter |
c2ba9709 JS |
611 | reverse_copy(_BIter, _BIter, _OIter); |
612 | ||
e4905f11 JW |
613 | _GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE(_V2) |
614 | ||
615 | template<typename _FIter> | |
616 | _GLIBCXX20_CONSTEXPR | |
617 | _FIter | |
618 | rotate(_FIter, _FIter, _FIter); | |
619 | ||
620 | _GLIBCXX_END_INLINE_ABI_NAMESPACE(_V2) | |
c2ba9709 JS |
621 | |
622 | template<typename _FIter, typename _OIter> | |
3a66e68a | 623 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 624 | _OIter |
4f99f3d0 | 625 | rotate_copy(_FIter, _FIter, _FIter, _OIter); |
c2ba9709 JS |
626 | |
627 | // search | |
628 | // search_n | |
629 | // set_difference | |
630 | // set_intersection | |
631 | // set_symmetric_difference | |
632 | // set_union | |
633 | ||
6d664515 | 634 | #if __cplusplus >= 201103L |
247d8075 PC |
635 | template<typename _RAIter, typename _UGenerator> |
636 | void | |
633e8e19 | 637 | shuffle(_RAIter, _RAIter, _UGenerator&&); |
247d8075 PC |
638 | #endif |
639 | ||
c2ba9709 | 640 | template<typename _RAIter> |
7a91c710 | 641 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 642 | void |
c2ba9709 JS |
643 | sort_heap(_RAIter, _RAIter); |
644 | ||
645 | template<typename _RAIter, typename _Compare> | |
7a91c710 | 646 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 647 | void |
c2ba9709 JS |
648 | sort_heap(_RAIter, _RAIter, _Compare); |
649 | ||
18f176d0 | 650 | #if _GLIBCXX_HOSTED |
c2ba9709 | 651 | template<typename _BIter, typename _Predicate> |
aba3018a | 652 | _GLIBCXX26_CONSTEXPR |
9a38acdf | 653 | _BIter |
c2ba9709 | 654 | stable_partition(_BIter, _BIter, _Predicate); |
18f176d0 | 655 | #endif |
c2ba9709 | 656 | |
ddb63209 VV |
657 | #if __cplusplus < 201103L |
658 | // For C++11 swap() is declared in <type_traits>. | |
c2ba9709 | 659 | |
caa8b3c6 | 660 | template<typename _Tp, size_t _Nm> |
7a91c710 | 661 | _GLIBCXX20_CONSTEXPR |
ddb63209 VV |
662 | inline void |
663 | swap(_Tp& __a, _Tp& __b); | |
664 | ||
665 | template<typename _Tp, size_t _Nm> | |
7a91c710 | 666 | _GLIBCXX20_CONSTEXPR |
ddb63209 VV |
667 | inline void |
668 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]); | |
ccb4f5a7 | 669 | #endif |
caa8b3c6 | 670 | |
c2ba9709 | 671 | template<typename _FIter1, typename _FIter2> |
7a91c710 | 672 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 673 | _FIter2 |
4f99f3d0 | 674 | swap_ranges(_FIter1, _FIter1, _FIter2); |
c2ba9709 JS |
675 | |
676 | // transform | |
677 | ||
678 | template<typename _FIter> | |
3a66e68a | 679 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 680 | _FIter |
c2ba9709 JS |
681 | unique(_FIter, _FIter); |
682 | ||
683 | template<typename _FIter, typename _BinaryPredicate> | |
3a66e68a | 684 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 685 | _FIter |
c2ba9709 JS |
686 | unique(_FIter, _FIter, _BinaryPredicate); |
687 | ||
688 | // unique_copy | |
689 | ||
dc47add7 | 690 | template<typename _FIter, typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_FIter)> |
3a66e68a | 691 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 692 | _FIter |
c2ba9709 JS |
693 | upper_bound(_FIter, _FIter, const _Tp&); |
694 | ||
dc47add7 JW |
695 | template<typename _FIter, typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_FIter), |
696 | typename _Compare> | |
3a66e68a | 697 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 698 | _FIter |
c2ba9709 JS |
699 | upper_bound(_FIter, _FIter, const _Tp&, _Compare); |
700 | ||
12ffa228 | 701 | _GLIBCXX_BEGIN_NAMESPACE_ALGO |
c2ba9709 JS |
702 | |
703 | template<typename _FIter> | |
3a66e68a | 704 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 705 | _FIter |
c2ba9709 JS |
706 | adjacent_find(_FIter, _FIter); |
707 | ||
708 | template<typename _FIter, typename _BinaryPredicate> | |
3a66e68a | 709 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 710 | _FIter |
c2ba9709 JS |
711 | adjacent_find(_FIter, _FIter, _BinaryPredicate); |
712 | ||
dc47add7 | 713 | template<typename _IIter, typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_IIter)> |
3a66e68a | 714 | _GLIBCXX20_CONSTEXPR |
c2ba9709 JS |
715 | typename iterator_traits<_IIter>::difference_type |
716 | count(_IIter, _IIter, const _Tp&); | |
717 | ||
718 | template<typename _IIter, typename _Predicate> | |
3a66e68a | 719 | _GLIBCXX20_CONSTEXPR |
c2ba9709 JS |
720 | typename iterator_traits<_IIter>::difference_type |
721 | count_if(_IIter, _IIter, _Predicate); | |
722 | ||
723 | template<typename _IIter1, typename _IIter2> | |
3a66e68a | 724 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 725 | bool |
c2ba9709 JS |
726 | equal(_IIter1, _IIter1, _IIter2); |
727 | ||
728 | template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> | |
3a66e68a | 729 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 730 | bool |
c2ba9709 JS |
731 | equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); |
732 | ||
dc47add7 | 733 | template<typename _IIter, typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_IIter)> |
3a66e68a | 734 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 735 | _IIter |
c2ba9709 JS |
736 | find(_IIter, _IIter, const _Tp&); |
737 | ||
c2ba9709 | 738 | template<typename _FIter1, typename _FIter2> |
3a66e68a | 739 | _GLIBCXX20_CONSTEXPR |
c2ba9709 JS |
740 | _FIter1 |
741 | find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); | |
742 | ||
743 | template<typename _FIter1, typename _FIter2, typename _BinaryPredicate> | |
3a66e68a | 744 | _GLIBCXX20_CONSTEXPR |
c2ba9709 JS |
745 | _FIter1 |
746 | find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); | |
747 | ||
748 | template<typename _IIter, typename _Predicate> | |
3a66e68a | 749 | _GLIBCXX20_CONSTEXPR |
76cc1b70 | 750 | _IIter |
c2ba9709 JS |
751 | find_if(_IIter, _IIter, _Predicate); |
752 | ||
753 | template<typename _IIter, typename _Funct> | |
3a66e68a | 754 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 755 | _Funct |
c2ba9709 JS |
756 | for_each(_IIter, _IIter, _Funct); |
757 | ||
758 | template<typename _FIter, typename _Generator> | |
3a66e68a | 759 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 760 | void |
c2ba9709 JS |
761 | generate(_FIter, _FIter, _Generator); |
762 | ||
763 | template<typename _OIter, typename _Size, typename _Generator> | |
3a66e68a | 764 | _GLIBCXX20_CONSTEXPR |
4f99f3d0 | 765 | _OIter |
c2ba9709 JS |
766 | generate_n(_OIter, _Size, _Generator); |
767 | ||
768 | template<typename _IIter1, typename _IIter2> | |
3a66e68a | 769 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 770 | bool |
c2ba9709 JS |
771 | lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); |
772 | ||
773 | template<typename _IIter1, typename _IIter2, typename _Compare> | |
3a66e68a | 774 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 775 | bool |
c2ba9709 JS |
776 | lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); |
777 | ||
778 | template<typename _FIter> | |
8dff34fe | 779 | _GLIBCXX14_CONSTEXPR |
9a38acdf | 780 | _FIter |
c2ba9709 JS |
781 | max_element(_FIter, _FIter); |
782 | ||
783 | template<typename _FIter, typename _Compare> | |
8dff34fe | 784 | _GLIBCXX14_CONSTEXPR |
9a38acdf | 785 | _FIter |
c2ba9709 JS |
786 | max_element(_FIter, _FIter, _Compare); |
787 | ||
788 | template<typename _IIter1, typename _IIter2, typename _OIter> | |
3a66e68a | 789 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 790 | _OIter |
c2ba9709 JS |
791 | merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); |
792 | ||
9a38acdf | 793 | template<typename _IIter1, typename _IIter2, typename _OIter, |
c2ba9709 | 794 | typename _Compare> |
3a66e68a | 795 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 796 | _OIter |
c2ba9709 JS |
797 | merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); |
798 | ||
799 | template<typename _FIter> | |
8dff34fe | 800 | _GLIBCXX14_CONSTEXPR |
9a38acdf | 801 | _FIter |
c2ba9709 JS |
802 | min_element(_FIter, _FIter); |
803 | ||
804 | template<typename _FIter, typename _Compare> | |
8dff34fe | 805 | _GLIBCXX14_CONSTEXPR |
9a38acdf | 806 | _FIter |
c2ba9709 JS |
807 | min_element(_FIter, _FIter, _Compare); |
808 | ||
809 | template<typename _IIter1, typename _IIter2> | |
3a66e68a | 810 | _GLIBCXX20_CONSTEXPR |
c2ba9709 JS |
811 | pair<_IIter1, _IIter2> |
812 | mismatch(_IIter1, _IIter1, _IIter2); | |
813 | ||
814 | template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> | |
3a66e68a | 815 | _GLIBCXX20_CONSTEXPR |
c2ba9709 JS |
816 | pair<_IIter1, _IIter2> |
817 | mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); | |
818 | ||
819 | template<typename _RAIter> | |
7a91c710 | 820 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 821 | void |
c2ba9709 JS |
822 | nth_element(_RAIter, _RAIter, _RAIter); |
823 | ||
824 | template<typename _RAIter, typename _Compare> | |
7a91c710 | 825 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 826 | void |
c2ba9709 JS |
827 | nth_element(_RAIter, _RAIter, _RAIter, _Compare); |
828 | ||
829 | template<typename _RAIter> | |
7a91c710 | 830 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 831 | void |
c2ba9709 JS |
832 | partial_sort(_RAIter, _RAIter, _RAIter); |
833 | ||
834 | template<typename _RAIter, typename _Compare> | |
7a91c710 | 835 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 836 | void |
c2ba9709 JS |
837 | partial_sort(_RAIter, _RAIter, _RAIter, _Compare); |
838 | ||
839 | template<typename _BIter, typename _Predicate> | |
7a91c710 | 840 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 841 | _BIter |
c2ba9709 JS |
842 | partition(_BIter, _BIter, _Predicate); |
843 | ||
18f176d0 | 844 | #if _GLIBCXX_HOSTED |
c2ba9709 | 845 | template<typename _RAIter> |
c01b344e | 846 | _GLIBCXX14_DEPRECATED_SUGGEST("std::shuffle") |
9a38acdf | 847 | void |
c2ba9709 JS |
848 | random_shuffle(_RAIter, _RAIter); |
849 | ||
850 | template<typename _RAIter, typename _Generator> | |
c01b344e | 851 | _GLIBCXX14_DEPRECATED_SUGGEST("std::shuffle") |
9a38acdf | 852 | void |
247d8075 | 853 | random_shuffle(_RAIter, _RAIter, |
734f5023 | 854 | #if __cplusplus >= 201103L |
247d8075 PC |
855 | _Generator&&); |
856 | #else | |
857 | _Generator&); | |
858 | #endif | |
18f176d0 | 859 | #endif // HOSTED |
c2ba9709 | 860 | |
dc47add7 | 861 | template<typename _FIter, typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_FIter)> |
3a66e68a | 862 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 863 | void |
c2ba9709 JS |
864 | replace(_FIter, _FIter, const _Tp&, const _Tp&); |
865 | ||
dc47add7 JW |
866 | template<typename _FIter, typename _Predicate, |
867 | typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_FIter)> | |
3a66e68a | 868 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 869 | void |
c2ba9709 JS |
870 | replace_if(_FIter, _FIter, _Predicate, const _Tp&); |
871 | ||
872 | template<typename _FIter1, typename _FIter2> | |
3a66e68a | 873 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 874 | _FIter1 |
c2ba9709 JS |
875 | search(_FIter1, _FIter1, _FIter2, _FIter2); |
876 | ||
877 | template<typename _FIter1, typename _FIter2, typename _BinaryPredicate> | |
3a66e68a | 878 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 879 | _FIter1 |
c2ba9709 JS |
880 | search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); |
881 | ||
dc47add7 JW |
882 | template<typename _FIter, typename _Size, |
883 | typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_FIter)> | |
3a66e68a | 884 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 885 | _FIter |
c2ba9709 JS |
886 | search_n(_FIter, _FIter, _Size, const _Tp&); |
887 | ||
dc47add7 JW |
888 | template<typename _FIter, typename _Size, |
889 | typename _Tp _GLIBCXX26_ALGO_DEF_VAL_T(_FIter), | |
c2ba9709 | 890 | typename _BinaryPredicate> |
3a66e68a | 891 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 892 | _FIter |
c2ba9709 JS |
893 | search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); |
894 | ||
895 | template<typename _IIter1, typename _IIter2, typename _OIter> | |
3a66e68a | 896 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 897 | _OIter |
c2ba9709 JS |
898 | set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); |
899 | ||
9a38acdf | 900 | template<typename _IIter1, typename _IIter2, typename _OIter, |
c2ba9709 | 901 | typename _Compare> |
3a66e68a | 902 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 903 | _OIter |
c2ba9709 JS |
904 | set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); |
905 | ||
906 | template<typename _IIter1, typename _IIter2, typename _OIter> | |
3a66e68a | 907 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 908 | _OIter |
c2ba9709 JS |
909 | set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); |
910 | ||
911 | template<typename _IIter1, typename _IIter2, typename _OIter, | |
912 | typename _Compare> | |
3a66e68a | 913 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 914 | _OIter |
c2ba9709 JS |
915 | set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); |
916 | ||
917 | template<typename _IIter1, typename _IIter2, typename _OIter> | |
3a66e68a | 918 | _GLIBCXX20_CONSTEXPR |
c2ba9709 JS |
919 | _OIter |
920 | set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); | |
921 | ||
9a38acdf | 922 | template<typename _IIter1, typename _IIter2, typename _OIter, |
c2ba9709 | 923 | typename _Compare> |
3a66e68a | 924 | _GLIBCXX20_CONSTEXPR |
c2ba9709 | 925 | _OIter |
9a38acdf | 926 | set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, |
c2ba9709 JS |
927 | _OIter, _Compare); |
928 | ||
929 | template<typename _IIter1, typename _IIter2, typename _OIter> | |
3a66e68a | 930 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 931 | _OIter |
c2ba9709 JS |
932 | set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); |
933 | ||
934 | template<typename _IIter1, typename _IIter2, typename _OIter, | |
935 | typename _Compare> | |
3a66e68a | 936 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 937 | _OIter |
c2ba9709 JS |
938 | set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); |
939 | ||
940 | template<typename _RAIter> | |
7a91c710 | 941 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 942 | void |
c2ba9709 JS |
943 | sort(_RAIter, _RAIter); |
944 | ||
945 | template<typename _RAIter, typename _Compare> | |
7a91c710 | 946 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 947 | void |
c2ba9709 JS |
948 | sort(_RAIter, _RAIter, _Compare); |
949 | ||
950 | template<typename _RAIter> | |
ff43f985 | 951 | _GLIBCXX26_CONSTEXPR |
9a38acdf | 952 | void |
c2ba9709 JS |
953 | stable_sort(_RAIter, _RAIter); |
954 | ||
955 | template<typename _RAIter, typename _Compare> | |
ff43f985 | 956 | _GLIBCXX26_CONSTEXPR |
9a38acdf | 957 | void |
c2ba9709 JS |
958 | stable_sort(_RAIter, _RAIter, _Compare); |
959 | ||
960 | template<typename _IIter, typename _OIter, typename _UnaryOperation> | |
3a66e68a | 961 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 962 | _OIter |
c2ba9709 JS |
963 | transform(_IIter, _IIter, _OIter, _UnaryOperation); |
964 | ||
9a38acdf | 965 | template<typename _IIter1, typename _IIter2, typename _OIter, |
c2ba9709 | 966 | typename _BinaryOperation> |
3a66e68a | 967 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 968 | _OIter |
c2ba9709 JS |
969 | transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); |
970 | ||
971 | template<typename _IIter, typename _OIter> | |
3a66e68a | 972 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 973 | _OIter |
c2ba9709 JS |
974 | unique_copy(_IIter, _IIter, _OIter); |
975 | ||
976 | template<typename _IIter, typename _OIter, typename _BinaryPredicate> | |
3a66e68a | 977 | _GLIBCXX20_CONSTEXPR |
9a38acdf | 978 | _OIter |
c2ba9709 JS |
979 | unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); |
980 | ||
12ffa228 | 981 | _GLIBCXX_END_NAMESPACE_ALGO |
4a15d842 | 982 | _GLIBCXX_END_NAMESPACE_VERSION |
12ffa228 | 983 | } // namespace std |
c2ba9709 | 984 | |
d3a7302e JM |
985 | #pragma GCC diagnostic pop |
986 | ||
7c3e9502 | 987 | #ifdef _GLIBCXX_PARALLEL |
c2ba9709 JS |
988 | # include <parallel/algorithmfwd.h> |
989 | #endif | |
990 | ||
991 | #endif | |
992 |