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 // using std::ranges::in_value_result;
20 using std::ranges::min_max_result;
21 // using std::ranges::out_value_result;
24 // [alg.nonmodifying], non-modifying sequence operations
25 // [alg.all.of], all of
28 using std::ranges::all_of;
31 // [alg.any.of], any of
34 using std::ranges::any_of;
37 // [alg.none.of], none of
40 using std::ranges::none_of;
43 // [alg.contains], contains
46 using std::ranges::contains;
47 using std::ranges::contains_subrange;
51 // [alg.foreach], for each
55 using std::ranges::for_each;
56 using std::ranges::for_each_result;
59 using std::for_each_n;
62 using std::ranges::for_each_n_result;
64 using std::ranges::for_each_n;
70 using std::find_if_not;
73 using std::ranges::find;
74 using std::ranges::find_if;
75 using std::ranges::find_if_not;
80 using std::ranges::find_last;
81 using std::ranges::find_last_if;
82 using std::ranges::find_last_if_not;
86 // [alg.find.end], find end
90 using std::ranges::find_end;
93 // [alg.find.first.of], find first
94 using std::find_first_of;
97 using std::ranges::find_first_of;
100 // [alg.adjacent.find], adjacent find
101 using std::adjacent_find;
104 using std::ranges::adjacent_find;
107 // [alg.count], count
112 using std::ranges::count;
113 using std::ranges::count_if;
114 } // namespace ranges
116 // [mismatch], mismatch
120 using std::ranges::mismatch_result;
122 using std::ranges::mismatch;
123 } // namespace ranges
125 // [alg.equal], equal
129 using std::ranges::equal;
132 // [alg.is.permutation], is permutation
133 using std::is_permutation;
136 using std::ranges::is_permutation;
139 // [alg.search], search
143 using std::ranges::search;
149 using std::ranges::search_n;
153 #if _LIBCPP_STD_VER >= 23
154 // [alg.starts.with], starts with
155 using std::ranges::starts_with;
157 // [alg.ends.with], ends with
158 using std::ranges::ends_with;
162 using std::ranges::fold_left;
163 using std::ranges::fold_left_first;
164 using std::ranges::fold_right;
165 using std::ranges::fold_right_last;
166 using std::ranges::fold_left_with_iter;
167 using std::ranges::fold_left_with_iter_result;
168 using std::ranges::fold_left_with_iter;
169 using std::ranges::fold_left_first_with_iter;
170 using std::ranges::fold_left_first_with_iter;
172 #endif // _LIBCPP_STD_VER >= 23
173 } // namespace ranges
175 // [alg.modifying.operations], mutating sequence operations
180 using std::ranges::copy;
181 using std::ranges::copy_result;
182 } // namespace ranges
187 using std::ranges::copy_n;
188 using std::ranges::copy_n_result;
189 } // namespace ranges
194 using std::ranges::copy_if;
195 using std::ranges::copy_if_result;
196 } // namespace ranges
198 using std::copy_backward;
201 using std::ranges::copy_backward;
202 using std::ranges::copy_backward_result;
203 } // namespace ranges
209 using std::ranges::move;
210 using std::ranges::move_result;
211 } // namespace ranges
213 using std::move_backward;
216 using std::ranges::move_backward;
217 using std::ranges::move_backward_result;
218 } // namespace ranges
221 using std::swap_ranges;
224 using std::ranges::swap_ranges;
225 using std::ranges::swap_ranges_result;
226 } // namespace ranges
228 using std::iter_swap;
230 // [alg.transform], transform
231 using std::transform;
234 using std::ranges::binary_transform_result;
235 using std::ranges::unary_transform_result;
237 using std::ranges::transform;
239 } // namespace ranges
242 using std::replace_if;
245 using std::ranges::replace;
246 using std::ranges::replace_if;
247 } // namespace ranges
249 using std::replace_copy;
250 using std::replace_copy_if;
253 using std::ranges::replace_copy;
254 using std::ranges::replace_copy_if;
255 using std::ranges::replace_copy_if_result;
256 using std::ranges::replace_copy_result;
257 } // namespace ranges
264 using std::ranges::fill;
265 using std::ranges::fill_n;
266 } // namespace ranges
268 // [alg.generate], generate
270 using std::generate_n;
273 using std::ranges::generate;
274 using std::ranges::generate_n;
275 } // namespace ranges
277 // [alg.remove], remove
279 using std::remove_if;
282 using std::ranges::remove;
283 using std::ranges::remove_if;
284 } // namespace ranges
286 using std::remove_copy;
287 using std::remove_copy_if;
289 using std::ranges::remove_copy;
290 using std::ranges::remove_copy_if;
291 using std::ranges::remove_copy_if_result;
292 using std::ranges::remove_copy_result;
293 } // namespace ranges
295 // [alg.unique], unique
299 using std::ranges::unique;
302 using std::unique_copy;
305 using std::ranges::unique_copy;
306 using std::ranges::unique_copy_result;
307 } // namespace ranges
309 // [alg.reverse], reverse
313 using std::ranges::reverse;
316 using std::reverse_copy;
319 using std::ranges::reverse_copy;
320 using std::ranges::reverse_copy_result;
321 } // namespace ranges
323 // [alg.rotate], rotate
327 using std::ranges::rotate;
330 using std::rotate_copy;
333 using std::ranges::rotate_copy;
334 using std::ranges::rotate_copy_result;
335 } // namespace ranges
337 // [alg.random.sample], sample
341 using std::ranges::sample;
344 // [alg.random.shuffle], shuffle
348 using std::ranges::shuffle;
351 // [alg.shift], shift
352 using std::shift_left;
355 // using std::ranges::shift_left;
358 using std::shift_right;
361 // using std::ranges::shift_right;
364 // [alg.sorting], sorting and related operations
365 // [alg.sort], sorting
369 using std::ranges::sort;
372 using std::stable_sort;
375 using std::ranges::stable_sort;
378 using std::partial_sort;
381 using std::ranges::partial_sort;
383 using std::partial_sort_copy;
386 using std::ranges::partial_sort_copy;
387 using std::ranges::partial_sort_copy_result;
388 } // namespace ranges
390 using std::is_sorted;
391 using std::is_sorted_until;
394 using std::ranges::is_sorted;
395 using std::ranges::is_sorted_until;
396 } // namespace ranges
398 // [alg.nth.element], Nth element
399 using std::nth_element;
402 using std::ranges::nth_element;
405 // [alg.binary.search], binary search
406 using std::lower_bound;
409 using std::ranges::lower_bound;
412 using std::upper_bound;
415 using std::ranges::upper_bound;
418 using std::equal_range;
421 using std::ranges::equal_range;
424 using std::binary_search;
427 using std::ranges::binary_search;
430 // [alg.partitions], partitions
431 using std::is_partitioned;
434 using std::ranges::is_partitioned;
437 using std::partition;
440 using std::ranges::partition;
443 using std::stable_partition;
446 using std::ranges::stable_partition;
449 using std::partition_copy;
452 using std::ranges::partition_copy;
453 using std::ranges::partition_copy_result;
454 } // namespace ranges
456 using std::partition_point;
459 using std::ranges::partition_point;
461 // [alg.merge], merge
464 using std::ranges::merge;
465 using std::ranges::merge_result;
466 } // namespace ranges
468 using std::inplace_merge;
471 using std::ranges::inplace_merge;
474 // [alg.set.operations], set operations
477 using std::ranges::includes;
480 using std::set_union;
483 using std::ranges::set_union;
484 using std::ranges::set_union_result;
485 } // namespace ranges
487 using std::set_intersection;
489 using std::ranges::set_intersection;
490 using std::ranges::set_intersection_result;
491 } // namespace ranges
493 using std::set_difference;
496 using std::ranges::set_difference;
497 using std::ranges::set_difference_result;
498 } // namespace ranges
500 using std::set_symmetric_difference;
503 using std::ranges::set_symmetric_difference_result;
505 using std::ranges::set_symmetric_difference;
506 } // namespace ranges
508 // [alg.heap.operations], heap operations
509 using std::push_heap;
512 using std::ranges::push_heap;
518 using std::ranges::pop_heap;
521 using std::make_heap;
524 using std::ranges::make_heap;
527 using std::sort_heap;
530 using std::ranges::sort_heap;
536 using std::ranges::is_heap;
539 using std::is_heap_until;
542 using std::ranges::is_heap_until;
545 // [alg.min.max], minimum and maximum
549 using std::ranges::min;
555 using std::ranges::max;
561 using std::ranges::minmax_result;
563 using std::ranges::minmax;
564 } // namespace ranges
566 using std::min_element;
569 using std::ranges::min_element;
572 using std::max_element;
575 using std::ranges::max_element;
578 using std::minmax_element;
581 using std::ranges::minmax_element_result;
583 using std::ranges::minmax_element;
584 } // namespace ranges
585 // [alg.clamp], bounded value
589 using std::ranges::clamp;
592 // [alg.lex.comparison], lexicographical comparison
593 using std::lexicographical_compare;
596 using std::ranges::lexicographical_compare;
599 // [alg.three.way], three-way comparison algorithms
600 using std::lexicographical_compare_three_way;
602 // [alg.permutation.generators], permutations
603 using std::next_permutation;
606 using std::ranges::next_permutation_result;
608 using std::ranges::next_permutation;
609 } // namespace ranges
611 using std::prev_permutation;
614 using std::ranges::prev_permutation_result;
616 using std::ranges::prev_permutation;
617 } // namespace ranges