absl::c_minmax_element

Container-based version of the <algorithm> std::minmax_element() function to return a pair of iterators pointing to the elements containing the smallest and largest values, respectively, using operator< to make the comparisons.

Synopsis

Declared in <absl/algorithm/container.h>

template<typename C>
constexpr
/* implementation-defined */
c_minmax_element(C& c);

Return Value

A pair of iterators to the smallest and largest elements.

Parameters

NameDescription
cThe container to inspect.