diff options
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r-- | libcxx/include/algorithm | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 62b67c3..0154dbc 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -287,7 +287,6 @@ namespace ranges { indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> constexpr bool ranges::is_partitioned(R&& r, Pred pred, Proj proj = {}); // since C++20 - template<bidirectional_iterator I, sentinel_for<I> S> requires permutable<I> constexpr I ranges::reverse(I first, S last); // since C++20 @@ -300,12 +299,22 @@ namespace ranges { class Proj = identity> requires sortable<I, Comp, Proj> constexpr I - sort(I first, S last, Comp comp = {}, Proj proj = {}); // since C++20 + ranges::sort(I first, S last, Comp comp = {}, Proj proj = {}); // since C++20 template<random_access_range R, class Comp = ranges::less, class Proj = identity> requires sortable<iterator_t<R>, Comp, Proj> constexpr borrowed_iterator_t<R> - sort(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 + ranges::sort(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 + + template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less, + class Proj = identity> + requires sortable<I, Comp, Proj> + I ranges::stable_sort(I first, S last, Comp comp = {}, Proj proj = {}); // since C++20 + + template<random_access_range R, class Comp = ranges::less, class Proj = identity> + requires sortable<iterator_t<R>, Comp, Proj> + borrowed_iterator_t<R> + ranges::stable_sort(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 template<class T, output_iterator<const T&> O, sentinel_for<O> S> constexpr O ranges::fill(O first, S last, const T& value); // since C++20 @@ -1252,6 +1261,7 @@ template <class BidirectionalIterator, class Compare> #include <__algorithm/ranges_replace_if.h> #include <__algorithm/ranges_reverse.h> #include <__algorithm/ranges_sort.h> +#include <__algorithm/ranges_stable_sort.h> #include <__algorithm/ranges_swap_ranges.h> #include <__algorithm/ranges_transform.h> #include <__algorithm/ranges_upper_bound.h> |