cds
2.3.2
|
[type-option] Option setter for key comparing More...
#include <cds/opt/compare.h>
[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:
k1 > k2
k1 == k2
k1 < k2
Functor
is a functor with following interface:
Note that the functor must return int
, not a bool
value.
There are predefined type for Functor:
opt::v::less_comparator
that implements comparing functor through std::less
predicate.opt::v::less_comparator
functor intended for the string comparisonYou may implement your own comparing functor that satisfies Functor
interface.
About relation between opt::less
and opt::compare
option setters see opt::less
description.