Wrapper ensuring a comparator's call operator is const‐qualified.

Synopsis

Declared in <bslstl_hashtable.h>

template<class FUNCTOR>
class HashTable_ComparatorWrapper;

Description

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.

Member Functions

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.

Specializations

Name

Description

HashTable_ComparatorWrapper<FUNCTOR const>

Partial specialization wrapping a const‐qualified comparator.

HashTable_ComparatorWrapper<FUNCTOR&>

Partial specialization wrapping a comparator reference.

Non-Member Functions

Name

Description

swap

Swap the functors wrapped by lhs and rhs.

Created with MrDocs