Container‐based version of the <algorithm> std::partial_sort_copy() function to sort the elements in the given range result within the larger sequence in ascending order (and using result as the output parameter). At most min(result.last ‐ result.first, sequence.last ‐ sequence.first) elements from the sequence will be stored in the result.

Synopsis

Declared in <absl/algorithm/container.h>

template<
    typename C,
    typename RandomAccessContainer>
constexpr
/* implementation-defined */
c_partial_sort_copy(
    C const& sequence,
    RandomAccessContainer& result);

Return Value

An iterator to the end of the range written in result.

Parameters

Name

Description

sequence

The container whose elements to sort.

result

The destination container receiving the sorted elements.

Created with MrDocs