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
This commit is contained in:
Billy Robert O'Neal III
2017-04-06 23:50:33 +00:00
parent 2889d45aaa
commit 0bdae913c3
2 changed files with 2 additions and 2 deletions

View 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));
}

View 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; }
};
}