function object
std::ranges::partial_sort_copy
- Header
<algorithm>- Draft
- [partial.sort.copy]
- Scope
std::ranges- cppreference
- std::ranges::partial_sort_copy
Synopsis
inline constexpr /* implementation-defined */ partial_sort_copy = {};Call signatures
partial_sort_copy is a function object; these are its call operators as libycxx declares them, written as the functions the draft declares.
- (1)
template< std::ranges::input_range R1, std::ranges::random_access_range R2, class Comp = std::ranges::less, class Proj1 = std::identity, class Proj2 = std::identity> requires std::indirectly_copyable<iterator_t<R1>, iterator_t<R2>> && std::sortable<iterator_t<R2>, Comp, Proj2> && std::indirect_strict_weak_order<Comp, std::projected<iterator_t<R1>, Proj1>, std::projected<iterator_t<R2>, Proj2>> constexpr std::ranges::partial_sort_copy_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>> partial_sort_copy( R1&& r, R2&& result_r, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - (2)
template< std::input_iterator I1, std::sentinel_for<I1> S1, std::random_access_iterator I2, std::sentinel_for<I2> S2, class Comp = std::ranges::less, class Proj1 = std::identity, class Proj2 = std::identity> requires std::indirectly_copyable<I1, I2> && std::sortable<I2, Comp, Proj2> && std::indirect_strict_weak_order<Comp, std::projected<I1, Proj1>, std::projected<I2, Proj2>> constexpr std::ranges::partial_sort_copy_result<I1, I2> partial_sort_copy( I1 first, S1 last, I2 result_first, S2 result_last, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - (3)
template< class ExecutionPolicy, std::random_access_iterator I1, std::sized_sentinel_for<I1> S1, std::random_access_iterator I2, std::sized_sentinel_for<I2> S2, class Comp = std::ranges::less, class Proj1 = std::identity, class Proj2 = std::identity> requires execution-policy<ExecutionPolicy> && std::indirectly_copyable<I1, I2> && std::sortable<I2, Comp, Proj2> && std::indirect_strict_weak_order<Comp, std::projected<I1, Proj1>, std::projected<I2, Proj2>> decltype(auto) partial_sort_copy( ExecutionPolicy&&, I1 first, S1 last, I2 result_first, S2 result_last, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}) noexcept; - (4)
template< class ExecutionPolicy, sized-random-access-range R1, sized-random-access-range R2, class Comp = std::ranges::less, class Proj1 = std::identity, class Proj2 = std::identity> requires execution-policy<ExecutionPolicy> && std::indirectly_copyable<std::ranges::iterator_t<R1>, std::ranges::iterator_t<R2>> && std::sortable<std::ranges::iterator_t<R2>, Comp, Proj2> && std::indirect_strict_weak_order<Comp, std::projected<std::ranges::iterator_t<R1>, Proj1>, std::projected<std::ranges::iterator_t<R2>, Proj2>> decltype(auto) partial_sort_copy( ExecutionPolicy&&, R1&& r, R2&& result_r, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}) noexcept;