mirror of
https://github.com/boostorg/multiprecision.git
synced 2026-02-27 17:12:26 +00:00
FIx arithmetic_tests CI failures
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
#define BOOST_MULTIPRECISION_DETAIL_HASH_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
|
||||
namespace boost { namespace multiprecision { namespace detail {
|
||||
|
||||
@@ -16,8 +15,8 @@ inline void hash_combine(std::size_t&) {}
|
||||
template <typename T, typename... Args>
|
||||
inline void hash_combine(std::size_t& seed, const T& v, Args... args)
|
||||
{
|
||||
std::hash<T> hasher;
|
||||
seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2);
|
||||
// gmp types require explicit casting
|
||||
seed = static_cast<std::size_t>(static_cast<T>(seed) ^ (v + 0x9e3779b9 + (seed<<6) + (seed>>2)));
|
||||
hash_combine(seed, args...);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user