aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/ext/hash_map
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/ext/hash_map')
-rw-r--r--libcxx/include/ext/hash_map22
1 files changed, 11 insertions, 11 deletions
diff --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map
index a581d5c550c4..3ad4b166865a 100644
--- a/libcxx/include/ext/hash_map
+++ b/libcxx/include/ext/hash_map
@@ -210,10 +210,6 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
#include <stdexcept>
#include <type_traits>
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-# include <iterator>
-#endif
-
#if defined(__DEPRECATED) && __DEPRECATED
#if defined(_LIBCPP_WARNING)
_LIBCPP_WARNING("Use of the header <ext/hash_map> is deprecated. Migrate to <unordered_map>")
@@ -382,7 +378,7 @@ public:
typedef std::pair<key_type, mapped_type> value_type;
typedef typename _HashIterator::difference_type difference_type;
typedef value_type& reference;
- typedef typename std::__rebind_pointer<typename _HashIterator::pointer, value_type>::type
+ typedef std::__rebind_pointer_t<typename _HashIterator::pointer, value_type>
pointer;
_LIBCPP_INLINE_VISIBILITY __hash_map_iterator() {}
@@ -427,7 +423,7 @@ public:
typedef std::pair<key_type, mapped_type> value_type;
typedef typename _HashIterator::difference_type difference_type;
typedef const value_type& reference;
- typedef typename std::__rebind_pointer<typename _HashIterator::pointer, const value_type>::type
+ typedef std::__rebind_pointer_t<typename _HashIterator::pointer, const value_type>
pointer;
_LIBCPP_INLINE_VISIBILITY __hash_map_const_iterator() {}
@@ -487,8 +483,7 @@ private:
typedef std::pair<key_type, mapped_type> __value_type;
typedef __hash_map_hasher<__value_type, hasher> __hasher;
typedef __hash_map_equal<__value_type, key_equal> __key_equal;
- typedef typename std::__rebind_alloc_helper<
- std::allocator_traits<allocator_type>, __value_type>::type __allocator_type;
+ typedef std::__rebind_alloc<std::allocator_traits<allocator_type>, __value_type> __allocator_type;
typedef std::__hash_table<__value_type, __hasher,
__key_equal, __allocator_type> __table;
@@ -714,7 +709,7 @@ swap(hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
}
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-bool
+_LIBCPP_HIDE_FROM_ABI bool
operator==(const hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
const hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
{
@@ -761,7 +756,7 @@ private:
typedef std::pair<key_type, mapped_type> __value_type;
typedef __hash_map_hasher<__value_type, hasher> __hasher;
typedef __hash_map_equal<__value_type, key_equal> __key_equal;
- typedef typename std::__rebind_alloc_helper<std::allocator_traits<allocator_type>, __value_type>::type __allocator_type;
+ typedef std::__rebind_alloc<std::allocator_traits<allocator_type>, __value_type> __allocator_type;
typedef std::__hash_table<__value_type, __hasher,
__key_equal, __allocator_type> __table;
@@ -954,7 +949,7 @@ swap(hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
}
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-bool
+_LIBCPP_HIDE_FROM_ABI bool
operator==(const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
{
@@ -987,4 +982,9 @@ operator!=(const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
} // namespace __gnu_cxx
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <concepts>
+# include <iterator>
+#endif
+
#endif // _LIBCPP_HASH_MAP