hash.h
Go to the documentation of this file.
22 void update(std::byte byte) noexcept { value_ = (value_ ^ static_cast<uint_fast8_t>(byte)) * prime; }
68 struct has_member_function_hash<T, std::void_t<decltype(std::declval<const T&>().hash())>> : std::true_type {};
105 struct hash<T, std::enable_if_t<std::is_integral_v<std::decay_t<T>> && sizeof(T) <= sizeof(std::size_t), void>> {
113 T, std::enable_if_t<!(std::is_integral_v<std::decay_t<T>> && sizeof(T) <= sizeof(std::size_t)) &&
126 constexpr static bool NEED_TO_PROVIDE_SPECIALIZATION_OF_TTG_OVERLOAD_HASH_FOR_THIS_TYPE = !std::is_same_v<T, T>;
141 T, ttg::meta::void_t<decltype(std::declval<ttg::hash<T>>()(std::declval<const T&>()))>> : std::true_type {};
void update(size_t n, const std::byte *bytes) noexcept
Updates the hash with an additional n bytes.
Definition: hash.h:25
constexpr bool has_ttg_hash_specialization_v
Definition: hash.h:143
combines 2 hash values; implementation based on boost::hash_combine_impl<64> from Boost v1....
Definition: hash.h:37
static std::size_t fn(std::size_t h, std::size_t k)
Definition: hash.h:40
Definition: hash.h:66
Definition: hash.h:138
auto operator()(const T &t) const
Definition: hash.h:86
auto operator()(const ttg::Void &) const
Definition: hash.h:100
auto operator()(const ttg::Void &) const
Definition: hash.h:94