Visual Computing Library
Loading...
Searching...
No Matches
vcl::FirstElementPairComparator< Pair > Struct Template Reference

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
 

Detailed Description

template<typename Pair>
struct vcl::FirstElementPairComparator< Pair >

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.


The documentation for this struct was generated from the following file: