Add noexcept(false) to more strongly indicate that not being noexcept is important...
authorBilly Robert O'Neal III <bion@microsoft.com>
Thu, 6 Apr 2017 23:50:33 +0000 (23:50 +0000)
committerBilly Robert O'Neal III <bion@microsoft.com>
Thu, 6 Apr 2017 23:50:33 +0000 (23:50 +0000)
llvm-svn: 299735

libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.hash/hash_unique_ptr.pass.cpp
libcxx/test/std/utilities/optional/optional.hash/hash.pass.cpp

index 0afc9f6..fb9843a 100644 (file)
@@ -50,7 +50,7 @@ namespace std {
 
 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));
   }
index 6d9a260..4a0bf6d 100644 (file)
@@ -26,7 +26,7 @@ namespace std {
 
 template <>
 struct hash<B> {
-  size_t operator()(B const&) { return 0; }
+  size_t operator()(B const&) noexcept(false) { return 0; }
 };
 
 }