From 958c90a865ae092bb76ea51226b1eee1645c1de1 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Sun, 17 Nov 2024 16:33:47 +0800 Subject: [PATCH] test: fix g++ compile errors --- src/core_test/helper/block_num.h | 2 +- src/core_test/helper/hash.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core_test/helper/block_num.h b/src/core_test/helper/block_num.h index e726229..0027563 100644 --- a/src/core_test/helper/block_num.h +++ b/src/core_test/helper/block_num.h @@ -37,7 +37,7 @@ const std::vector& block_nums(); namespace std { template <> -struct std::hash { +struct hash { size_t operator()(const helper::block_num_t val) const noexcept { return (val.n_1x1 << 6) ^ (val.n_1x2 << 3) ^ val.n_2x1; } diff --git a/src/core_test/helper/hash.h b/src/core_test/helper/hash.h index 9942bd4..fa61179 100644 --- a/src/core_test/helper/hash.h +++ b/src/core_test/helper/hash.h @@ -6,8 +6,10 @@ /// They do not guarantee the security of the hash algorithm, as this scenario /// is only used to verify the correctness of the data. +#include #include #include +#include namespace helper {