5#ifndef INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_HASH_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_HASH_HPP_
48template <
class Scalar,
class Dummy =
nullptr_t>
68template <
class Scalar,
class Dummy =
nullptr_t>
85template <
class T, arene::base::constra
ints<std::enable_if_t<std::is_
floating_po
int_v<T>>> =
nullptr>
90 ARENE_IGNORE_ALL(
"-Wfloat-equal",
"Checking specifically for exact 0.0 so it can be specially handled");
106template <
class T, arene::base::constra
ints<std::enable_if_t<!std::is_
floating_po
int_v<T>>> =
nullptr>
131 "long double is not supported in the Arene Base Standard Library"
161template <
class T,
typename = arene::base::constra
ints<>>
169class default_hash<T,
arene::base::constraints<enable_if_t<is_fundamental_v<T> || is_enum_v<T> || is_pointer_v<T>>>>
A backport of std::span for C++14. Provides a view over a contiguous range of elements of type T.
Definition span.hpp:315
Default implementation of std::hash implemented only for fundamental types, enumerations and pointers...
Definition hash.hpp:162
FNV-1a hash algorithm.
Definition hash.hpp:127
size_t result_type
The type of the result of the function call operator.
Definition hash.hpp:137
T argument_type
The type of the argument of the function call operator.
Definition hash.hpp:139
auto operator()(T value) const noexcept -> size_t
Calculate the hash of a value.
Definition hash.hpp:144
Public export header for the constraints subpackage.
#define ARENE_IGNORE_END()
Ends a region of a suppressed diagnostic.
Definition diagnostics.hpp:136
#define ARENE_IGNORE_START()
Begins a region of a suppressed diagnostic.
Definition diagnostics.hpp:131
#define ARENE_IGNORE_ALL(s, comment)
Pushes an ignore for a diagnostic into the compiler for any compiler.
Definition diagnostics.hpp:122
constexpr auto to_underlying(T value) noexcept -> std::underlying_type_t< T >
This replicates a function that went into C++23 called std::to_underlying (https://wg21....
Definition to_underlying.hpp:26
auto as_bytes(span< T, N > spn) noexcept -> span< byte const, span_detail::is_dynamic_extent(N) ? dynamic_extent :(N *sizeof(T))>
Obtain a const view to the object representation of the elements of the span spn.
Definition span.hpp:967
Definition accumulate.hpp:36
constexpr Scalar fnv_prime_v
The FNV prime to use depending on bit variant.
constexpr auto canonicalize_special_values(T value) noexcept -> T
Canonicalize any special values of the given type that compare equal, so their hashes will be equal t...
Definition hash.hpp:86
constexpr Scalar fnv_offset_basis_v
The FNV offset basis to use depending on bit variant.
constexpr Type integral_constant< Type, Value >::value
Out-of-line definition for the value constant.
Definition integral_constant.hpp:64
constexpr bool is_same_v
Trait to detect if the two supplied types are the same or not. The value is true if the types are the...
::size_t size_t
A type suitable for holding the size of an object.
Definition cstddef.hpp:29
::uint32_t uint32_t
A 32-bit unsigned integer type.
Definition cstdint.hpp:41
typename conditional< Condition, TrueType, FalseType >::type conditional_t
Helper template alias for selecting types based on a condition. If the supplied Condition is true the...
Definition conditional.hpp:57
::uint64_t uint64_t
A 64-bit unsigned integer type.
Definition cstdint.hpp:47
Public export header for span.hpp.
hash function primary template
Definition hash.hpp:179
Public export header for content from arene/base/utility.