rippled
Public Member Functions | List of all members
beast::is_contiguously_hashable< T, HashAlgorithm > Struct Template Reference

Metafunction returning true if the type can be hashed in one call. More...

Inheritance diagram for beast::is_contiguously_hashable< T, HashAlgorithm >:
Inheritance graph
[legend]
Collaboration diagram for beast::is_contiguously_hashable< T, HashAlgorithm >:
Collaboration graph
[legend]

Public Member Functions

 is_contiguously_hashable ()=default
 

Detailed Description

template<class T, class HashAlgorithm>
struct beast::is_contiguously_hashable< T, HashAlgorithm >

Metafunction returning true if the type can be hashed in one call.

For is_contiguously_hashable<T>::value to be true, then for every combination of possible values of T held in x and y, if x == y, then it must be true that memcmp(&x, &y, sizeof(T)) return 0; i.e. that x and y are represented by the same bit pattern.

For example: A two's complement int should be contiguously hashable. Every bit pattern produces a unique value that does not compare equal to any other bit pattern's value. A IEEE floating point should not be contiguously hashable because -0. and 0. have different bit patterns, though they compare equal.

Definition at line 183 of file hash_append.h.

Constructor & Destructor Documentation

◆ is_contiguously_hashable()

template<class T , class HashAlgorithm >
beast::is_contiguously_hashable< T, HashAlgorithm >::is_contiguously_hashable ( )
explicitdefault