[#BloombergLP-bslstl-HashTable_ComparatorWrapper-0e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::HashTable&lowbar;ComparatorWrapper
:relfileprefix: ../../
:mrdocs:

Wrapper ensuring a comparator&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;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&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;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/HashTable_ComparatorWrapper-0e/2constructor-04.adoc[`HashTable&lowbar;ComparatorWrapper`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bslstl/HashTable_ComparatorWrapper-0e/functor.adoc[`functor`] 
| Return a reference providing non&hyphen;modifiable access to the hash functor wrapped by this object&period;
| xref:BloombergLP/bslstl/HashTable_ComparatorWrapper-0e/operator_call.adoc[`operator()`] 
| Call the wrapped comparator with `arg1` and `arg2`&period;
| xref:BloombergLP/bslstl/HashTable_ComparatorWrapper-0e/swap.adoc[`swap`] 
| Exchange the wrapped comparator with that of `other`&period;
|===


== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/HashTable_ComparatorWrapper-0d.adoc[`HashTable&lowbar;ComparatorWrapper&lt;FUNCTOR const&gt;`] 
| Partial specialization wrapping a const&hyphen;qualified comparator&period;
| xref:BloombergLP/bslstl/HashTable_ComparatorWrapper-07.adoc[`HashTable&lowbar;ComparatorWrapper&lt;FUNCTOR&&gt;`] 
| Partial specialization wrapping a comparator reference&period;
|===


== Non-Member Functions

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


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