cds  1.4.0
cds::opt::compare< Functor > Struct Template Reference

[type-option] Option setter for key comparing More...

#include <cds/opt/compare.h>

Detailed Description

template<typename Functor>
struct cds::opt::compare< Functor >

[type-option] Option setter for key comparing

The option sets a type of a functor to compare keys. For comparing two keys k1 and k2 the functor must return:

Functor is a functor with following interface:

template <typename T>
struct Comparator {
int operator ()(const T& r1, const T& r2)
{
// Comparator body
}
};

Note that the functor must return int, not a bool value.

There are predefined type for Functor:

You may implement your own comparing functor that satisfies Functor interface.

About relation between opt::less and opt::compare option setters see opt::less description.


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

cds 1.4.0 Developed by Maxim Khiszinsky aka khizmax 2007 - 2012
Autogenerated Mon May 20 2013 00:38:01 by Doxygen 1.8.3.1