diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp index f989a0173..879ea405c 100644 --- a/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp +++ b/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp @@ -46,13 +46,16 @@ void test_disabled_with_deleter() { test_hash_disabled_for_type(); } +namespace std { + template -struct std::hash>> { - size_t operator()(min_pointer> p) const { +struct hash<::min_pointer>> { + size_t operator()(::min_pointer> p) const { if (!p) return 0; return std::hash{}(std::addressof(*p)); } }; +} struct A {}; diff --git a/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp b/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp index 0fe020bf3..9ab58ea6c 100644 --- a/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp +++ b/test/std/utilities/type.index/type.index.synopsis/hash_type_index.pass.cpp @@ -30,7 +30,9 @@ int main() static_assert((std::is_same::value), "" ); static_assert((std::is_same::value), "" ); } +#if TEST_STD_VER >= 11 { test_hash_enabled_for_type(std::type_index(typeid(int))); } +#endif } diff --git a/test/support/poisoned_hash_helper.hpp b/test/support/poisoned_hash_helper.hpp index 0a5675a2c..e8a2d8c3a 100644 --- a/test/support/poisoned_hash_helper.hpp +++ b/test/support/poisoned_hash_helper.hpp @@ -163,7 +163,7 @@ void test_hash_enabled(InputKey const& key) { static_assert(can_hash &&)>(), ""); static_assert(can_hash const&&)>(), ""); - const Hash h; + const Hash h{}; assert(h(key) == h(key)); }