|  | OpenMS
    2.6.0
    | 
Wrapper that reverses (exchanges) the two arguments of a comparator. Normally you should use the make-function reverseComparator() because then you do not need to specify the template arguments. More...
#include <OpenMS/KERNEL/ComparatorUtils.h>
| Public Member Functions | |
| ReverseComparator (ReverseComparator const &cmp) | |
| ReverseComparator (Cmp const &cmp=Cmp()) | |
| template<typename T1 , typename T2 > | |
| Cmp::result_type | operator() (T1 left, T2 right) const | 
| Protected Attributes | |
| const Cmp & | cmp_ | 
| Related Functions | |
| (Note that these are not member functions.) | |
| template<class Cmp > | |
| ReverseComparator< Cmp > | reverseComparator (Cmp const &cmp) | 
| Make-function to create a ReverseComparator from another comparator without the need to specify the template arguments.  More... | |
Wrapper that reverses (exchanges) the two arguments of a comparator. Normally you should use the make-function reverseComparator() because then you do not need to specify the template arguments.
For example, ReverseComparator<less<T> > works like greater<T> . 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
References ReverseComparator< Cmp >::cmp_.
| 
 | related | 
Make-function to create a ReverseComparator from another comparator without the need to specify the template arguments.
For example,
int i = 88, j = 99;
if ( reverseComparator(std::less<int>())(j,i) )
{
  //    // yes, 99 > 88.
}
 
| 
 | protected | 
Referenced by ReverseComparator< Cmp >::operator()().
 1.8.16
 1.8.16