[#absl-c_partial_sort_copy-022] = xref:absl.adoc[absl]::c_partial_sort_copy :relfileprefix: ../ :mrdocs: `c_partial_sort_copy` overloads == Synopses Declared in `<absl/algorithm/container.h>` 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename C, typename RandomAccessContainer> constexpr /* implementation-defined */ xref:absl/c_partial_sort_copy-020.adoc[c_partial_sort_copy]( C const& sequence, RandomAccessContainer& result); ---- [.small]#xref:absl/c_partial_sort_copy-020.adoc[_» more..._]# Overload of `c_partial_sort_copy()` for performing a `comp` comparison other than the default `operator<`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename C, typename RandomAccessContainer, typename LessThan> constexpr /* implementation-defined */ xref:absl/c_partial_sort_copy-04.adoc[c_partial_sort_copy]( C const& sequence, RandomAccessContainer& result, LessThan&& comp); ---- [.small]#xref:absl/c_partial_sort_copy-04.adoc[_» more..._]# == Return Value An iterator to the end of the range written in `result`. == Parameters [cols="1,4"] |=== | Name| Description | *sequence* | The container whose elements to sort. | *result* | The destination container receiving the sorted elements. | *comp* | The comparison used to order the elements. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#