diff --git a/beast/hash/hash_append.h b/beast/hash/hash_append.h index 2d8ddbe24..e7d274535 100644 --- a/beast/hash/hash_append.h +++ b/beast/hash/hash_append.h @@ -62,7 +62,7 @@ template /*constexpr*/ inline void -maybe_reverse_bytes(T& t, std::true_type) +maybe_reverse_bytes(T& t, std::false_type) { } @@ -70,7 +70,7 @@ template /*constexpr*/ inline void -maybe_reverse_bytes(T& t, std::false_type) +maybe_reverse_bytes(T& t, std::true_type) { reverse_bytes(t); } @@ -82,7 +82,7 @@ void maybe_reverse_bytes(T& t, Hasher&) { maybe_reverse_bytes(t, std::integral_constant{}); + Hasher::endian != endian::native>{}); } } // detail @@ -140,7 +140,7 @@ struct is_uniquely_represented> template struct is_uniquely_represented - : public std::integral_constant::value> + : public is_uniquely_represented { }; @@ -176,7 +176,7 @@ struct is_contiguously_hashable template struct is_contiguously_hashable - : public std::integral_constant::value && + : public std::integral_constant::value && (sizeof(T) == 1 || HashAlgorithm::endian == endian::native)> {}; diff --git a/beast/hash/siphash.h b/beast/hash/siphash.h index a76466231..eeabfdcae 100644 --- a/beast/hash/siphash.h +++ b/beast/hash/siphash.h @@ -42,6 +42,8 @@ private: public: using result_type = std::size_t; + static beast::endian const endian = beast::endian::native; + siphash() = default; explicit diff --git a/beast/hash/xxhasher.h b/beast/hash/xxhasher.h index 7150db73c..c17d5ef5c 100644 --- a/beast/hash/xxhasher.h +++ b/beast/hash/xxhasher.h @@ -43,10 +43,10 @@ private: detail::XXH64_state_t state_; public: - static beast::endian const endian = beast::endian::native; - using result_type = std::size_t; + static beast::endian const endian = beast::endian::native; + xxhasher() noexcept { detail::XXH64_reset (&state_, 1);