- tmp/tmpvlumtbdm/{from.md → to.md} +102 -101
tmp/tmpvlumtbdm/{from.md → to.md}
RENAMED
|
@@ -19,10 +19,13 @@ same type.
|
|
| 19 |
|
| 20 |
Subclause [[unord.multiset]] only describes operations on
|
| 21 |
`unordered_multiset` that are not described in one of the requirement
|
| 22 |
tables, or for which there is additional semantic information.
|
| 23 |
|
|
|
|
|
|
|
|
|
|
| 24 |
``` cpp
|
| 25 |
namespace std {
|
| 26 |
template<class Key,
|
| 27 |
class Hash = hash<Key>,
|
| 28 |
class Pred = equal_to<Key>,
|
|
@@ -33,12 +36,12 @@ namespace std {
|
|
| 33 |
using key_type = Key;
|
| 34 |
using value_type = Key;
|
| 35 |
using hasher = Hash;
|
| 36 |
using key_equal = Pred;
|
| 37 |
using allocator_type = Allocator;
|
| 38 |
-
using pointer =
|
| 39 |
-
using const_pointer =
|
| 40 |
using reference = value_type&;
|
| 41 |
using const_reference = const value_type&;
|
| 42 |
using size_type = implementation-defined // type of unordered_multiset::size_type; // see [container.requirements]
|
| 43 |
using difference_type = implementation-defined // type of unordered_multiset::difference_type; // see [container.requirements]
|
| 44 |
|
|
@@ -47,171 +50,169 @@ namespace std {
|
|
| 47 |
using local_iterator = implementation-defined // type of unordered_multiset::local_iterator; // see [container.requirements]
|
| 48 |
using const_local_iterator = implementation-defined // type of unordered_multiset::const_local_iterator; // see [container.requirements]
|
| 49 |
using node_type = unspecified;
|
| 50 |
|
| 51 |
// [unord.multiset.cnstr], construct/copy/destroy
|
| 52 |
-
unordered_multiset();
|
| 53 |
-
explicit unordered_multiset(size_type n,
|
| 54 |
-
const hasher& hf = hasher(),
|
| 55 |
const key_equal& eql = key_equal(),
|
| 56 |
const allocator_type& a = allocator_type());
|
| 57 |
template<class InputIterator>
|
| 58 |
-
unordered_multiset(InputIterator f, InputIterator l,
|
| 59 |
-
|
| 60 |
-
const hasher& hf = hasher(),
|
| 61 |
const key_equal& eql = key_equal(),
|
| 62 |
const allocator_type& a = allocator_type());
|
| 63 |
template<container-compatible-range<value_type> R>
|
| 64 |
-
unordered_multiset(from_range_t, R&& rg,
|
| 65 |
-
|
| 66 |
-
const hasher& hf = hasher(),
|
| 67 |
const key_equal& eql = key_equal(),
|
| 68 |
const allocator_type& a = allocator_type());
|
| 69 |
-
unordered_multiset(const unordered_multiset&);
|
| 70 |
-
unordered_multiset(unordered_multiset&&);
|
| 71 |
-
explicit unordered_multiset(const Allocator&);
|
| 72 |
-
unordered_multiset(const unordered_multiset&, const type_identity_t<Allocator>&);
|
| 73 |
-
unordered_multiset(unordered_multiset&&, const type_identity_t<Allocator>&);
|
| 74 |
-
unordered_multiset(initializer_list<value_type> il,
|
| 75 |
-
|
| 76 |
-
const hasher& hf = hasher(),
|
| 77 |
const key_equal& eql = key_equal(),
|
| 78 |
const allocator_type& a = allocator_type());
|
| 79 |
-
unordered_multiset(size_type n, const allocator_type& a)
|
| 80 |
: unordered_multiset(n, hasher(), key_equal(), a) { }
|
| 81 |
-
unordered_multiset(size_type n, const hasher& hf, const allocator_type& a)
|
| 82 |
: unordered_multiset(n, hf, key_equal(), a) { }
|
| 83 |
template<class InputIterator>
|
| 84 |
-
unordered_multiset(InputIterator f, InputIterator l, size_type n,
|
|
|
|
| 85 |
: unordered_multiset(f, l, n, hasher(), key_equal(), a) { }
|
| 86 |
template<class InputIterator>
|
| 87 |
-
unordered_multiset(InputIterator f, InputIterator l, size_type n,
|
| 88 |
-
|
| 89 |
: unordered_multiset(f, l, n, hf, key_equal(), a) { }
|
| 90 |
template<container-compatible-range<value_type> R>
|
| 91 |
-
unordered_multiset(from_range_t, R&& rg, size_type n, const allocator_type& a)
|
| 92 |
: unordered_multiset(from_range, std::forward<R>(rg),
|
| 93 |
n, hasher(), key_equal(), a) { }
|
| 94 |
template<container-compatible-range<value_type> R>
|
| 95 |
-
unordered_multiset(from_range_t, R&& rg, size_type n, const hasher& hf,
|
| 96 |
const allocator_type& a)
|
| 97 |
: unordered_multiset(from_range, std::forward<R>(rg), n, hf, key_equal(), a) { }
|
| 98 |
-
unordered_multiset(initializer_list<value_type> il, size_type n,
|
|
|
|
| 99 |
: unordered_multiset(il, n, hasher(), key_equal(), a) { }
|
| 100 |
-
unordered_multiset(initializer_list<value_type> il, size_type n, const hasher& hf,
|
| 101 |
const allocator_type& a)
|
| 102 |
: unordered_multiset(il, n, hf, key_equal(), a) { }
|
| 103 |
-
~unordered_multiset();
|
| 104 |
-
unordered_multiset& operator=(const unordered_multiset&);
|
| 105 |
-
unordered_multiset& operator=(unordered_multiset&&)
|
| 106 |
noexcept(allocator_traits<Allocator>::is_always_equal::value &&
|
| 107 |
-
is_nothrow_move_assignable_v<Hash> &&
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
allocator_type get_allocator() const noexcept;
|
| 111 |
|
| 112 |
// iterators
|
| 113 |
-
iterator begin() noexcept;
|
| 114 |
-
const_iterator begin() const noexcept;
|
| 115 |
-
iterator end() noexcept;
|
| 116 |
-
const_iterator end() const noexcept;
|
| 117 |
-
const_iterator cbegin() const noexcept;
|
| 118 |
-
const_iterator cend() const noexcept;
|
| 119 |
|
| 120 |
// capacity
|
| 121 |
-
|
| 122 |
-
size_type size() const noexcept;
|
| 123 |
-
size_type max_size() const noexcept;
|
| 124 |
|
| 125 |
// modifiers
|
| 126 |
-
template<class... Args> iterator emplace(Args&&... args);
|
| 127 |
-
template<class... Args>
|
| 128 |
-
|
| 129 |
-
iterator insert(value_type&
|
| 130 |
-
iterator insert(
|
| 131 |
-
iterator insert(const_iterator hint, value_type&
|
| 132 |
-
|
|
|
|
| 133 |
template<container-compatible-range<value_type> R>
|
| 134 |
-
void insert_range(R&& rg);
|
| 135 |
-
void insert(initializer_list<value_type>);
|
| 136 |
|
| 137 |
-
node_type extract(const_iterator position);
|
| 138 |
-
node_type extract(const key_type& x);
|
| 139 |
-
template<class K> node_type extract(K&& x);
|
| 140 |
-
iterator insert(node_type&& nh);
|
| 141 |
-
iterator insert(const_iterator hint, node_type&& nh);
|
| 142 |
|
| 143 |
-
iterator erase(iterator position)
|
| 144 |
requires (!same_as<iterator, const_iterator>);
|
| 145 |
-
iterator erase(const_iterator position);
|
| 146 |
-
size_type erase(const key_type& k);
|
| 147 |
-
template<class K> size_type erase(K&& x);
|
| 148 |
-
iterator erase(const_iterator first, const_iterator last);
|
| 149 |
-
void swap(unordered_multiset&)
|
| 150 |
noexcept(allocator_traits<Allocator>::is_always_equal::value &&
|
| 151 |
-
is_nothrow_swappable_v<Hash> &&
|
| 152 |
-
|
| 153 |
-
void clear() noexcept;
|
| 154 |
|
| 155 |
template<class H2, class P2>
|
| 156 |
-
void merge(unordered_multiset<Key, H2, P2, Allocator>& source);
|
| 157 |
template<class H2, class P2>
|
| 158 |
-
void merge(unordered_multiset<Key, H2, P2, Allocator>&& source);
|
| 159 |
template<class H2, class P2>
|
| 160 |
-
void merge(unordered_set<Key, H2, P2, Allocator>& source);
|
| 161 |
template<class H2, class P2>
|
| 162 |
-
void merge(unordered_set<Key, H2, P2, Allocator>&& source);
|
| 163 |
|
| 164 |
// observers
|
| 165 |
-
hasher hash_function() const;
|
| 166 |
-
key_equal key_eq() const;
|
| 167 |
|
| 168 |
// set operations
|
| 169 |
-
iterator find(const key_type& k);
|
| 170 |
-
const_iterator find(const key_type& k) const;
|
| 171 |
template<class K>
|
| 172 |
-
iterator find(const K& k);
|
| 173 |
template<class K>
|
| 174 |
-
const_iterator find(const K& k) const;
|
| 175 |
-
size_type count(const key_type& k) const;
|
| 176 |
template<class K>
|
| 177 |
-
size_type count(const K& k) const;
|
| 178 |
-
bool contains(const key_type& k) const;
|
| 179 |
template<class K>
|
| 180 |
-
bool contains(const K& k) const;
|
| 181 |
-
pair<iterator, iterator> equal_range(const key_type& k);
|
| 182 |
-
pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
|
| 183 |
template<class K>
|
| 184 |
-
pair<iterator, iterator> equal_range(const K& k);
|
| 185 |
template<class K>
|
| 186 |
-
pair<const_iterator, const_iterator> equal_range(const K& k) const;
|
| 187 |
|
| 188 |
// bucket interface
|
| 189 |
-
size_type bucket_count() const noexcept;
|
| 190 |
-
size_type max_bucket_count() const noexcept;
|
| 191 |
-
size_type bucket_size(size_type n) const;
|
| 192 |
-
size_type bucket(const key_type& k) const;
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
const_local_iterator
|
| 198 |
-
const_local_iterator
|
|
|
|
| 199 |
|
| 200 |
// hash policy
|
| 201 |
-
float load_factor() const noexcept;
|
| 202 |
-
float max_load_factor() const noexcept;
|
| 203 |
-
void max_load_factor(float z);
|
| 204 |
-
void rehash(size_type n);
|
| 205 |
-
void reserve(size_type n);
|
| 206 |
};
|
| 207 |
|
| 208 |
template<class InputIterator,
|
| 209 |
class Hash = hash<iter-value-type<InputIterator>>,
|
| 210 |
class Pred = equal_to<iter-value-type<InputIterator>>,
|
| 211 |
class Allocator = allocator<iter-value-type<InputIterator>>>
|
| 212 |
-
unordered_multiset(InputIterator, InputIterator, see below::size_type = see below,
|
| 213 |
Hash = Hash(), Pred = Pred(), Allocator = Allocator())
|
| 214 |
-> unordered_multiset<iter-value-type<InputIterator>,
|
| 215 |
Hash, Pred, Allocator>;
|
| 216 |
|
| 217 |
template<ranges::input_range R,
|
|
|
|
| 19 |
|
| 20 |
Subclause [[unord.multiset]] only describes operations on
|
| 21 |
`unordered_multiset` that are not described in one of the requirement
|
| 22 |
tables, or for which there is additional semantic information.
|
| 23 |
|
| 24 |
+
The types `iterator` and `const_iterator` meet the constexpr iterator
|
| 25 |
+
requirements [[iterator.requirements.general]].
|
| 26 |
+
|
| 27 |
``` cpp
|
| 28 |
namespace std {
|
| 29 |
template<class Key,
|
| 30 |
class Hash = hash<Key>,
|
| 31 |
class Pred = equal_to<Key>,
|
|
|
|
| 36 |
using key_type = Key;
|
| 37 |
using value_type = Key;
|
| 38 |
using hasher = Hash;
|
| 39 |
using key_equal = Pred;
|
| 40 |
using allocator_type = Allocator;
|
| 41 |
+
using pointer = allocator_traits<Allocator>::pointer;
|
| 42 |
+
using const_pointer = allocator_traits<Allocator>::const_pointer;
|
| 43 |
using reference = value_type&;
|
| 44 |
using const_reference = const value_type&;
|
| 45 |
using size_type = implementation-defined // type of unordered_multiset::size_type; // see [container.requirements]
|
| 46 |
using difference_type = implementation-defined // type of unordered_multiset::difference_type; // see [container.requirements]
|
| 47 |
|
|
|
|
| 50 |
using local_iterator = implementation-defined // type of unordered_multiset::local_iterator; // see [container.requirements]
|
| 51 |
using const_local_iterator = implementation-defined // type of unordered_multiset::const_local_iterator; // see [container.requirements]
|
| 52 |
using node_type = unspecified;
|
| 53 |
|
| 54 |
// [unord.multiset.cnstr], construct/copy/destroy
|
| 55 |
+
constexpr unordered_multiset();
|
| 56 |
+
constexpr explicit unordered_multiset(size_type n, const hasher& hf = hasher(),
|
|
|
|
| 57 |
const key_equal& eql = key_equal(),
|
| 58 |
const allocator_type& a = allocator_type());
|
| 59 |
template<class InputIterator>
|
| 60 |
+
constexpr unordered_multiset(InputIterator f, InputIterator l,
|
| 61 |
+
size_type n = see below, const hasher& hf = hasher(),
|
|
|
|
| 62 |
const key_equal& eql = key_equal(),
|
| 63 |
const allocator_type& a = allocator_type());
|
| 64 |
template<container-compatible-range<value_type> R>
|
| 65 |
+
constexpr unordered_multiset(from_range_t, R&& rg,
|
| 66 |
+
size_type n = see below, const hasher& hf = hasher(),
|
|
|
|
| 67 |
const key_equal& eql = key_equal(),
|
| 68 |
const allocator_type& a = allocator_type());
|
| 69 |
+
constexpr unordered_multiset(const unordered_multiset&);
|
| 70 |
+
constexpr unordered_multiset(unordered_multiset&&);
|
| 71 |
+
constexpr explicit unordered_multiset(const Allocator&);
|
| 72 |
+
constexpr unordered_multiset(const unordered_multiset&, const type_identity_t<Allocator>&);
|
| 73 |
+
constexpr unordered_multiset(unordered_multiset&&, const type_identity_t<Allocator>&);
|
| 74 |
+
constexpr unordered_multiset(initializer_list<value_type> il,
|
| 75 |
+
size_type n = see below, const hasher& hf = hasher(),
|
|
|
|
| 76 |
const key_equal& eql = key_equal(),
|
| 77 |
const allocator_type& a = allocator_type());
|
| 78 |
+
constexpr unordered_multiset(size_type n, const allocator_type& a)
|
| 79 |
: unordered_multiset(n, hasher(), key_equal(), a) { }
|
| 80 |
+
constexpr unordered_multiset(size_type n, const hasher& hf, const allocator_type& a)
|
| 81 |
: unordered_multiset(n, hf, key_equal(), a) { }
|
| 82 |
template<class InputIterator>
|
| 83 |
+
constexpr unordered_multiset(InputIterator f, InputIterator l, size_type n,
|
| 84 |
+
const allocator_type& a)
|
| 85 |
: unordered_multiset(f, l, n, hasher(), key_equal(), a) { }
|
| 86 |
template<class InputIterator>
|
| 87 |
+
constexpr unordered_multiset(InputIterator f, InputIterator l, size_type n,
|
| 88 |
+
const hasher& hf, const allocator_type& a)
|
| 89 |
: unordered_multiset(f, l, n, hf, key_equal(), a) { }
|
| 90 |
template<container-compatible-range<value_type> R>
|
| 91 |
+
constexpr unordered_multiset(from_range_t, R&& rg, size_type n, const allocator_type& a)
|
| 92 |
: unordered_multiset(from_range, std::forward<R>(rg),
|
| 93 |
n, hasher(), key_equal(), a) { }
|
| 94 |
template<container-compatible-range<value_type> R>
|
| 95 |
+
constexpr unordered_multiset(from_range_t, R&& rg, size_type n, const hasher& hf,
|
| 96 |
const allocator_type& a)
|
| 97 |
: unordered_multiset(from_range, std::forward<R>(rg), n, hf, key_equal(), a) { }
|
| 98 |
+
constexpr unordered_multiset(initializer_list<value_type> il, size_type n,
|
| 99 |
+
const allocator_type& a)
|
| 100 |
: unordered_multiset(il, n, hasher(), key_equal(), a) { }
|
| 101 |
+
constexpr unordered_multiset(initializer_list<value_type> il, size_type n, const hasher& hf,
|
| 102 |
const allocator_type& a)
|
| 103 |
: unordered_multiset(il, n, hf, key_equal(), a) { }
|
| 104 |
+
constexpr ~unordered_multiset();
|
| 105 |
+
constexpr unordered_multiset& operator=(const unordered_multiset&);
|
| 106 |
+
constexpr unordered_multiset& operator=(unordered_multiset&&)
|
| 107 |
noexcept(allocator_traits<Allocator>::is_always_equal::value &&
|
| 108 |
+
is_nothrow_move_assignable_v<Hash> && is_nothrow_move_assignable_v<Pred>);
|
| 109 |
+
constexpr unordered_multiset& operator=(initializer_list<value_type>);
|
| 110 |
+
constexpr allocator_type get_allocator() const noexcept;
|
|
|
|
| 111 |
|
| 112 |
// iterators
|
| 113 |
+
constexpr iterator begin() noexcept;
|
| 114 |
+
constexpr const_iterator begin() const noexcept;
|
| 115 |
+
constexpr iterator end() noexcept;
|
| 116 |
+
constexpr const_iterator end() const noexcept;
|
| 117 |
+
constexpr const_iterator cbegin() const noexcept;
|
| 118 |
+
constexpr const_iterator cend() const noexcept;
|
| 119 |
|
| 120 |
// capacity
|
| 121 |
+
constexpr bool empty() const noexcept;
|
| 122 |
+
constexpr size_type size() const noexcept;
|
| 123 |
+
constexpr size_type max_size() const noexcept;
|
| 124 |
|
| 125 |
// modifiers
|
| 126 |
+
template<class... Args> constexpr iterator emplace(Args&&... args);
|
| 127 |
+
template<class... Args>
|
| 128 |
+
constexpr iterator emplace_hint(const_iterator position, Args&&... args);
|
| 129 |
+
constexpr iterator insert(const value_type& obj);
|
| 130 |
+
constexpr iterator insert(value_type&& obj);
|
| 131 |
+
constexpr iterator insert(const_iterator hint, const value_type& obj);
|
| 132 |
+
constexpr iterator insert(const_iterator hint, value_type&& obj);
|
| 133 |
+
template<class InputIterator> constexpr void insert(InputIterator first, InputIterator last);
|
| 134 |
template<container-compatible-range<value_type> R>
|
| 135 |
+
constexpr void insert_range(R&& rg);
|
| 136 |
+
constexpr void insert(initializer_list<value_type>);
|
| 137 |
|
| 138 |
+
constexpr node_type extract(const_iterator position);
|
| 139 |
+
constexpr node_type extract(const key_type& x);
|
| 140 |
+
template<class K> constexpr node_type extract(K&& x);
|
| 141 |
+
constexpr iterator insert(node_type&& nh);
|
| 142 |
+
constexpr iterator insert(const_iterator hint, node_type&& nh);
|
| 143 |
|
| 144 |
+
constexpr iterator erase(iterator position)
|
| 145 |
requires (!same_as<iterator, const_iterator>);
|
| 146 |
+
constexpr iterator erase(const_iterator position);
|
| 147 |
+
constexpr size_type erase(const key_type& k);
|
| 148 |
+
template<class K> constexpr size_type erase(K&& x);
|
| 149 |
+
constexpr iterator erase(const_iterator first, const_iterator last);
|
| 150 |
+
constexpr void swap(unordered_multiset&)
|
| 151 |
noexcept(allocator_traits<Allocator>::is_always_equal::value &&
|
| 152 |
+
is_nothrow_swappable_v<Hash> && is_nothrow_swappable_v<Pred>);
|
| 153 |
+
constexpr void clear() noexcept;
|
|
|
|
| 154 |
|
| 155 |
template<class H2, class P2>
|
| 156 |
+
constexpr void merge(unordered_multiset<Key, H2, P2, Allocator>& source);
|
| 157 |
template<class H2, class P2>
|
| 158 |
+
constexpr void merge(unordered_multiset<Key, H2, P2, Allocator>&& source);
|
| 159 |
template<class H2, class P2>
|
| 160 |
+
constexpr void merge(unordered_set<Key, H2, P2, Allocator>& source);
|
| 161 |
template<class H2, class P2>
|
| 162 |
+
constexpr void merge(unordered_set<Key, H2, P2, Allocator>&& source);
|
| 163 |
|
| 164 |
// observers
|
| 165 |
+
constexpr hasher hash_function() const;
|
| 166 |
+
constexpr key_equal key_eq() const;
|
| 167 |
|
| 168 |
// set operations
|
| 169 |
+
constexpr iterator find(const key_type& k);
|
| 170 |
+
constexpr const_iterator find(const key_type& k) const;
|
| 171 |
template<class K>
|
| 172 |
+
constexpr iterator find(const K& k);
|
| 173 |
template<class K>
|
| 174 |
+
constexpr const_iterator find(const K& k) const;
|
| 175 |
+
constexpr size_type count(const key_type& k) const;
|
| 176 |
template<class K>
|
| 177 |
+
constexpr size_type count(const K& k) const;
|
| 178 |
+
constexpr bool contains(const key_type& k) const;
|
| 179 |
template<class K>
|
| 180 |
+
constexpr bool contains(const K& k) const;
|
| 181 |
+
constexpr pair<iterator, iterator> equal_range(const key_type& k);
|
| 182 |
+
constexpr pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
|
| 183 |
template<class K>
|
| 184 |
+
constexpr pair<iterator, iterator> equal_range(const K& k);
|
| 185 |
template<class K>
|
| 186 |
+
constexpr pair<const_iterator, const_iterator> equal_range(const K& k) const;
|
| 187 |
|
| 188 |
// bucket interface
|
| 189 |
+
constexpr size_type bucket_count() const noexcept;
|
| 190 |
+
constexpr size_type max_bucket_count() const noexcept;
|
| 191 |
+
constexpr size_type bucket_size(size_type n) const;
|
| 192 |
+
constexpr size_type bucket(const key_type& k) const;
|
| 193 |
+
template<class K> constexpr size_type bucket(const K& k) const;
|
| 194 |
+
constexpr local_iterator begin(size_type n);
|
| 195 |
+
constexpr const_local_iterator begin(size_type n) const;
|
| 196 |
+
constexpr local_iterator end(size_type n);
|
| 197 |
+
constexpr const_local_iterator end(size_type n) const;
|
| 198 |
+
constexpr const_local_iterator cbegin(size_type n) const;
|
| 199 |
+
constexpr const_local_iterator cend(size_type n) const;
|
| 200 |
|
| 201 |
// hash policy
|
| 202 |
+
constexpr float load_factor() const noexcept;
|
| 203 |
+
constexpr float max_load_factor() const noexcept;
|
| 204 |
+
constexpr void max_load_factor(float z);
|
| 205 |
+
constexpr void rehash(size_type n);
|
| 206 |
+
constexpr void reserve(size_type n);
|
| 207 |
};
|
| 208 |
|
| 209 |
template<class InputIterator,
|
| 210 |
class Hash = hash<iter-value-type<InputIterator>>,
|
| 211 |
class Pred = equal_to<iter-value-type<InputIterator>>,
|
| 212 |
class Allocator = allocator<iter-value-type<InputIterator>>>
|
| 213 |
+
unordered_multiset(InputIterator, InputIterator, typename see below::size_type = see below,
|
| 214 |
Hash = Hash(), Pred = Pred(), Allocator = Allocator())
|
| 215 |
-> unordered_multiset<iter-value-type<InputIterator>,
|
| 216 |
Hash, Pred, Allocator>;
|
| 217 |
|
| 218 |
template<ranges::input_range R,
|