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