[#BloombergLP-bslstl-HashTable_HashWrapper-03] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::HashTable_HashWrapper :relfileprefix: ../../ :mrdocs: Wrapper ensuring a hash functor's call operator is const‐qualified. == Synopsis Declared in `<bslstl_hashtable.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- 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 [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/HashTable_HashWrapper-03/2constructor-00.adoc[`HashTable_HashWrapper`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bslstl/HashTable_HashWrapper-03/functor.adoc[`functor`] | Return a reference to the wrapped hash functor. | xref:BloombergLP/bslstl/HashTable_HashWrapper-03/operator_call.adoc[`operator()`] | Call the wrapped hash functor with `arg`. | xref:BloombergLP/bslstl/HashTable_HashWrapper-03/swap.adoc[`swap`] | Exchange the wrapped hash functor with that of `other`. |=== == Specializations [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/HashTable_HashWrapper-02.adoc[`HashTable_HashWrapper<FUNCTOR const>`] | Partial specialization for const‐qualified hash functors. | xref:BloombergLP/bslstl/HashTable_HashWrapper-0d.adoc[`HashTable_HashWrapper<FUNCTOR&>`] | Partial specialization for const‐qualified hash functors. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/swap-040.adoc[`swap`] | Swap the functors wrapped by `a` and `b`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#