Wrapper ensuring a comparator's call operator is const-qualified.
Declared in <bslstl_hashtable.h>
template<class FUNCTOR>
class HashTable_ComparatorWrapper;
This class provides a wrapper around a functor that can compare two values and return a bool, so that the function call operator is always declared as const qualified.
TBD Provide an optimization for the case of an empty base functor, where we can safely const_cast want calling the base class operator.
| Name | Description |
|---|---|
HashTable_ComparatorWrapper [constructor] | Constructors |
functor | Return a reference providing non-modifiable access to the hash functor wrapped by this object. |
operator() | Call the wrapped comparator with arg1 and arg2. |
swap | Exchange the wrapped comparator with that of other. |
| Name | Description |
|---|---|
HashTable_ComparatorWrapper<FUNCTOR const> | Partial specialization wrapping a const-qualified comparator. |
HashTable_ComparatorWrapper<FUNCTOR&> | Partial specialization wrapping a comparator reference. |
| Name | Description |
|---|---|
swap | Swap the functors wrapped by lhs and rhs. |