[#BloombergLP-bslstl-HashTable_HashWrapper-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::HashTable&lowbar;HashWrapper
:relfileprefix: ../../
:mrdocs:

Wrapper ensuring a hash functor&apos;s call operator is const&hyphen;qualified&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;hashtable&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class FUNCTOR&gt;
class HashTable&lowbar;HashWrapper;
----

== Description

This class provides a wrapper around a functor satisfying the `Hash` requirements (&lcub;`bslstl&lowbar;hash`&rcub;) such that the function call operator is always declared as `const` qualified&period;

TBD Provide an optimization for the case of an empty base functor, where we can safely const&lowbar;cast want calling the base class operator&period;

Note that we would only one class, not two, with C&plus;&plus;11 variadic templates and perfect forwarding, and we could also easily detect whether or not `FUNCTOR` provided a const&hyphen;qualified `operator()`&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/HashTable_HashWrapper-03/2constructor-00.adoc[`HashTable&lowbar;HashWrapper`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bslstl/HashTable_HashWrapper-03/functor.adoc[`functor`] 
| Return a reference to the wrapped hash functor&period;
| xref:BloombergLP/bslstl/HashTable_HashWrapper-03/operator_call.adoc[`operator()`] 
| Call the wrapped hash functor with `arg`&period;
| xref:BloombergLP/bslstl/HashTable_HashWrapper-03/swap.adoc[`swap`] 
| Exchange the wrapped hash functor with that of `other`&period;
|===


== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/HashTable_HashWrapper-02.adoc[`HashTable&lowbar;HashWrapper&lt;FUNCTOR const&gt;`] 
| Partial specialization for const&hyphen;qualified hash functors&period;
| xref:BloombergLP/bslstl/HashTable_HashWrapper-0d.adoc[`HashTable&lowbar;HashWrapper&lt;FUNCTOR&&gt;`] 
| Partial specialization for const&hyphen;qualified hash functors&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/swap-040.adoc[`swap`]
| Swap the functors wrapped by `a` and `b`&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
