Standard C++ Library Class Reference
Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
min
 Algorithm
Summary
Find and return the minimum of a pair of values
Contents
Synopsis● 
Description● 
Example● 
See Also● 
Synopsis
#include <algorithm>
template <class T>
 const T& min(const T&, const T&);
template <class T, class Compare>
 const T& min(const T& a, const T&, Compare);
Description
The min algorithm determines and returns the minimum of a pair of values. In the second
version of the algorithm, the optional argument Compare defines a comparison function that can
be used in place of the default operator<. This function can be used with all the datatypes
provided by the standard library.
min returns the first argument when the two arguments are equal.










