default (1) | template <class T> const T& max (const T& a, const T& b); |
---|---|
custom (2) | template <class T, class Compare> const T& max (const T& a, const T& b, Compare comp); |
default (1) | template <class T> const T& max (const T& a, const T& b); |
---|---|
custom (2) | template <class T, class Compare> const T& max (const T& a, const T& b, Compare comp); |
initializer list (3) | template <class T> T max (initializer_list<T> il); template <class T, class Compare> T max (initializer_list<T> il, Compare comp); |
operator<
(or comp, if provided) to compare the values.
|
|
bool
. The value returned indicates whether the element passed as first argument is considered less than the second.operator<
.
|
|
max(1,2)==2 max(2,1)==2 max('a','z')==z max(3.14,2.73)==3.14 |