[#absl-c_max_element-0c] = xref:absl.adoc[absl]::c_max_element :relfileprefix: ../ :mrdocs: `c_max_element` overloads == Synopses Declared in `<absl/algorithm/container.h>` Container‐based version of the <algorithm> `std::max_element()` function to return an iterator pointing to the element with the largest value, using `operator<` to make the comparisons. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename Sequence> constexpr /* implementation-defined */ xref:absl/c_max_element-04.adoc[c_max_element](Sequence& sequence); ---- [.small]#xref:absl/c_max_element-04.adoc[_» more..._]# Overload of `c_max_element()` for performing a `comp` comparison other than `operator<`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename Sequence, typename LessThan> constexpr /* implementation-defined */ xref:absl/c_max_element-06.adoc[c_max_element]( Sequence& sequence, LessThan&& comp); ---- [.small]#xref:absl/c_max_element-06.adoc[_» more..._]# == Return Value * An iterator to the largest element. * An iterator to the largest element under `comp`. == Parameters [cols="1,4"] |=== | Name| Description | *sequence* | The container to inspect. | *comp* | The comparison used to order the elements. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#