tmp/tmpj64ynzra/{from.md → to.md}
RENAMED
|
@@ -41,29 +41,33 @@ namespace std {
|
|
| 41 |
typedef typename allocator_traits<Allocator>::const_pointer const_pointer;
|
| 42 |
typedef std::reverse_iterator<iterator> reverse_iterator;
|
| 43 |
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
| 44 |
|
| 45 |
// construct/copy/destroy:
|
| 46 |
-
|
|
|
|
| 47 |
const Allocator& = Allocator());
|
| 48 |
template <class InputIterator>
|
| 49 |
multiset(InputIterator first, InputIterator last,
|
| 50 |
const Compare& comp = Compare(),
|
| 51 |
const Allocator& = Allocator());
|
| 52 |
-
multiset(const multiset
|
| 53 |
-
multiset(multiset
|
| 54 |
explicit multiset(const Allocator&);
|
| 55 |
multiset(const multiset&, const Allocator&);
|
| 56 |
multiset(multiset&&, const Allocator&);
|
| 57 |
multiset(initializer_list<value_type>,
|
| 58 |
const Compare& = Compare(),
|
| 59 |
const Allocator& = Allocator());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
~multiset();
|
| 61 |
-
multiset
|
| 62 |
-
|
| 63 |
-
multiset<Key,Compare,Allocator>&
|
| 64 |
-
operator=(multiset<Key,Compare,Allocator>&& x);
|
| 65 |
multiset& operator=(initializer_list<value_type>);
|
| 66 |
allocator_type get_allocator() const noexcept;
|
| 67 |
|
| 68 |
// iterators:
|
| 69 |
iterator begin() noexcept;
|
|
@@ -98,31 +102,42 @@ namespace std {
|
|
| 98 |
void insert(initializer_list<value_type>);
|
| 99 |
|
| 100 |
iterator erase(const_iterator position);
|
| 101 |
size_type erase(const key_type& x);
|
| 102 |
iterator erase(const_iterator first, const_iterator last);
|
| 103 |
-
void swap(multiset
|
| 104 |
void clear() noexcept;
|
| 105 |
|
| 106 |
// observers:
|
| 107 |
key_compare key_comp() const;
|
| 108 |
value_compare value_comp() const;
|
| 109 |
|
| 110 |
// set operations:
|
| 111 |
iterator find(const key_type& x);
|
| 112 |
const_iterator find(const key_type& x) const;
|
|
|
|
|
|
|
| 113 |
|
| 114 |
size_type count(const key_type& x) const;
|
|
|
|
| 115 |
|
| 116 |
iterator lower_bound(const key_type& x);
|
| 117 |
const_iterator lower_bound(const key_type& x) const;
|
|
|
|
|
|
|
| 118 |
|
| 119 |
iterator upper_bound(const key_type& x);
|
| 120 |
const_iterator upper_bound(const key_type& x) const;
|
|
|
|
|
|
|
| 121 |
|
| 122 |
pair<iterator,iterator> equal_range(const key_type& x);
|
| 123 |
pair<const_iterator,const_iterator> equal_range(const key_type& x) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
};
|
| 125 |
|
| 126 |
template <class Key, class Compare, class Allocator>
|
| 127 |
bool operator==(const multiset<Key,Compare,Allocator>& x,
|
| 128 |
const multiset<Key,Compare,Allocator>& y);
|
|
@@ -150,27 +165,27 @@ namespace std {
|
|
| 150 |
```
|
| 151 |
|
| 152 |
#### `multiset` constructors <a id="multiset.cons">[[multiset.cons]]</a>
|
| 153 |
|
| 154 |
``` cpp
|
| 155 |
-
explicit multiset(const Compare& comp
|
| 156 |
const Allocator& = Allocator());
|
| 157 |
```
|
| 158 |
|
| 159 |
*Effects:* Constructs an empty set using the specified comparison object
|
| 160 |
and allocator.
|
| 161 |
|
| 162 |
*Complexity:* Constant.
|
| 163 |
|
| 164 |
``` cpp
|
| 165 |
template <class InputIterator>
|
| 166 |
-
multiset(InputIterator first, last,
|
| 167 |
const Compare& comp = Compare(), const Allocator& = Allocator());
|
| 168 |
```
|
| 169 |
|
| 170 |
-
*Requires:* If the iterator’s
|
| 171 |
-
a const rvalue, then `Key` shall be `
|
| 172 |
|
| 173 |
*Effects:* Constructs an empty `multiset` using the specified comparison
|
| 174 |
object and allocator, and inserts elements from the range \[`first`,
|
| 175 |
`last`).
|
| 176 |
|
|
|
|
| 41 |
typedef typename allocator_traits<Allocator>::const_pointer const_pointer;
|
| 42 |
typedef std::reverse_iterator<iterator> reverse_iterator;
|
| 43 |
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
| 44 |
|
| 45 |
// construct/copy/destroy:
|
| 46 |
+
multiset() : multiset(Compare()) { }
|
| 47 |
+
explicit multiset(const Compare& comp,
|
| 48 |
const Allocator& = Allocator());
|
| 49 |
template <class InputIterator>
|
| 50 |
multiset(InputIterator first, InputIterator last,
|
| 51 |
const Compare& comp = Compare(),
|
| 52 |
const Allocator& = Allocator());
|
| 53 |
+
multiset(const multiset& x);
|
| 54 |
+
multiset(multiset&& x);
|
| 55 |
explicit multiset(const Allocator&);
|
| 56 |
multiset(const multiset&, const Allocator&);
|
| 57 |
multiset(multiset&&, const Allocator&);
|
| 58 |
multiset(initializer_list<value_type>,
|
| 59 |
const Compare& = Compare(),
|
| 60 |
const Allocator& = Allocator());
|
| 61 |
+
template <class InputIterator>
|
| 62 |
+
multiset(InputIterator first, InputIterator last, const Allocator& a)
|
| 63 |
+
: multiset(first, last, Compare(), a) { }
|
| 64 |
+
multiset(initializer_list<value_type> il, const Allocator& a)
|
| 65 |
+
: multiset(il, Compare(), a) { }
|
| 66 |
~multiset();
|
| 67 |
+
multiset& operator=(const multiset& x);
|
| 68 |
+
multiset& operator=(multiset&& x);
|
|
|
|
|
|
|
| 69 |
multiset& operator=(initializer_list<value_type>);
|
| 70 |
allocator_type get_allocator() const noexcept;
|
| 71 |
|
| 72 |
// iterators:
|
| 73 |
iterator begin() noexcept;
|
|
|
|
| 102 |
void insert(initializer_list<value_type>);
|
| 103 |
|
| 104 |
iterator erase(const_iterator position);
|
| 105 |
size_type erase(const key_type& x);
|
| 106 |
iterator erase(const_iterator first, const_iterator last);
|
| 107 |
+
void swap(multiset&);
|
| 108 |
void clear() noexcept;
|
| 109 |
|
| 110 |
// observers:
|
| 111 |
key_compare key_comp() const;
|
| 112 |
value_compare value_comp() const;
|
| 113 |
|
| 114 |
// set operations:
|
| 115 |
iterator find(const key_type& x);
|
| 116 |
const_iterator find(const key_type& x) const;
|
| 117 |
+
template <class K> iterator find(const K& x);
|
| 118 |
+
template <class K> const_iterator find(const K& x) const;
|
| 119 |
|
| 120 |
size_type count(const key_type& x) const;
|
| 121 |
+
template <class K> size_type count(const K& x) const;
|
| 122 |
|
| 123 |
iterator lower_bound(const key_type& x);
|
| 124 |
const_iterator lower_bound(const key_type& x) const;
|
| 125 |
+
template <class K> iterator lower_bound(const K& x);
|
| 126 |
+
template <class K> const_iterator lower_bound(const K& x) const;
|
| 127 |
|
| 128 |
iterator upper_bound(const key_type& x);
|
| 129 |
const_iterator upper_bound(const key_type& x) const;
|
| 130 |
+
template <class K> iterator upper_bound(const K& x);
|
| 131 |
+
template <class K> const_iterator upper_bound(const K& x) const;
|
| 132 |
|
| 133 |
pair<iterator,iterator> equal_range(const key_type& x);
|
| 134 |
pair<const_iterator,const_iterator> equal_range(const key_type& x) const;
|
| 135 |
+
template <class K>
|
| 136 |
+
pair<iterator, iterator> equal_range(const K& x);
|
| 137 |
+
template <class K>
|
| 138 |
+
pair<const_iterator, const_iterator> equal_range(const K& x) const;
|
| 139 |
};
|
| 140 |
|
| 141 |
template <class Key, class Compare, class Allocator>
|
| 142 |
bool operator==(const multiset<Key,Compare,Allocator>& x,
|
| 143 |
const multiset<Key,Compare,Allocator>& y);
|
|
|
|
| 165 |
```
|
| 166 |
|
| 167 |
#### `multiset` constructors <a id="multiset.cons">[[multiset.cons]]</a>
|
| 168 |
|
| 169 |
``` cpp
|
| 170 |
+
explicit multiset(const Compare& comp,
|
| 171 |
const Allocator& = Allocator());
|
| 172 |
```
|
| 173 |
|
| 174 |
*Effects:* Constructs an empty set using the specified comparison object
|
| 175 |
and allocator.
|
| 176 |
|
| 177 |
*Complexity:* Constant.
|
| 178 |
|
| 179 |
``` cpp
|
| 180 |
template <class InputIterator>
|
| 181 |
+
multiset(InputIterator first, InputIterator last,
|
| 182 |
const Compare& comp = Compare(), const Allocator& = Allocator());
|
| 183 |
```
|
| 184 |
|
| 185 |
+
*Requires:* If the iterator’s indirection operator returns an lvalue or
|
| 186 |
+
a const rvalue, then `Key` shall be `CopyInsertable` into `*this`.
|
| 187 |
|
| 188 |
*Effects:* Constructs an empty `multiset` using the specified comparison
|
| 189 |
object and allocator, and inserts elements from the range \[`first`,
|
| 190 |
`last`).
|
| 191 |
|