max function template — Returns the maximum of two values
template<typename T> const T& max(const T& a, const T& b); template<typename T, typename Compare> const T& max(const T& a, const T& b, Compare comp);
The max
function template
returns the larger of a
and
b
. If neither is larger, it
returns a
.
The first form compares values using the <
operator. The second form calls
comp(a
, b)
.