absl::c_max_element

Overload of c_max_element() for performing a comp comparison other than operator<.

Synopsis

Declared in <absl/algorithm/container.h>

template<
    typename Sequence,
    typename LessThan>
constexpr
/* implementation-defined */
c_max_element(
    Sequence& sequence,
    LessThan&& comp);

Return Value

An iterator to the largest element under comp.

Parameters

NameDescription
sequenceThe container to inspect.
compThe comparison used to order the elements.