cppreference.com > C++ Algorithms > max
max
Syntax:
  #include <algorithm>
  const TYPE& max( const TYPE& x, const TYPE& y );
  const TYPE& max( const TYPE& x, const TYPE& y, BinPred p );

The max() function returns the greater of x and y.

If the binary predicate p is given, then it will be used instead of the < operator to compare the two elements.