function object
std::ranges::stable_partition
- Header
<algorithm>- Draft
- [alg.partitions]
- Scope
std::ranges- cppreference
- std::ranges::stable_partition
Synopsis
inline constexpr /* implementation-defined */ stable_partition = {};Call signatures
stable_partition is a function object; these are its call operators as libycxx declares them, written as the functions the draft declares.
- (1)
template< std::ranges::bidirectional_range R, class Proj = std::identity, std::indirect_unary_predicate<std::projected<iterator_t<R>, Proj>> Pred> requires std::permutable<iterator_t<R>> constexpr borrowed_subrange_t<R> stable_partition( R&& r, Pred pred, Proj proj = {}); - (2)
template< std::bidirectional_iterator I, std::sentinel_for<I> S, class Proj = std::identity, std::indirect_unary_predicate<std::projected<I, Proj>> Pred> requires std::permutable<I> constexpr std::ranges::subrange<I> stable_partition( I first, S last, Pred pred, Proj proj = {}); - (3)
template< class ExecutionPolicy, std::random_access_iterator I, std::sized_sentinel_for<I> S, class Proj = std::identity, std::indirect_unary_predicate<std::projected<I, Proj>> Pred> requires execution-policy<ExecutionPolicy> && std::permutable<I> decltype(auto) stable_partition( ExecutionPolicy&&, I first, S last, Pred pred, Proj proj = {}) noexcept; - (4)
template< class ExecutionPolicy, sized-random-access-range R, class Proj = std::identity, std::indirect_unary_predicate<std::projected<std::ranges::iterator_t<R>, Proj>> Pred> requires execution-policy<ExecutionPolicy> && std::permutable<std::ranges::iterator_t<R>> decltype(auto) stable_partition( ExecutionPolicy&&, R&& r, Pred pred, Proj proj = {}) noexcept;