Visual Computing Library
|
The FirstElementPairComparator struct is an utility comparator that allow to sort std::pair (or any type that has a sortable member called 'first') using only its first element. The second element of the Pair type is ignored and won't be considered by the comparator. This means that pairs having equal first elements but different second elements will be considered as equals. More...
#include <vclib/misc/comparators.h>
Public Member Functions | |
bool | operator() (const Pair &p1, const Pair &p2) const |
The FirstElementPairComparator struct is an utility comparator that allow to sort std::pair (or any type that has a sortable member called 'first') using only its first element. The second element of the Pair type is ignored and won't be considered by the comparator. This means that pairs having equal first elements but different second elements will be considered as equals.