aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/map
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/map')
-rw-r--r--libcxx/include/map65
1 files changed, 34 insertions, 31 deletions
diff --git a/libcxx/include/map b/libcxx/include/map
index 7654a8fc2847..106ed5259ed9 100644
--- a/libcxx/include/map
+++ b/libcxx/include/map
@@ -528,24 +528,45 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred); // C++20
*/
+#include <__algorithm/equal.h>
+#include <__algorithm/lexicographical_compare.h>
+#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
-#include <__debug>
+#include <__functional/binary_function.h>
#include <__functional/is_transparent.h>
+#include <__functional/operations.h>
+#include <__iterator/erase_if_container.h>
#include <__iterator/iterator_traits.h>
+#include <__iterator/reverse_iterator.h>
#include <__node_handle>
#include <__tree>
#include <__utility/forward.h>
-#include <compare>
-#include <functional>
-#include <initializer_list>
-#include <iterator> // __libcpp_erase_if_container
+#include <__utility/swap.h>
#include <memory>
#include <type_traits>
-#include <utility>
#include <version>
+#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+# include <functional>
+# include <iterator>
+# include <utility>
+#endif
+
+// standard-mandated includes
+
+// [iterator.range]
+#include <__iterator/access.h>
+#include <__iterator/data.h>
+#include <__iterator/empty.h>
+#include <__iterator/reverse_access.h>
+#include <__iterator/size.h>
+
+// [associative.map.syn]
+#include <compare>
+#include <initializer_list>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#pragma GCC system_header
+# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -956,32 +977,23 @@ public:
typedef _Key key_type;
typedef _Tp mapped_type;
typedef pair<const key_type, mapped_type> value_type;
- typedef __identity_t<_Compare> key_compare;
- typedef __identity_t<_Allocator> allocator_type;
+ typedef __type_identity_t<_Compare> key_compare;
+ typedef __type_identity_t<_Allocator> allocator_type;
typedef value_type& reference;
typedef const value_type& const_reference;
static_assert((is_same<typename allocator_type::value_type, value_type>::value),
"Allocator::value_type must be same type as value_type");
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
class _LIBCPP_TEMPLATE_VIS value_compare
-#if defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- : public binary_function<value_type, value_type, bool>
-#endif
+ : public __binary_function<value_type, value_type, bool>
{
-_LIBCPP_SUPPRESS_DEPRECATED_POP
friend class map;
protected:
key_compare comp;
_LIBCPP_INLINE_VISIBILITY value_compare(key_compare c) : comp(c) {}
public:
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- _LIBCPP_DEPRECATED_IN_CXX17 typedef bool result_type;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef value_type first_argument_type;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef value_type second_argument_type;
-#endif
_LIBCPP_INLINE_VISIBILITY
bool operator()(const value_type& __x, const value_type& __y) const
{return comp(__x.first, __y.first);}
@@ -1741,21 +1753,17 @@ public:
typedef _Key key_type;
typedef _Tp mapped_type;
typedef pair<const key_type, mapped_type> value_type;
- typedef __identity_t<_Compare> key_compare;
- typedef __identity_t<_Allocator> allocator_type;
+ typedef __type_identity_t<_Compare> key_compare;
+ typedef __type_identity_t<_Allocator> allocator_type;
typedef value_type& reference;
typedef const value_type& const_reference;
static_assert((is_same<typename allocator_type::value_type, value_type>::value),
"Allocator::value_type must be same type as value_type");
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
class _LIBCPP_TEMPLATE_VIS value_compare
-#if defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- : public binary_function<value_type, value_type, bool>
-#endif
+ : public __binary_function<value_type, value_type, bool>
{
-_LIBCPP_SUPPRESS_DEPRECATED_POP
friend class multimap;
protected:
key_compare comp;
@@ -1763,11 +1771,6 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
_LIBCPP_INLINE_VISIBILITY
value_compare(key_compare c) : comp(c) {}
public:
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- _LIBCPP_DEPRECATED_IN_CXX17 typedef bool result_type;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef value_type first_argument_type;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef value_type second_argument_type;
-#endif
_LIBCPP_INLINE_VISIBILITY
bool operator()(const value_type& __x, const value_type& __y) const
{return comp(__x.first, __y.first);}