aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/unordered_set.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/bits/unordered_set.h')
-rw-r--r--libstdc++-v3/include/bits/unordered_set.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/unordered_set.h b/libstdc++-v3/include/bits/unordered_set.h
index 12b7bda138f..9aef0829749 100644
--- a/libstdc++-v3/include/bits/unordered_set.h
+++ b/libstdc++-v3/include/bits/unordered_set.h
@@ -40,7 +40,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
class _Hash = hash<_Value>,
class _Pred = std::equal_to<_Value>,
class _Alloc = std::allocator<_Value>,
- bool __cache_hash_code = false>
+ bool __cache_hash_code =
+ __not_<__and_<is_integral<_Value>,
+ __detail::__is_noexcept_hash<_Value, _Hash>>>::value>
class __unordered_set
: public _Hashtable<_Value, _Value, _Alloc,
std::_Identity<_Value>, _Pred,
@@ -121,7 +123,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
class _Hash = hash<_Value>,
class _Pred = std::equal_to<_Value>,
class _Alloc = std::allocator<_Value>,
- bool __cache_hash_code = false>
+ bool __cache_hash_code =
+ __not_<__and_<is_integral<_Value>,
+ __detail::__is_noexcept_hash<_Value, _Hash>>>::value>
class __unordered_multiset
: public _Hashtable<_Value, _Value, _Alloc,
std::_Identity<_Value>, _Pred,