Add noexcept(false) to more strongly indicate that not being noexcept is important for hash tests.
llvm-svn: 299735
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp
index 0afc9f6..fb9843a 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp
@@ -50,7 +50,7 @@
template <class T>
struct hash<::min_pointer<T, std::integral_constant<size_t, 1>>> {
- size_t operator()(::min_pointer<T, std::integral_constant<size_t, 1>> p) const {
+ size_t operator()(::min_pointer<T, std::integral_constant<size_t, 1>> p) const noexcept(false) {
if (!p) return 0;
return std::hash<T*>{}(std::addressof(*p));
}
diff --git a/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp b/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp
index 6d9a260..4a0bf6d 100644
--- a/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp
@@ -26,7 +26,7 @@
template <>
struct hash<B> {
- size_t operator()(B const&) { return 0; }
+ size_t operator()(B const&) noexcept(false) { return 0; }
};
}