|
| 1 | +<?xml version='1.0' encoding='utf-8' standalone='no'?> |
| 2 | +<!DOCTYPE issue SYSTEM "lwg-issue.dtd"> |
| 3 | + |
| 4 | +<issue num="4457" status="New"> |
| 5 | +<title>freestanding for `stable_sort`, `stable_partition` and `inplace_merge`</title> |
| 6 | +<section><sref ref="[algorithm.syn]"/></section> |
| 7 | +<submitter>Braden Ganetsky</submitter> |
| 8 | +<date>06 Nov 2025</date> |
| 9 | +<priority>99</priority> |
| 10 | + |
| 11 | +<discussion> |
| 12 | +<b>Addresses <a href="https://github.com/cplusplus/nbballot/issues/830">US 157-255</a></b> |
| 13 | +<p> |
| 14 | +This applies the resolution for US 157-255. |
| 15 | +</p> |
| 16 | +</discussion> |
| 17 | + |
| 18 | +<resolution> |
| 19 | +<p> |
| 20 | +This wording is relative to <paper num="N5014"/>. |
| 21 | +</p> |
| 22 | + |
| 23 | +<ol> |
| 24 | +<li><p>Modify <sref ref="[algorithm.syn]"/>, as indicated:</p> |
| 25 | + |
| 26 | +<blockquote><pre> |
| 27 | +namespace ranges { |
| 28 | + template<bidirectional_iterator I, sentinel_for<I> S, class Proj = identity, |
| 29 | + indirect_unary_predicate<projected<I, Proj>> Pred> |
| 30 | + requires permutable<I> |
| 31 | + constexpr subrange<I> stable_partition(I first, S last, Pred pred, // hosted |
| 32 | + Proj proj = {}); |
| 33 | + template<bidirectional_range R, class Proj = identity, |
| 34 | + indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> |
| 35 | + requires permutable<iterator_t<R>> |
| 36 | + constexpr borrowed_subrange_t<R> stable_partition(R&& r, Pred pred, // hosted |
| 37 | + Proj proj = {}); |
| 38 | + |
| 39 | + template<execution-policy Ep, random_access_iterator I, sized_sentinel_for<I> S, |
| 40 | + class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred> |
| 41 | + requires permutable<I> |
| 42 | + subrange<I> |
| 43 | + stable_partition(Ep&& exec, I first, S last, Pred pred, |
| 44 | + Proj proj = {}); // <del>freestanding-deleted</del><ins>hosted</ins>; |
| 45 | + template<execution-policy Ep, sized-random-access-range R, class Proj = identity, |
| 46 | + indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> |
| 47 | + requires permutable<iterator_t<R>> |
| 48 | + borrowed_subrange_t<R> |
| 49 | + stable_partition(Ep&& exec, R&& r, Pred pred, Proj proj = {}); // <del>freestanding-deleted</del><ins>hosted</ins>; |
| 50 | +} |
| 51 | +</pre></blockquote> |
| 52 | +</li> |
| 53 | + |
| 54 | +</ol> |
| 55 | +</resolution> |
| 56 | + |
| 57 | +</issue> |
0 commit comments