diff --git a/absl/hash/hash_test.cc b/absl/hash/hash_test.cc
index 449e77b4e..bab560bd4 100644
--- a/absl/hash/hash_test.cc
+++ b/absl/hash/hash_test.cc
@@ -524,6 +524,7 @@ struct MinTag : InvokeTagConstant {};
template
struct CustomHashType {
+ explicit CustomHashType(size_t val) : value(val) {}
size_t value;
};
@@ -590,7 +591,7 @@ void TestCustomHashType(InvokeTagConstant, T...) {
EXPECT_TRUE(is_hashable());
const size_t offset = static_cast(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) {