[#BloombergLP-bslh-hashAppend-058]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslh.adoc[bslh]::hashAppend
:relfileprefix: ../../
:mrdocs:

Append the active alternative of a `std&colon;&colon;variant` to a hash algorithm&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class HASH&lowbar;ALGORITHM,
    class&period;&period;&period; TYPE&gt;
void
hashAppend(
    HASH&lowbar;ALGORITHM& algorithm,
    std::variant&lt;TYPE&period;&period;&period;&gt; const& input);
----

== Description

Pass the index of the active variant of the specified `input` to the specified `algorithm`, followed by the active value itself, to be combined into the internal state of the algorithm that is used to produce the resulting hash value&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *algorithm*
| hashing algorithm that combines the variant state
| *input*
| variant whose active alternative is hashed
|===


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