Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
std::hash_detail Namespace Reference

Function Documentation

◆ canonicalize_special_values()

template<class T, arene::base::constraints< std::enable_if_t< std::is_floating_point_v< T > > > = nullptr>
auto std::hash_detail::canonicalize_special_values ( T value) -> T
constexprnoexcept

Canonicalize any special values of the given type that compare equal, so their hashes will be equal too.

Template Parameters
TType of the value to canonicalize; SFINAE overload for floating point
Parameters
valueValue to canonicalize
Returns
The unique canonical representative of value's equivalence class
Template Parameters
TType of the value to canonicalize; SFINAE overload for non-floating point The value to canonicalize is passed as value.
Returns
The unique canonical representative of value's equivalence class

Variable Documentation

◆ fnv_offset_basis_v

template<class Scalar, class Dummy = nullptr_t>
Scalar std::hash_detail::fnv_offset_basis_v {0}
externconstexpr

The FNV offset basis to use depending on bit variant.

Template Parameters
Scalarthe scalar type
Dummya dummy type to allow partial specialization of variable template

The value of this constant depends on the bit length of the hash being used, determined by the type of Scalar. The value of this constant for common bit-lengths is provided by the paper "The FNV Non-Cryptographic Hash Algorithm".

◆ fnv_offset_basis_v< uint32_t, Dummy >

template<class Dummy>
uint32_t std::hash_detail::fnv_offset_basis_v< uint32_t, Dummy > {2166136261UL}
constexpr

The FNV 32-bit offset basis.

Template Parameters
Dummya dummy type to allow partial specialization of variable template

◆ fnv_offset_basis_v< uint64_t, Dummy >

template<class Dummy>
uint64_t std::hash_detail::fnv_offset_basis_v< uint64_t, Dummy > {14695981039346656037ULL}
constexpr

The FNV 64-bit offset basis.

Template Parameters
Dummya dummy type to allow partial specialization of variable template

◆ fnv_prime_v

template<class Scalar, class Dummy = nullptr_t>
Scalar std::hash_detail::fnv_prime_v {0}
externconstexpr

The FNV prime to use depending on bit variant.

Template Parameters
Scalarthe scalar type
Dummya dummy type to allow partial specialization of variable template

The value of this constant depends on the bit length of the hash being used, determined by the type of Scalar. The value of this constant for common bit-lengths is provided by the paper "The FNV Non-Cryptographic Hash Algorithm".

◆ fnv_prime_v< uint32_t, Dummy >

template<class Dummy>
uint32_t std::hash_detail::fnv_prime_v< uint32_t, Dummy > {16777619UL}
externconstexpr

The FNV 32-bit prime.

Template Parameters
Dummya dummy type to allow partial specialization of variable template

◆ fnv_prime_v< uint64_t, Dummy >

template<class Dummy>
uint64_t std::hash_detail::fnv_prime_v< uint64_t, Dummy > {1099511628211ULL}
externconstexpr

The FNV 64-bit prime.

Template Parameters
Dummya dummy type to allow partial specialization of variable template