aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/set
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-02-10 17:53:52 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-02-10 17:53:52 +0300
commit5c64b97bb7e4034eff8833e4c367f61d34fcb4ee (patch)
tree7c5769528f2fcdaa5a718aa73e4aa64d50905269 /contrib/libs/cxxsupp/libcxx/include/set
parent1b56f620ac98766b198121ca1b728e7e61efbb56 (diff)
downloadydb-5c64b97bb7e4034eff8833e4c367f61d34fcb4ee.tar.gz
intermediate changes
ref:4635f4dd763168c3fa295f87727595c785b4d5a4
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/set')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/set55
1 files changed, 48 insertions, 7 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/set b/contrib/libs/cxxsupp/libcxx/include/set
index 46b515ba53..1718a644d4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/set
+++ b/contrib/libs/cxxsupp/libcxx/include/set
@@ -183,6 +183,25 @@ public:
pair<const_iterator,const_iterator> equal_range(const K& x) const; // C++14
};
+template <class InputIterator,
+ class Compare = less<typename iterator_traits<InputIterator>::value_type>,
+ class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
+set(InputIterator, InputIterator,
+ Compare = Compare(), Allocator = Allocator())
+ -> set<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>; // C++17
+
+template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
+set(initializer_list<Key>, Compare = Compare(), Allocator = Allocator())
+ -> set<Key, Compare, Allocator>; // C++17
+
+template<class InputIterator, class Allocator>
+set(InputIterator, InputIterator, Allocator)
+ -> set<typename iterator_traits<InputIterator>::value_type,
+ less<typename iterator_traits<InputIterator>::value_type>, Allocator>; // C++17
+
+template<class Key, class Allocator>
+set(initializer_list<Key>, Allocator) -> set<Key, less<Key>, Allocator>; // C++17
+
template <class Key, class Compare, class Allocator>
bool
operator==(const set<Key, Compare, Allocator>& x,
@@ -389,6 +408,25 @@ public:
pair<const_iterator,const_iterator> equal_range(const K& x) const; // C++14
};
+template <class InputIterator,
+ class Compare = less<typename iterator_traits<InputIterator>::value_type>,
+ class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
+multiset(InputIterator, InputIterator,
+ Compare = Compare(), Allocator = Allocator())
+ -> multiset<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>; // C++17
+
+template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
+multiset(initializer_list<Key>, Compare = Compare(), Allocator = Allocator())
+ -> multiset<Key, Compare, Allocator>; // C++17
+
+template<class InputIterator, class Allocator>
+multiset(InputIterator, InputIterator, Allocator)
+ -> multiset<typename iterator_traits<InputIterator>::value_type,
+ less<typename iterator_traits<InputIterator>::value_type>, Allocator>; // C++17
+
+template<class Key, class Allocator>
+multiset(initializer_list<Key>, Allocator) -> multiset<Key, less<Key>, Allocator>; // C++17
+
template <class Key, class Compare, class Allocator>
bool
operator==(const multiset<Key, Compare, Allocator>& x,
@@ -436,6 +474,7 @@ erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred); // C++20
#include <__config>
#include <__debug>
#include <__functional/is_transparent.h>
+#include <__iterator/iterator_traits.h>
#include <__node_handle>
#include <__tree>
#include <__utility/forward.h>
@@ -462,7 +501,7 @@ public:
// types:
typedef _Key key_type;
typedef key_type value_type;
- typedef _Compare key_compare;
+ typedef __identity_t<_Compare> key_compare;
typedef key_compare value_compare;
typedef __identity_t<_Allocator> allocator_type;
typedef value_type& reference;
@@ -474,7 +513,6 @@ public:
private:
typedef __tree<value_type, value_compare, allocator_type> __base;
typedef allocator_traits<allocator_type> __alloc_traits;
- typedef typename __base::__node_holder __node_holder;
__base __tree_;
@@ -872,6 +910,7 @@ public:
template<class _InputIterator,
class _Compare = less<__iter_value_type<_InputIterator>>,
class _Allocator = allocator<__iter_value_type<_InputIterator>>,
+ class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value, void>,
class = enable_if_t<__is_allocator<_Allocator>::value, void>,
class = enable_if_t<!__is_allocator<_Compare>::value, void>>
set(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocator())
@@ -879,12 +918,13 @@ set(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocat
template<class _Key, class _Compare = less<_Key>,
class _Allocator = allocator<_Key>,
- class = enable_if_t<__is_allocator<_Allocator>::value, void>,
- class = enable_if_t<!__is_allocator<_Compare>::value, void>>
+ class = enable_if_t<!__is_allocator<_Compare>::value, void>,
+ class = enable_if_t<__is_allocator<_Allocator>::value, void>>
set(initializer_list<_Key>, _Compare = _Compare(), _Allocator = _Allocator())
-> set<_Key, _Compare, _Allocator>;
template<class _InputIterator, class _Allocator,
+ class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value, void>,
class = enable_if_t<__is_allocator<_Allocator>::value, void>>
set(_InputIterator, _InputIterator, _Allocator)
-> set<__iter_value_type<_InputIterator>,
@@ -992,9 +1032,9 @@ class _LIBCPP_TEMPLATE_VIS multiset
{
public:
// types:
- typedef _Key key_type;
+ typedef _Key key_type;
typedef key_type value_type;
- typedef _Compare key_compare;
+ typedef __identity_t<_Compare> key_compare;
typedef key_compare value_compare;
typedef __identity_t<_Allocator> allocator_type;
typedef value_type& reference;
@@ -1006,7 +1046,6 @@ public:
private:
typedef __tree<value_type, value_compare, allocator_type> __base;
typedef allocator_traits<allocator_type> __alloc_traits;
- typedef typename __base::__node_holder __node_holder;
__base __tree_;
@@ -1403,6 +1442,7 @@ public:
template<class _InputIterator,
class _Compare = less<__iter_value_type<_InputIterator>>,
class _Allocator = allocator<__iter_value_type<_InputIterator>>,
+ class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value, void>,
class = enable_if_t<__is_allocator<_Allocator>::value, void>,
class = enable_if_t<!__is_allocator<_Compare>::value, void>>
multiset(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocator())
@@ -1416,6 +1456,7 @@ multiset(initializer_list<_Key>, _Compare = _Compare(), _Allocator = _Allocator(
-> multiset<_Key, _Compare, _Allocator>;
template<class _InputIterator, class _Allocator,
+ class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value, void>,
class = enable_if_t<__is_allocator<_Allocator>::value, void>>
multiset(_InputIterator, _InputIterator, _Allocator)
-> multiset<__iter_value_type<_InputIterator>,