Created on 2025-06-27.00:00:00 last changed 1 month ago
Proposed resolution:
This wording is relative to N5014.
Modify [algorithm.syn], header <algorithm>, as indicated:
[…]
template<execution-policy Ep, random_access_iterator I, sized_sentinel_for<I> S,
class Proj = identity, class T = projected_value_t<I, Proj>>
requires permutable<I> &&
indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>
subrange<I> remove(Ep& exec, I first, S last, const T& value,
Proj proj = {}); // freestanding-deleted
template<execution-policy Ep, sized-random-access-range R, class Proj = identity,
class T = projected_value_t<iterator_t<R>, Proj>>
requires permutable<iterator_t<R>> &&
indirect_binary_predicate<ranges::equal_to,
projected<iterator_t<R>, Proj>, const T*>
borrowed_subrange_t<R>
remove(Ep&& exec, R&& r, const T& value, Proj proj = {}); // freestanding-deleted
[…]
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>
remove_if(Ep& exec, I first, S last, Pred pred, Proj proj = {}); // freestanding-deleted
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>
remove_if(Ep& exec, R& r, Pred pred, Proj proj = {}); // freestanding-deleted
[…]
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>
partition(Ep&& exec, I first, S last, Pred pred, Proj proj = {}); // freestanding-deleted
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>
partition(Ep&& exec, R&& r, Pred pred, Proj proj = {}); // freestanding-deleted
[…]
Modify [alg.remove] as indicated:
[…] template<execution-policy Ep, random_access_iterator I, sized_sentinel_for<I> S, class Proj = identity, class T = projected_value_t<I, Proj>> requires permutable<I> && indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*> subrange<I> ranges::remove(Ep& exec, I first, S last, const T& value, Proj proj = {}); template<execution-policy Ep, sized-random-access-range R, class Proj = identity, class T = projected_value_t<iterator_t<R>, Proj>> requires permutable<iterator_t<R>> && indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*> borrowed_subrange_t<R> ranges::remove(Ep&& exec, R&& r, const T& value, 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> ranges::remove_if(Ep& exec, I first, S last, Pred pred, Proj proj = {}); 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> ranges::remove_if(Ep& exec, R& r, Pred pred, Proj proj = {});-1- Let E be […]
Modify [alg.partitions] as indicated:
[…] 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> ranges::partition(Ep&& exec, I first, S last, Pred pred, Proj proj = {}); 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> ranges::partition(Ep&& exec, R&& r, Pred pred, Proj proj = {});-1- Let `proj` be `identity{}` for the overloads with no parameter named `proj`.
[ Kona 2025-11-08; Status changed: Voting → WP. ]
[ 2025-10-21; Reflector poll. ]
Set status to Tentatively Ready after seven votes in favour during reflector poll.
The P3179R9: Parallel Range Algorithms paper was accepted to C++ working draft for C++ 26. Unfortunately, there is an oversight for three algorithms — `remove`, `remove_if` and `partition` — where the `permutable` constraint is missing. This applies to "Iterator and Sentinel" overloads only. The issue exists in [algorithm.syn] as well as in per-algorithm sections: [alg.partitions] and [alg.remove].
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2025-11-11 10:48:16 | admin | set | messages: + msg15633 |
| 2025-11-11 10:48:16 | admin | set | status: voting -> wp |
| 2025-10-30 17:45:31 | admin | set | status: ready -> voting |
| 2025-10-21 09:47:05 | admin | set | messages: + msg15294 |
| 2025-10-21 09:47:05 | admin | set | status: new -> ready |
| 2025-07-26 12:00:59 | admin | set | messages: + msg14901 |
| 2025-06-27 00:00:00 | admin | create | |