[#BloombergLP-bslh-Hash-07]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslh.adoc[bslh]::Hash
:relfileprefix: ../../
:mrdocs:

This struct wraps the (template parameter) type `HASH&lowbar;ALGORITHM` in an interface that satisfies the `hash` requirements of the C&plus;&plus;11 standard&period;

== Synopsis

Declared in `&lt;bslh&lowbar;hash&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class HASH&lowbar;ALGORITHM = xref:BloombergLP/bslh/DefaultHashAlgorithm.adoc[bslh::DefaultHashAlgorithm]&gt;
struct Hash;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslh/Hash-07/HashAlgorithm.adoc[`HashAlgorithm`] 
| Make the `HASH&lowbar;ALGORITHM` template parameter available to clients&period;
| xref:BloombergLP/bslh/Hash-07/result_type.adoc[`result&lowbar;type`] 
| The type of the hash value that will be returned by the function&hyphen;call operator&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslh/Hash-07/operator_call.adoc[`operator()`] 
| Return a hash value for the specified `key`&period;
|===


== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslh/Hash-0a.adoc[`Hash&lt;std::filesystem::path&gt;`] 
| Specialization of `hash` for `std&colon;&colon;filesystem&colon;&colon;path` values&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:bsl/hash-017.adoc[`hash&lt;basic&lowbar;string&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, ALLOCATOR&gt;&gt;`] 
| Specialize `bsl&colon;&colon;hash` for strings, including an overload for pointers to allow character arrays to be hashed without converting them first&period;
| xref:bsl/hash-06.adoc[`hash`] 
| Empty base class for hashing&period;
|===


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