From 64f1b82a54dfe99387447273eed936a5db1c1a36 Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 3 Nov 2019 14:45:25 -0500 Subject: [PATCH] fix issue for using hash_value() as a way to implement hash in a class --- examples/hash_value.cc | 2 +- parallel_hashmap/phmap_utils.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/hash_value.cc b/examples/hash_value.cc index 04551ff..43d2b05 100644 --- a/examples/hash_value.cc +++ b/examples/hash_value.cc @@ -1,4 +1,4 @@ -#include "hash_std.h" // defines Person with std::hash specialization +#include "hash_value.h" // defines Person with std::hash specialization #include #include diff --git a/parallel_hashmap/phmap_utils.h b/parallel_hashmap/phmap_utils.h index dfe595a..ef29f08 100644 --- a/parallel_hashmap/phmap_utils.h +++ b/parallel_hashmap/phmap_utils.h @@ -116,7 +116,7 @@ private: typedef std::true_type yes; typedef std::false_type no; - template static auto test(int) -> decltype(U::hash_value(std::declval()) == 1, yes()); + template static auto test(int) -> decltype(hash_value(std::declval()) == 1, yes()); template static no test(...); @@ -137,7 +137,7 @@ struct Hash template ::value, int>::type = 0> size_t _hash(const T& val) const { - return U::hash_value(val); + return hash_value(val); } template ::value, int>::type = 0>