[#bsl-hash-017]
= xref:bsl.adoc[bsl]::xref:bsl/hash-06.adoc[hash]&lt;xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, ALLOCATOR&gt;]&gt;
:relfileprefix: ../
:mrdocs:

Specialize `bsl&colon;&colon;hash` for strings, including an overload for pointers to allow character arrays to be hashed without converting them first&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class CHAR&lowbar;TYPE,
    class CHAR&lowbar;TRAITS,
    class ALLOCATOR&gt;
struct xref:bsl/hash-06.adoc[hash]&lt;xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, ALLOCATOR&gt;]&gt;
    : xref:BloombergLP/bslh/Hash-07.adoc[BloombergLP::bslh::Hash&lt;&gt;]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bslh/Hash-07.adoc[BloombergLP::bslh::Hash&lt;&gt;]`
| 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;
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslh/Hash-02/HashAlgorithm.adoc[`HashAlgorithm`] 
| Make the `HASH&lowbar;ALGORITHM` template parameter available to clients&period;
| xref:BloombergLP/bslh/Hash-02/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:bsl/hash-017/operator_call-01.adoc[`operator()`] 
| Function call operators
|===



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