Title
freestanding for `stable_sort`, `stable_partition` and `inplace_merge`
Status
new
Section
[algorithm.syn]
Submitter
Braden Ganetsky

Created on 2025-11-06.00:00:00 last changed 1 month ago

Messages

Date: 2025-11-06.11:29:07

Proposed resolution:

This wording is relative to N5014.

  1. Modify [algorithm.syn], as indicated:

    namespace ranges {
      template<bidirectional_iterator I, sentinel_for<I> S, class Proj = identity,
               indirect_unary_predicate<projected<I, Proj>> Pred>
        requires permutable<I>
        constexpr subrange<I> stable_partition(I first, S last, Pred pred,            // hosted
                                               Proj proj = {});
      template<bidirectional_range R, class Proj = identity,
               indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
        requires permutable<iterator_t<R>>
        constexpr borrowed_subrange_t<R> stable_partition(R&& r, Pred pred,           // hosted
                                                          Proj proj = {});
    
      template<execution-policy Ep, random_access_iterator I, sized_sentinel_for<I> S,
               class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred>
        requires permutable<I>
        subrange<I>
          stable_partition(Ep&& exec, I first, S last, Pred pred,
                           Proj proj = {});                                   // freestanding-deletedhosted;
      template<execution-policy Ep, sized-random-access-range R, class Proj = identity,
               indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
        requires permutable<iterator_t<R>>
        borrowed_subrange_t<R>
          stable_partition(Ep&& exec, R&& r, Pred pred, Proj proj = {});      // freestanding-deletedhosted;
    }
    
Date: 2025-11-06.00:00:00
Addresses US 157-255

This applies the resolution for US 157-255.

History
Date User Action Args
2025-11-06 11:29:07adminsetmessages: + msg15563
2025-11-06 00:00:00admincreate