BloombergLP::bslh::hashAppend

Append the active alternative of a std::variant to a hash algorithm.

Synopsis

Declared in <bslh_hashvariant.h>

template<
    class HASH_ALGORITHM,
    class... TYPE>
void
hashAppend(
    HASH_ALGORITHM& algorithm,
    std::variant<TYPE...> 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.

Parameters

NameDescription
algorithmhashing algorithm that combines the variant state
inputvariant whose active alternative is hashed