From 0bdae913c374cfcb2e05c9d6f39abdbd4998977e Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Thu, 6 Apr 2017 23:50:33 +0000 Subject: [PATCH] Add noexcept(false) to more strongly indicate that not being noexcept is important for hash tests. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@299735 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp | 2 +- test/std/utilities/optional/optional.hash/hash.pass.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; } }; }