[#absl-c_nth_element-09] = xref:absl.adoc[absl]::c_nth_element :relfileprefix: ../ :mrdocs: `c_nth_element` overloads == Synopses Declared in `<absl/algorithm/container.h>` Container‐based version of the <algorithm> `std::nth_element()` function to rearrange the elements within a container such that the `nth` element would be in that position in an ordered sequence; other elements may be in any order, except that all preceding `nth` will be less than that element, and all following `nth` will be greater than that element. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename RandomAccessContainer> constexpr void xref:absl/c_nth_element-07.adoc[c_nth_element]( RandomAccessContainer& sequence, /* implementation-defined */ nth); ---- [.small]#xref:absl/c_nth_element-07.adoc[_» more..._]# Overload of `c_nth_element()` for performing a `comp` comparison other than the default `operator<`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename RandomAccessContainer, typename LessThan> constexpr void xref:absl/c_nth_element-08.adoc[c_nth_element]( RandomAccessContainer& sequence, /* implementation-defined */ nth, LessThan&& comp); ---- [.small]#xref:absl/c_nth_element-08.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *sequence* | The container to rearrange. | *nth* | An iterator to the element to place in its sorted position. | *comp* | The comparison used to order the elements. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#