Wrapper ensuring a hash functor's call operator is const‐qualified.
Synopsis
Declared in <bslstl_hashtable.h>
template<class FUNCTOR>
class HashTable_HashWrapper;
Description
This class provides a wrapper around a functor satisfying the Hash requirements ({`bslstl_hash`}) such 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.
Note that we would only one class, not two, with C++11 variadic templates and perfect forwarding, and we could also easily detect whether or not FUNCTOR provided a const‐qualified operator().
Member Functions
Name |
Description |
|
Constructors |
Return a reference to the wrapped hash functor. |
|
Call the wrapped hash functor with |
|
Exchange the wrapped hash functor with that of |
Specializations
Name |
Description |
Partial specialization for const‐qualified hash functors. |
|
Partial specialization for const‐qualified hash functors. |