2 //===----------------------------------------------------------------------===//
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
8 //===----------------------------------------------------------------------===//
10 export namespace std {
12 // [algorithms.results], algorithm result types
13 using std::ranges::in_found_result;
14 using std::ranges::in_fun_result;
15 using std::ranges::in_in_out_result;
16 using std::ranges::in_in_result;
17 using std::ranges::in_out_out_result;
18 using std::ranges::in_out_result;
19 #if _LIBCPP_STD_VER >= 23
20 using std::ranges::in_value_result;
22 using std::ranges::min_max_result;
23 // using std::ranges::out_value_result;
26 // [alg.nonmodifying], non-modifying sequence operations
27 // [alg.all.of], all of
30 using std::ranges::all_of;
33 // [alg.any.of], any of
36 using std::ranges::any_of;
39 // [alg.none.of], none of
42 using std::ranges::none_of;
45 #if _LIBCPP_STD_VER >= 23
46 // [alg.contains], contains
48 using std::ranges::contains;
49 using std::ranges::contains_subrange;
51 #endif // _LIBCPP_STD_VER >= 23
53 // [alg.foreach], for each
57 using std::ranges::for_each;
58 using std::ranges::for_each_result;
61 using std::for_each_n;
64 using std::ranges::for_each_n_result;
66 using std::ranges::for_each_n;
72 using std::find_if_not;
75 using std::ranges::find;
76 using std::ranges::find_if;
77 using std::ranges::find_if_not;
80 #if _LIBCPP_STD_VER >= 23
81 // [alg.find.last], find last
83 using std::ranges::find_last;
84 using std::ranges::find_last_if;
85 using std::ranges::find_last_if_not;
89 // [alg.find.end], find end
93 using std::ranges::find_end;
96 // [alg.find.first.of], find first
97 using std::find_first_of;
100 using std::ranges::find_first_of;
103 // [alg.adjacent.find], adjacent find
104 using std::adjacent_find;
107 using std::ranges::adjacent_find;
110 // [alg.count], count
115 using std::ranges::count;
116 using std::ranges::count_if;
117 } // namespace ranges
119 // [mismatch], mismatch
123 using std::ranges::mismatch_result;
125 using std::ranges::mismatch;
126 } // namespace ranges
128 // [alg.equal], equal
132 using std::ranges::equal;
135 // [alg.is.permutation], is permutation
136 using std::is_permutation;
139 using std::ranges::is_permutation;
142 // [alg.search], search
146 using std::ranges::search;
152 using std::ranges::search_n;
156 #if _LIBCPP_STD_VER >= 23
157 // [alg.starts.with], starts with
158 using std::ranges::starts_with;
160 // [alg.ends.with], ends with
161 using std::ranges::ends_with;
164 using std::ranges::fold_left;
165 using std::ranges::fold_left_with_iter;
166 using std::ranges::fold_left_with_iter_result;
168 using std::ranges::fold_left_first;
169 using std::ranges::fold_right;
170 using std::ranges::fold_right_last;
171 using std::ranges::fold_left_with_iter;
172 using std::ranges::fold_left_first_with_iter;
173 using std::ranges::fold_left_first_with_iter;
175 #endif // _LIBCPP_STD_VER >= 23
176 } // namespace ranges
178 // [alg.modifying.operations], mutating sequence operations
183 using std::ranges::copy;
184 using std::ranges::copy_result;
185 } // namespace ranges
190 using std::ranges::copy_n;
191 using std::ranges::copy_n_result;
192 } // namespace ranges
197 using std::ranges::copy_if;
198 using std::ranges::copy_if_result;
199 } // namespace ranges
201 using std::copy_backward;
204 using std::ranges::copy_backward;
205 using std::ranges::copy_backward_result;
206 } // namespace ranges
212 using std::ranges::move;
213 using std::ranges::move_result;
214 } // namespace ranges
216 using std::move_backward;
219 using std::ranges::move_backward;
220 using std::ranges::move_backward_result;
221 } // namespace ranges
224 using std::swap_ranges;
227 using std::ranges::swap_ranges;
228 using std::ranges::swap_ranges_result;
229 } // namespace ranges
231 using std::iter_swap;
233 // [alg.transform], transform
234 using std::transform;
237 using std::ranges::binary_transform_result;
238 using std::ranges::unary_transform_result;
240 using std::ranges::transform;
242 } // namespace ranges
245 using std::replace_if;
248 using std::ranges::replace;
249 using std::ranges::replace_if;
250 } // namespace ranges
252 using std::replace_copy;
253 using std::replace_copy_if;
256 using std::ranges::replace_copy;
257 using std::ranges::replace_copy_if;
258 using std::ranges::replace_copy_if_result;
259 using std::ranges::replace_copy_result;
260 } // namespace ranges
267 using std::ranges::fill;
268 using std::ranges::fill_n;
269 } // namespace ranges
271 // [alg.generate], generate
273 using std::generate_n;
276 using std::ranges::generate;
277 using std::ranges::generate_n;
278 } // namespace ranges
280 // [alg.remove], remove
282 using std::remove_if;
285 using std::ranges::remove;
286 using std::ranges::remove_if;
287 } // namespace ranges
289 using std::remove_copy;
290 using std::remove_copy_if;
292 using std::ranges::remove_copy;
293 using std::ranges::remove_copy_if;
294 using std::ranges::remove_copy_if_result;
295 using std::ranges::remove_copy_result;
296 } // namespace ranges
298 // [alg.unique], unique
302 using std::ranges::unique;
305 using std::unique_copy;
308 using std::ranges::unique_copy;
309 using std::ranges::unique_copy_result;
310 } // namespace ranges
312 // [alg.reverse], reverse
316 using std::ranges::reverse;
319 using std::reverse_copy;
322 using std::ranges::reverse_copy;
323 using std::ranges::reverse_copy_result;
324 } // namespace ranges
326 // [alg.rotate], rotate
330 using std::ranges::rotate;
333 using std::rotate_copy;
336 using std::ranges::rotate_copy;
337 using std::ranges::rotate_copy_result;
338 } // namespace ranges
340 // [alg.random.sample], sample
344 using std::ranges::sample;
347 // [alg.random.shuffle], shuffle
351 using std::ranges::shuffle;
354 // [alg.shift], shift
355 using std::shift_left;
358 // using std::ranges::shift_left;
361 using std::shift_right;
364 // using std::ranges::shift_right;
367 // [alg.sorting], sorting and related operations
368 // [alg.sort], sorting
372 using std::ranges::sort;
375 using std::stable_sort;
378 using std::ranges::stable_sort;
381 using std::partial_sort;
384 using std::ranges::partial_sort;
386 using std::partial_sort_copy;
389 using std::ranges::partial_sort_copy;
390 using std::ranges::partial_sort_copy_result;
391 } // namespace ranges
393 using std::is_sorted;
394 using std::is_sorted_until;
397 using std::ranges::is_sorted;
398 using std::ranges::is_sorted_until;
399 } // namespace ranges
401 // [alg.nth.element], Nth element
402 using std::nth_element;
405 using std::ranges::nth_element;
408 // [alg.binary.search], binary search
409 using std::lower_bound;
412 using std::ranges::lower_bound;
415 using std::upper_bound;
418 using std::ranges::upper_bound;
421 using std::equal_range;
424 using std::ranges::equal_range;
427 using std::binary_search;
430 using std::ranges::binary_search;
433 // [alg.partitions], partitions
434 using std::is_partitioned;
437 using std::ranges::is_partitioned;
440 using std::partition;
443 using std::ranges::partition;
446 using std::stable_partition;
449 using std::ranges::stable_partition;
452 using std::partition_copy;
455 using std::ranges::partition_copy;
456 using std::ranges::partition_copy_result;
457 } // namespace ranges
459 using std::partition_point;
462 using std::ranges::partition_point;
464 // [alg.merge], merge
467 using std::ranges::merge;
468 using std::ranges::merge_result;
469 } // namespace ranges
471 using std::inplace_merge;
474 using std::ranges::inplace_merge;
477 // [alg.set.operations], set operations
480 using std::ranges::includes;
483 using std::set_union;
486 using std::ranges::set_union;
487 using std::ranges::set_union_result;
488 } // namespace ranges
490 using std::set_intersection;
492 using std::ranges::set_intersection;
493 using std::ranges::set_intersection_result;
494 } // namespace ranges
496 using std::set_difference;
499 using std::ranges::set_difference;
500 using std::ranges::set_difference_result;
501 } // namespace ranges
503 using std::set_symmetric_difference;
506 using std::ranges::set_symmetric_difference_result;
508 using std::ranges::set_symmetric_difference;
509 } // namespace ranges
511 // [alg.heap.operations], heap operations
512 using std::push_heap;
515 using std::ranges::push_heap;
521 using std::ranges::pop_heap;
524 using std::make_heap;
527 using std::ranges::make_heap;
530 using std::sort_heap;
533 using std::ranges::sort_heap;
539 using std::ranges::is_heap;
542 using std::is_heap_until;
545 using std::ranges::is_heap_until;
548 // [alg.min.max], minimum and maximum
552 using std::ranges::min;
558 using std::ranges::max;
564 using std::ranges::minmax_result;
566 using std::ranges::minmax;
567 } // namespace ranges
569 using std::min_element;
572 using std::ranges::min_element;
575 using std::max_element;
578 using std::ranges::max_element;
581 using std::minmax_element;
584 using std::ranges::minmax_element_result;
586 using std::ranges::minmax_element;
587 } // namespace ranges
588 // [alg.clamp], bounded value
592 using std::ranges::clamp;
595 // [alg.lex.comparison], lexicographical comparison
596 using std::lexicographical_compare;
599 using std::ranges::lexicographical_compare;
602 // [alg.three.way], three-way comparison algorithms
603 using std::lexicographical_compare_three_way;
605 // [alg.permutation.generators], permutations
606 using std::next_permutation;
609 using std::ranges::next_permutation_result;
611 using std::ranges::next_permutation;
612 } // namespace ranges
614 using std::prev_permutation;
617 using std::ranges::prev_permutation_result;
619 using std::ranges::prev_permutation;
620 } // namespace ranges