greater - C++ Reference
Search: Reference <functional> greater Not logged in register log in class template <functional> std::greater template <class T> struct greater; Function object class for greater-than inequality comparison Binary function object class whose call returns whether the its first argument compares greater than the second (as returned by operator >). Generically, function objects are instances of a class with member function operator() defined. This member function allows the object to be used with the same syntax as a function call. It is defined with the same behavior as: C++98 C++11 1 2 3 4 5 6 template <class T> struct greater { bool operator() (const T& x, const T& y) const {return x>y;} typedef T first_argument_type; typedef T second_argument_type; typedef bool result_type; }; Objects of this class can be used on standard algorithms such as sort, merge or lower_bound. Template parameters T Type of the arguments to compare by the functional call. The type shall
Explore this link on the map →