hashAppend overloads
Declared in <bslh_hash.h>
Pass the specified input path to the specified hashAlg hashing algorithm of the (template parameter) type HASHALG. Note that this function violates the BDE coding standard, adding a function for a namespace for a different package, and none of the function parameters are from this package either. This is necessary in order to provide an implementation of bslh::hashAppend for the (native) standard library std::filesystem::path type as we are not allowed to add overloads directly into namespace std. Also note that this will NOT be found by the compiler if HASHALG is not in BloombergLP::bslh.
template<class HASHALG>
void
hashAppend(
HASHALG& hashAlg,
std::filesystem::path const& path);
» more...
Pass the special value corresponding to the std::monostate object to the specified algorithm. This function integrates with the bslh modular hashing system and effectively provides a bsl::hash specialization for std::monostate.
template<class HASH_ALGORITHM>
void
hashAppend(
HASH_ALGORITHM& algorithm,
std::monostate const&);
» more...
Invoke hashAppend with the specified algorithm as the first argument and the result of applying an unspecified function to the specified tid as the second argument.
template<class t_HASH_ALG>
void
hashAppend(
t_HASH_ALG& algorithm,
std::thread::id const& tid);
» more...
If the specified input is engaged, pass its contained value into the specified algorithm to be combined into the internal state of the algorithm that is used to produce the resulting hash value. Otherwise, pass an arbitrary size_t value instead. Note that this behavior (for engaged values) is required by the C++ Standard.
template<
class HASH_ALGORITHM,
class TYPE>
void
hashAppend(
HASH_ALGORITHM& algorithm,
std::optional<TYPE> const& input);
» more...
Invoke hashAppend, with the specified algorithm, on each element of the specified input in order of increasing index as defined by std::get.
template<
class HASH_ALGORITHM,
class... TYPE>
void
hashAppend(
HASH_ALGORITHM& algorithm,
std::tuple<TYPE...> const& input);
» more...
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.
template<
class HASH_ALGORITHM,
class... TYPE>
void
hashAppend(
HASH_ALGORITHM& algorithm,
std::variant<TYPE...> const& input);
» more...
Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the enable_if meta-function is used to enable this hashAppend function for only integral (excluding bool), pointer, and enum types, because these types can all be hashed as a continuous sequence of bytes. Also note that this function is defined inline because MS Visual Studio compilers before 2013 require (some) functions declared using enable_if be in-place inline.
template<
class HASH_ALGORITHM,
class TYPE>
void
hashAppend(
HASH_ALGORITHM& hashAlg,
TYPE input)
requires (bsl::is_integral<TYPE>::value ||
bsl::is_pointer<TYPE>::value ||
bsl::is_enum<TYPE>::value) &&
!bsl::is_same<TYPE, bool>::value;
» more...
Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the enable_if meta-function is used to enable this hashAppend function for only floating point (excluding long double) types, because these types need to have +/-0.0 normalized to 0.0 before they can be hashed as a continuous sequence of bytes. Also note that this function is defined inline because MS Visual Studio compilers before 2013 require (some) functions declared using enable_if be in-place inline.
template<
class HASH_ALGORITHM,
class TYPE>
void
hashAppend(
HASH_ALGORITHM& hashAlg,
TYPE input)
requires bsl::is_floating_point<TYPE>::value &&
!bsl::is_same<TYPE, long double>::value;
» more...
Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the enable_if meta-function is used to enable this hashAppend function for only bool, because bools can have multiple true representations and need to be normalized before they can be hashed as a continuous sequence of bytes.
template<
class HASH_ALGORITHM,
class TYPE>
void
hashAppend(
HASH_ALGORITHM& hashAlg,
TYPE input)
requires bsl::is_same<TYPE, bool>::value;
» more...
Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the enable_if meta-function is used to enable this hashAppend function for only long double, because on some compilers long doubles contain garbage and can not be hashed as a continuous sequence of bytes.
template<
class HASH_ALGORITHM,
class TYPE>
void
hashAppend(
HASH_ALGORITHM& hashAlg,
TYPE input)
requires bsl::is_same<TYPE, long double>::value;
» more...
Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the entire char array will be hashed in only one call to hashAlg. Also note that this hashAppend exists because some platforms don't recognize that adding a const qualifier is a better match for arrays than decaying to a pointer and using the hashAppend function for pointers.
template<
class HASH_ALGORITHM,
size_t N>
void
hashAppend(
HASH_ALGORITHM& hashAlg,
char(& input)[]);
» more...
Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the entire char array will be hashed in only one call to hashAlg.
template<
class HASH_ALGORITHM,
size_t N>
void
hashAppend(
HASH_ALGORITHM& hashAlg,
char const(& input)[]);
» more...
Pass the specified input string to the specified hashAlg hashing algorithm of the (template parameter) type HASHALG. Note that this function violates the BDE coding standard, adding a function for a namespace for a different package, and none of the function parameters are from this package either. This is necessary in order to provide an implementation of bslh::hashAppend for the (native) standard library string_view type as we are not allowed to add overloads directly into namespace std, and this component essentially provides the interface between bsl and std string types.
template<
class HASHALG,
class CHAR_TYPE,
class CHAR_TRAITS>
void
hashAppend(
HASHALG& hashAlg,
std::basic_string_view<CHAR_TYPE, CHAR_TRAITS> const& input);
» more...
Invoke the (appropriate) hashAppend function, with the specified algorithm on the first and second members, in that order, of the specified input pair.
template<
class HASH_ALGORITHM,
class TYPE1,
class TYPE2>
void
hashAppend(
HASH_ALGORITHM& algorithm,
std::pair<TYPE1, TYPE2> const& input);
» more...
Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the elements in input will be hashed one at a time by calling hashAppend because the (template parameter) TYPE might not be hashable as a contiguous sequence of bytes. Also note that this hashAppend exists because some platforms don't recognize that adding a const qualifier is a better match for arrays than decaying to a pointer and using the hashAppend function for pointers.
template<
class HASH_ALGORITHM,
class TYPE,
size_t N>
void
hashAppend(
HASH_ALGORITHM& hashAlg,
TYPE(& input)[]);
» more...
Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the elements in input will be hashed one at a time by calling hashAppend because the (template parameter) TYPE might not be hashable as a contiguous sequence of bytes.
template<
class HASH_ALGORITHM,
class TYPE,
size_t N>
void
hashAppend(
HASH_ALGORITHM& hashAlg,
TYPE const(& input)[]);
» more...
Pass the specified input to the specified hashAlgorithm hashing algorithm of the (template parameter) type HASH_ALGORITHM. Note that this function violates the BDE coding standard, adding a function for a namespace for a different package, and none of the function parameters are from this package either. This is necessary in order to provide an implementation of bslh::hashAppend for the (native) standard library array type as we are not allowed to add overloads directly into namespace std, and this component essentially provides the interface between bsl and std array types.
template<
class HASH_ALGORITHM,
class TYPE,
size_t SIZE>
void
hashAppend(
HASH_ALGORITHM& hashAlgorithm,
std::array<TYPE, SIZE> const& input);
» more...
Pass the specified input string to the specified hashAlg hashing algorithm of the (template parameter) type HASHALG. Note that this function violates the BDE coding standard, adding a function for a namespace for a different package, and none of the function parameters are from this package either. This is necessary in order to provide an implementation of bslh::hashAppend for the (native) standard library string type as we are not allowed to add overloads directly into namespace std, and this component essentially provides the interface between bsl and std string types.
template<
class HASHALG,
class CHAR_TYPE,
class CHAR_TRAITS,
class ALLOCATOR>
void
hashAppend(
HASHALG& hashAlg,
std::basic_string<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR> const& input);
» more...