Categories: algorithms, utilities | Component type: function |
template <class T> const T& min(const T& a, const T& b); template <class T, class BinaryPredicate> const T& min(const T& a, const T& b, BinaryPredicate comp);
The two versions of min differ in how they define whether one element is less than another. The first version compares objects using operator<, and the second compares objects using the function object comp.
const int x = min(3, 9); assert(x == 3);
Contact Us | Site Map | Trademarks | Privacy | Using this site means you accept its Terms of Use |
Copyright © 2009 - 2014 Silicon Graphics International. All rights reserved. |