diff options
Diffstat (limited to 'absl/hash/hash_test.cc')
-rw-r--r-- | absl/hash/hash_test.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/absl/hash/hash_test.cc b/absl/hash/hash_test.cc index 449e77b4e1a1..bab560bd4e64 100644 --- a/absl/hash/hash_test.cc +++ b/absl/hash/hash_test.cc @@ -524,6 +524,7 @@ struct MinTag<a> : InvokeTagConstant<a> {}; template <InvokeTag... Tags> struct CustomHashType { + explicit CustomHashType(size_t val) : value(val) {} size_t value; }; @@ -590,7 +591,7 @@ void TestCustomHashType(InvokeTagConstant<InvokeTag::kNone>, T...) { EXPECT_TRUE(is_hashable<const type&>()); const size_t offset = static_cast<int>(std::min({T::value...})); - EXPECT_EQ(SpyHash(type{7}), SpyHash(size_t{7 + offset})); + EXPECT_EQ(SpyHash(type(7)), SpyHash(size_t{7 + offset})); } void TestCustomHashType(InvokeTagConstant<InvokeTag::kNone>) { |