[#absl-c_max_element-0c]
= xref:absl.adoc[absl]::c&lowbar;max&lowbar;element
:relfileprefix: ../
:mrdocs:

`c&lowbar;max&lowbar;element` overloads

== Synopses

Declared in `&lt;absl&sol;algorithm&sol;container&period;h&gt;`

Container&hyphen;based version of the &lt;algorithm&gt; `std&colon;&colon;max&lowbar;element()` function to return an iterator pointing to the element with the largest value, using `operator&lt;` to make the comparisons&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Sequence&gt;
constexpr
&sol;&ast; implementation-defined &ast;&sol;
xref:absl/c_max_element-04.adoc[c&lowbar;max&lowbar;element](Sequence& sequence);
----

[.small]#xref:absl/c_max_element-04.adoc[_» more&period;&period;&period;_]#

Overload of `c&lowbar;max&lowbar;element()` for performing a `comp` comparison other than `operator&lt;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Sequence,
    typename LessThan&gt;
constexpr
&sol;&ast; implementation-defined &ast;&sol;
xref:absl/c_max_element-06.adoc[c&lowbar;max&lowbar;element](
    Sequence& sequence,
    LessThan&& comp);
----

[.small]#xref:absl/c_max_element-06.adoc[_» more&period;&period;&period;_]#

== Return Value

* An iterator to the largest element&period;
* An iterator to the largest element under `comp`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *sequence*
| The container to inspect&period;
| *comp*
| The comparison used to order the elements&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
