aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/map
diff options
context:
space:
mode:
authordanlark <danlark@yandex-team.ru>2022-02-10 16:46:10 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:10 +0300
commitbaa58daefa91fde4b4769facdbd2903763b9c6a8 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /contrib/libs/cxxsupp/libcxx/include/map
parent3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (diff)
downloadydb-baa58daefa91fde4b4769facdbd2903763b9c6a8.tar.gz
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/map')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/map398
1 files changed, 199 insertions, 199 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/map b/contrib/libs/cxxsupp/libcxx/include/map
index f634b68fb4..c78a7ee31a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/map
+++ b/contrib/libs/cxxsupp/libcxx/include/map
@@ -1,9 +1,9 @@
// -*- C++ -*-
//===----------------------------- map ------------------------------------===//
//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -39,8 +39,8 @@ public:
typedef implementation-defined const_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef unspecified node_type; // C++17
- typedef INSERT_RETURN_TYPE<iterator, node_type> insert_return_type; // C++17
+ typedef unspecified node_type; // C++17
+ typedef INSERT_RETURN_TYPE<iterator, node_type> insert_return_type; // C++17
class value_compare
{
@@ -140,11 +140,11 @@ public:
void insert(InputIterator first, InputIterator last);
void insert(initializer_list<value_type> il);
- node_type extract(const_iterator position); // C++17
- node_type extract(const key_type& x); // C++17
- insert_return_type insert(node_type&& nh); // C++17
- iterator insert(const_iterator hint, node_type&& nh); // C++17
-
+ node_type extract(const_iterator position); // C++17
+ node_type extract(const key_type& x); // C++17
+ insert_return_type insert(node_type&& nh); // C++17
+ iterator insert(const_iterator hint, node_type&& nh); // C++17
+
template <class... Args>
pair<iterator, bool> try_emplace(const key_type& k, Args&&... args); // C++17
template <class... Args>
@@ -168,15 +168,15 @@ public:
iterator erase(const_iterator first, const_iterator last);
void clear() noexcept;
- template<class C2>
- void merge(map<Key, T, C2, Allocator>& source); // C++17
- template<class C2>
- void merge(map<Key, T, C2, Allocator>&& source); // C++17
- template<class C2>
- void merge(multimap<Key, T, C2, Allocator>& source); // C++17
- template<class C2>
- void merge(multimap<Key, T, C2, Allocator>&& source); // C++17
-
+ template<class C2>
+ void merge(map<Key, T, C2, Allocator>& source); // C++17
+ template<class C2>
+ void merge(map<Key, T, C2, Allocator>&& source); // C++17
+ template<class C2>
+ void merge(multimap<Key, T, C2, Allocator>& source); // C++17
+ template<class C2>
+ void merge(multimap<Key, T, C2, Allocator>&& source); // C++17
+
void swap(map& m)
noexcept(allocator_traits<allocator_type>::is_always_equal::value &&
is_nothrow_swappable<key_compare>::value); // C++17
@@ -259,11 +259,11 @@ void
swap(map<Key, T, Compare, Allocator>& x, map<Key, T, Compare, Allocator>& y)
noexcept(noexcept(x.swap(y)));
-template <class Key, class T, class Compare, class Allocator, class Predicate>
+template <class Key, class T, class Compare, class Allocator, class Predicate>
typename map<Key, T, Compare, Allocator>::size_type
erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred); // C++20
-
-
+
+
template <class Key, class T, class Compare = less<Key>,
class Allocator = allocator<pair<const Key, T>>>
class multimap
@@ -286,7 +286,7 @@ public:
typedef implementation-defined const_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef unspecified node_type; // C++17
+ typedef unspecified node_type; // C++17
class value_compare
{
@@ -378,26 +378,26 @@ public:
void insert(InputIterator first, InputIterator last);
void insert(initializer_list<value_type> il);
- node_type extract(const_iterator position); // C++17
- node_type extract(const key_type& x); // C++17
- iterator insert(node_type&& nh); // C++17
- iterator insert(const_iterator hint, node_type&& nh); // C++17
-
+ node_type extract(const_iterator position); // C++17
+ node_type extract(const key_type& x); // C++17
+ iterator insert(node_type&& nh); // C++17
+ iterator insert(const_iterator hint, node_type&& nh); // C++17
+
iterator erase(const_iterator position);
iterator erase(iterator position); // C++14
size_type erase(const key_type& k);
iterator erase(const_iterator first, const_iterator last);
void clear() noexcept;
- template<class C2>
- void merge(multimap<Key, T, C2, Allocator>& source); // C++17
- template<class C2>
- void merge(multimap<Key, T, C2, Allocator>&& source); // C++17
- template<class C2>
- void merge(map<Key, T, C2, Allocator>& source); // C++17
- template<class C2>
- void merge(map<Key, T, C2, Allocator>&& source); // C++17
-
+ template<class C2>
+ void merge(multimap<Key, T, C2, Allocator>& source); // C++17
+ template<class C2>
+ void merge(multimap<Key, T, C2, Allocator>&& source); // C++17
+ template<class C2>
+ void merge(map<Key, T, C2, Allocator>& source); // C++17
+ template<class C2>
+ void merge(map<Key, T, C2, Allocator>&& source); // C++17
+
void swap(multimap& m)
noexcept(allocator_traits<allocator_type>::is_always_equal::value &&
is_nothrow_swappable<key_compare>::value); // C++17
@@ -481,10 +481,10 @@ swap(multimap<Key, T, Compare, Allocator>& x,
multimap<Key, T, Compare, Allocator>& y)
noexcept(noexcept(x.swap(y)));
-template <class Key, class T, class Compare, class Allocator, class Predicate>
+template <class Key, class T, class Compare, class Allocator, class Predicate>
typename multimap<Key, T, Compare, Allocator>::size_type
erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred); // C++20
-
+
} // std
*/
@@ -502,7 +502,7 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred); // C++20
#include <memory>
#include <type_traits>
#include <utility>
-#include <version>
+#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
@@ -510,8 +510,8 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred); // C++20
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Key, class _CP, class _Compare,
- bool = is_empty<_Compare>::value && !__libcpp_is_final<_Compare>::value>
+template <class _Key, class _CP, class _Compare,
+ bool = is_empty<_Compare>::value && !__libcpp_is_final<_Compare>::value>
class __map_value_compare
: private _Compare
{
@@ -969,16 +969,16 @@ public:
typedef _VSTD::reverse_iterator<iterator> reverse_iterator;
typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
-#if _LIBCPP_STD_VER > 14
- typedef __map_node_handle<typename __base::__node, allocator_type> node_type;
- typedef __insert_return_type<iterator, node_type> insert_return_type;
-#endif
-
- template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS map;
- template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS multimap;
-
+#if _LIBCPP_STD_VER > 14
+ typedef __map_node_handle<typename __base::__node, allocator_type> node_type;
+ typedef __insert_return_type<iterator, node_type> insert_return_type;
+#endif
+
+ template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
+ friend class _LIBCPP_TEMPLATE_VIS map;
+ template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
+ friend class _LIBCPP_TEMPLATE_VIS multimap;
+
_LIBCPP_INLINE_VISIBILITY
map()
_NOEXCEPT_(
@@ -1331,68 +1331,68 @@ public:
_LIBCPP_INLINE_VISIBILITY
void clear() _NOEXCEPT {__tree_.clear();}
-#if _LIBCPP_STD_VER > 14
- _LIBCPP_INLINE_VISIBILITY
- insert_return_type insert(node_type&& __nh)
- {
- _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
- "node_type with incompatible allocator passed to map::insert()");
- return __tree_.template __node_handle_insert_unique<
- node_type, insert_return_type>(_VSTD::move(__nh));
- }
- _LIBCPP_INLINE_VISIBILITY
- iterator insert(const_iterator __hint, node_type&& __nh)
- {
- _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
- "node_type with incompatible allocator passed to map::insert()");
- return __tree_.template __node_handle_insert_unique<node_type>(
- __hint.__i_, _VSTD::move(__nh));
- }
- _LIBCPP_INLINE_VISIBILITY
- node_type extract(key_type const& __key)
- {
- return __tree_.template __node_handle_extract<node_type>(__key);
- }
- _LIBCPP_INLINE_VISIBILITY
- node_type extract(const_iterator __it)
- {
- return __tree_.template __node_handle_extract<node_type>(__it.__i_);
- }
- template <class _Compare2>
- _LIBCPP_INLINE_VISIBILITY
- void merge(map<key_type, mapped_type, _Compare2, allocator_type>& __source)
- {
- _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
- "merging container with incompatible allocator");
- __tree_.__node_handle_merge_unique(__source.__tree_);
- }
- template <class _Compare2>
- _LIBCPP_INLINE_VISIBILITY
- void merge(map<key_type, mapped_type, _Compare2, allocator_type>&& __source)
- {
- _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
- "merging container with incompatible allocator");
- __tree_.__node_handle_merge_unique(__source.__tree_);
- }
- template <class _Compare2>
- _LIBCPP_INLINE_VISIBILITY
- void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>& __source)
- {
- _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
- "merging container with incompatible allocator");
- __tree_.__node_handle_merge_unique(__source.__tree_);
- }
- template <class _Compare2>
- _LIBCPP_INLINE_VISIBILITY
- void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>&& __source)
- {
- _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
- "merging container with incompatible allocator");
- __tree_.__node_handle_merge_unique(__source.__tree_);
- }
-#endif
-
- _LIBCPP_INLINE_VISIBILITY
+#if _LIBCPP_STD_VER > 14
+ _LIBCPP_INLINE_VISIBILITY
+ insert_return_type insert(node_type&& __nh)
+ {
+ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+ "node_type with incompatible allocator passed to map::insert()");
+ return __tree_.template __node_handle_insert_unique<
+ node_type, insert_return_type>(_VSTD::move(__nh));
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ iterator insert(const_iterator __hint, node_type&& __nh)
+ {
+ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+ "node_type with incompatible allocator passed to map::insert()");
+ return __tree_.template __node_handle_insert_unique<node_type>(
+ __hint.__i_, _VSTD::move(__nh));
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ node_type extract(key_type const& __key)
+ {
+ return __tree_.template __node_handle_extract<node_type>(__key);
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ node_type extract(const_iterator __it)
+ {
+ return __tree_.template __node_handle_extract<node_type>(__it.__i_);
+ }
+ template <class _Compare2>
+ _LIBCPP_INLINE_VISIBILITY
+ void merge(map<key_type, mapped_type, _Compare2, allocator_type>& __source)
+ {
+ _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+ "merging container with incompatible allocator");
+ __tree_.__node_handle_merge_unique(__source.__tree_);
+ }
+ template <class _Compare2>
+ _LIBCPP_INLINE_VISIBILITY
+ void merge(map<key_type, mapped_type, _Compare2, allocator_type>&& __source)
+ {
+ _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+ "merging container with incompatible allocator");
+ __tree_.__node_handle_merge_unique(__source.__tree_);
+ }
+ template <class _Compare2>
+ _LIBCPP_INLINE_VISIBILITY
+ void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>& __source)
+ {
+ _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+ "merging container with incompatible allocator");
+ __tree_.__node_handle_merge_unique(__source.__tree_);
+ }
+ template <class _Compare2>
+ _LIBCPP_INLINE_VISIBILITY
+ void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>&& __source)
+ {
+ _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+ "merging container with incompatible allocator");
+ __tree_.__node_handle_merge_unique(__source.__tree_);
+ }
+#endif
+
+ _LIBCPP_INLINE_VISIBILITY
void swap(map& __m)
_NOEXCEPT_(__is_nothrow_swappable<__base>::value)
{__tree_.swap(__m.__tree_);}
@@ -1679,17 +1679,17 @@ swap(map<_Key, _Tp, _Compare, _Allocator>& __x,
__x.swap(__y);
}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCPP_STD_VER > 17
template <class _Key, class _Tp, class _Compare, class _Allocator,
class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY
typename map<_Key, _Tp, _Compare, _Allocator>::size_type
erase_if(map<_Key, _Tp, _Compare, _Allocator>& __c, _Predicate __pred) {
return _VSTD::__libcpp_erase_if_container(__c, __pred);
}
-#endif
-
-
+#endif
+
+
template <class _Key, class _Tp, class _Compare = less<_Key>,
class _Allocator = allocator<pair<const _Key, _Tp> > >
class _LIBCPP_TEMPLATE_VIS multimap
@@ -1753,15 +1753,15 @@ public:
typedef _VSTD::reverse_iterator<iterator> reverse_iterator;
typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
-#if _LIBCPP_STD_VER > 14
- typedef __map_node_handle<typename __base::__node, allocator_type> node_type;
-#endif
-
- template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS map;
- template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS multimap;
-
+#if _LIBCPP_STD_VER > 14
+ typedef __map_node_handle<typename __base::__node, allocator_type> node_type;
+#endif
+
+ template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
+ friend class _LIBCPP_TEMPLATE_VIS map;
+ template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
+ friend class _LIBCPP_TEMPLATE_VIS multimap;
+
_LIBCPP_INLINE_VISIBILITY
multimap()
_NOEXCEPT_(
@@ -2005,73 +2005,73 @@ public:
_LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __f, const_iterator __l)
{return __tree_.erase(__f.__i_, __l.__i_);}
-
-#if _LIBCPP_STD_VER > 14
- _LIBCPP_INLINE_VISIBILITY
- iterator insert(node_type&& __nh)
- {
- _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
- "node_type with incompatible allocator passed to multimap::insert()");
- return __tree_.template __node_handle_insert_multi<node_type>(
- _VSTD::move(__nh));
- }
- _LIBCPP_INLINE_VISIBILITY
- iterator insert(const_iterator __hint, node_type&& __nh)
- {
- _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
- "node_type with incompatible allocator passed to multimap::insert()");
- return __tree_.template __node_handle_insert_multi<node_type>(
- __hint.__i_, _VSTD::move(__nh));
- }
- _LIBCPP_INLINE_VISIBILITY
- node_type extract(key_type const& __key)
- {
- return __tree_.template __node_handle_extract<node_type>(__key);
- }
- _LIBCPP_INLINE_VISIBILITY
- node_type extract(const_iterator __it)
- {
- return __tree_.template __node_handle_extract<node_type>(
- __it.__i_);
- }
- template <class _Compare2>
- _LIBCPP_INLINE_VISIBILITY
- void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>& __source)
- {
- _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
- "merging container with incompatible allocator");
- return __tree_.__node_handle_merge_multi(__source.__tree_);
- }
- template <class _Compare2>
- _LIBCPP_INLINE_VISIBILITY
- void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>&& __source)
- {
- _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
- "merging container with incompatible allocator");
- return __tree_.__node_handle_merge_multi(__source.__tree_);
- }
- template <class _Compare2>
- _LIBCPP_INLINE_VISIBILITY
- void merge(map<key_type, mapped_type, _Compare2, allocator_type>& __source)
- {
- _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
- "merging container with incompatible allocator");
- return __tree_.__node_handle_merge_multi(__source.__tree_);
- }
- template <class _Compare2>
- _LIBCPP_INLINE_VISIBILITY
- void merge(map<key_type, mapped_type, _Compare2, allocator_type>&& __source)
- {
- _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
- "merging container with incompatible allocator");
- return __tree_.__node_handle_merge_multi(__source.__tree_);
- }
-#endif
-
- _LIBCPP_INLINE_VISIBILITY
- void clear() _NOEXCEPT {__tree_.clear();}
-
- _LIBCPP_INLINE_VISIBILITY
+
+#if _LIBCPP_STD_VER > 14
+ _LIBCPP_INLINE_VISIBILITY
+ iterator insert(node_type&& __nh)
+ {
+ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+ "node_type with incompatible allocator passed to multimap::insert()");
+ return __tree_.template __node_handle_insert_multi<node_type>(
+ _VSTD::move(__nh));
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ iterator insert(const_iterator __hint, node_type&& __nh)
+ {
+ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+ "node_type with incompatible allocator passed to multimap::insert()");
+ return __tree_.template __node_handle_insert_multi<node_type>(
+ __hint.__i_, _VSTD::move(__nh));
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ node_type extract(key_type const& __key)
+ {
+ return __tree_.template __node_handle_extract<node_type>(__key);
+ }
+ _LIBCPP_INLINE_VISIBILITY
+ node_type extract(const_iterator __it)
+ {
+ return __tree_.template __node_handle_extract<node_type>(
+ __it.__i_);
+ }
+ template <class _Compare2>
+ _LIBCPP_INLINE_VISIBILITY
+ void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>& __source)
+ {
+ _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+ "merging container with incompatible allocator");
+ return __tree_.__node_handle_merge_multi(__source.__tree_);
+ }
+ template <class _Compare2>
+ _LIBCPP_INLINE_VISIBILITY
+ void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>&& __source)
+ {
+ _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+ "merging container with incompatible allocator");
+ return __tree_.__node_handle_merge_multi(__source.__tree_);
+ }
+ template <class _Compare2>
+ _LIBCPP_INLINE_VISIBILITY
+ void merge(map<key_type, mapped_type, _Compare2, allocator_type>& __source)
+ {
+ _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+ "merging container with incompatible allocator");
+ return __tree_.__node_handle_merge_multi(__source.__tree_);
+ }
+ template <class _Compare2>
+ _LIBCPP_INLINE_VISIBILITY
+ void merge(map<key_type, mapped_type, _Compare2, allocator_type>&& __source)
+ {
+ _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+ "merging container with incompatible allocator");
+ return __tree_.__node_handle_merge_multi(__source.__tree_);
+ }
+#endif
+
+ _LIBCPP_INLINE_VISIBILITY
+ void clear() _NOEXCEPT {__tree_.clear();}
+
+ _LIBCPP_INLINE_VISIBILITY
void swap(multimap& __m)
_NOEXCEPT_(__is_nothrow_swappable<__base>::value)
{__tree_.swap(__m.__tree_);}
@@ -2277,17 +2277,17 @@ swap(multimap<_Key, _Tp, _Compare, _Allocator>& __x,
__x.swap(__y);
}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCPP_STD_VER > 17
template <class _Key, class _Tp, class _Compare, class _Allocator,
class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY
typename multimap<_Key, _Tp, _Compare, _Allocator>::size_type
erase_if(multimap<_Key, _Tp, _Compare, _Allocator>& __c,
_Predicate __pred) {
return _VSTD::__libcpp_erase_if_container(__c, __pred);
}
-#endif
-
+#endif
+
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_MAP