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 0afc9f623..fb9843ac7 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 @@ -50,7 +50,7 @@ namespace std { template struct hash<::min_pointer>> { - size_t operator()(::min_pointer> p) const { + size_t operator()(::min_pointer> p) const noexcept(false) { if (!p) return 0; return std::hash{}(std::addressof(*p)); } diff --git a/test/std/utilities/optional/optional.hash/hash.pass.cpp b/test/std/utilities/optional/optional.hash/hash.pass.cpp index 6d9a2607d..4a0bf6d03 100644 --- a/test/std/utilities/optional/optional.hash/hash.pass.cpp +++ b/test/std/utilities/optional/optional.hash/hash.pass.cpp @@ -26,7 +26,7 @@ namespace std { template <> struct hash { - size_t operator()(B const&) { return 0; } + size_t operator()(B const&) noexcept(false) { return 0; } }; }