From Jason Turner

[unord.multimap.overview]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp1myd0t65/{from.md → to.md} +53 -18
tmp/tmp1myd0t65/{from.md → to.md} RENAMED
@@ -4,18 +4,18 @@ An `unordered_multimap` is an unordered associative container that
4
  supports equivalent keys (an instance of `unordered_multimap` may
5
  contain multiple copies of each key value) and that associates values of
6
  another type `mapped_type` with the keys. The `unordered_multimap` class
7
  supports forward iterators.
8
 
9
- An `unordered_multimap` meets all of the requirements of a container, of
10
- an unordered associative container, and of an allocator-aware container
11
- ([[container.alloc.req]]). It provides the operations described in the
12
- preceding requirements table for equivalent keys; that is, an
13
- `unordered_multimap` supports the `a_eq` operations in that table, not
14
- the `a_uniq` operations. For an `unordered_multimap<Key, T>` the
15
- `key type` is `Key`, the mapped type is `T`, and the value type is
16
- `pair<const Key, T>`.
17
 
18
  Subclause  [[unord.multimap]] only describes operations on
19
  `unordered_multimap` that are not described in one of the requirement
20
  tables, or for which there is additional semantic information.
21
 
@@ -37,12 +37,12 @@ namespace std {
37
  using allocator_type = Allocator;
38
  using pointer = typename allocator_traits<Allocator>::pointer;
39
  using const_pointer = typename allocator_traits<Allocator>::const_pointer;
40
  using reference = value_type&;
41
  using const_reference = const value_type&;
42
- using size_type = implementation-defined; // see [container.requirements]
43
- using difference_type = implementation-defined; // see [container.requirements]
44
 
45
  using iterator = implementation-defined // type of unordered_multimap::iterator; // see [container.requirements]
46
  using const_iterator = implementation-defined // type of unordered_multimap::const_iterator; // see [container.requirements]
47
  using local_iterator = implementation-defined // type of unordered_multimap::local_iterator; // see [container.requirements]
48
  using const_local_iterator = implementation-defined // type of unordered_multimap::const_local_iterator; // see [container.requirements]
@@ -58,15 +58,21 @@ namespace std {
58
  unordered_multimap(InputIterator f, InputIterator l,
59
  size_type n = see below,
60
  const hasher& hf = hasher(),
61
  const key_equal& eql = key_equal(),
62
  const allocator_type& a = allocator_type());
 
 
 
 
 
 
63
  unordered_multimap(const unordered_multimap&);
64
  unordered_multimap(unordered_multimap&&);
65
  explicit unordered_multimap(const Allocator&);
66
- unordered_multimap(const unordered_multimap&, const Allocator&);
67
- unordered_multimap(unordered_multimap&&, const Allocator&);
68
  unordered_multimap(initializer_list<value_type> il,
69
  size_type n = see below,
70
  const hasher& hf = hasher(),
71
  const key_equal& eql = key_equal(),
72
  const allocator_type& a = allocator_type());
@@ -79,10 +85,18 @@ namespace std {
79
  : unordered_multimap(f, l, n, hasher(), key_equal(), a) { }
80
  template<class InputIterator>
81
  unordered_multimap(InputIterator f, InputIterator l, size_type n, const hasher& hf,
82
  const allocator_type& a)
83
  : unordered_multimap(f, l, n, hf, key_equal(), a) { }
 
 
 
 
 
 
 
 
84
  unordered_multimap(initializer_list<value_type> il, size_type n, const allocator_type& a)
85
  : unordered_multimap(il, n, hasher(), key_equal(), a) { }
86
  unordered_multimap(initializer_list<value_type> il, size_type n, const hasher& hf,
87
  const allocator_type& a)
88
  : unordered_multimap(il, n, hf, key_equal(), a) { }
@@ -116,20 +130,24 @@ namespace std {
116
  template<class P> iterator insert(P&& obj);
117
  iterator insert(const_iterator hint, const value_type& obj);
118
  iterator insert(const_iterator hint, value_type&& obj);
119
  template<class P> iterator insert(const_iterator hint, P&& obj);
120
  template<class InputIterator> void insert(InputIterator first, InputIterator last);
 
 
121
  void insert(initializer_list<value_type>);
122
 
123
  node_type extract(const_iterator position);
124
  node_type extract(const key_type& x);
 
125
  iterator insert(node_type&& nh);
126
  iterator insert(const_iterator hint, node_type&& nh);
127
 
128
  iterator erase(iterator position);
129
  iterator erase(const_iterator position);
130
  size_type erase(const key_type& k);
 
131
  iterator erase(const_iterator first, const_iterator last);
132
  void swap(unordered_multimap&)
133
  noexcept(allocator_traits<Allocator>::is_always_equal::value &&
134
  is_nothrow_swappable_v<Hash> &&
135
  is_nothrow_swappable_v<Pred>);
@@ -196,10 +214,18 @@ namespace std {
196
  typename see below::size_type = see below,
197
  Hash = Hash(), Pred = Pred(), Allocator = Allocator())
198
  -> unordered_multimap<iter-key-type<InputIterator>, iter-mapped-type<InputIterator>,
199
  Hash, Pred, Allocator>;
200
 
 
 
 
 
 
 
 
 
201
  template<class Key, class T, class Hash = hash<Key>,
202
  class Pred = equal_to<Key>, class Allocator = allocator<pair<const Key, T>>>
203
  unordered_multimap(initializer_list<pair<Key, T>>,
204
  typename see below::size_type = see below,
205
  Hash = Hash(), Pred = Pred(), Allocator = Allocator())
@@ -221,10 +247,25 @@ namespace std {
221
  unordered_multimap(InputIterator, InputIterator, typename see below::size_type, Hash,
222
  Allocator)
223
  -> unordered_multimap<iter-key-type<InputIterator>, iter-mapped-type<InputIterator>, Hash,
224
  equal_to<iter-key-type<InputIterator>>, Allocator>;
225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  template<class Key, class T, class Allocator>
227
  unordered_multimap(initializer_list<pair<Key, T>>, typename see below::size_type,
228
  Allocator)
229
  -> unordered_multimap<Key, T, hash<Key>, equal_to<Key>, Allocator>;
230
 
@@ -234,16 +275,10 @@ namespace std {
234
 
235
  template<class Key, class T, class Hash, class Allocator>
236
  unordered_multimap(initializer_list<pair<Key, T>>, typename see below::size_type,
237
  Hash, Allocator)
238
  -> unordered_multimap<Key, T, Hash, equal_to<Key>, Allocator>;
239
-
240
- // swap
241
- template<class Key, class T, class Hash, class Pred, class Alloc>
242
- void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
243
- unordered_multimap<Key, T, Hash, Pred, Alloc>& y)
244
- noexcept(noexcept(x.swap(y)));
245
  }
246
  ```
247
 
248
  A `size_type` parameter type in an `unordered_multimap` deduction guide
249
  refers to the `size_type` member type of the type deduced by the
 
4
  supports equivalent keys (an instance of `unordered_multimap` may
5
  contain multiple copies of each key value) and that associates values of
6
  another type `mapped_type` with the keys. The `unordered_multimap` class
7
  supports forward iterators.
8
 
9
+ An `unordered_multimap` meets all of the requirements of a container
10
+ [[container.reqmts]], of an allocator-aware container
11
+ [[container.alloc.reqmts]], and of an unordered associative container
12
+ [[unord.req]]. It provides the operations described in the preceding
13
+ requirements table for equivalent keys; that is, an `unordered_multimap`
14
+ supports the `a_eq` operations in that table, not the `a_uniq`
15
+ operations. For an `unordered_multimap<Key, T>` the `key_type` is `Key`,
16
+ the `mapped_type` is `T`, and the `value_type` is `pair<const Key, T>`.
17
 
18
  Subclause  [[unord.multimap]] only describes operations on
19
  `unordered_multimap` that are not described in one of the requirement
20
  tables, or for which there is additional semantic information.
21
 
 
37
  using allocator_type = Allocator;
38
  using pointer = typename allocator_traits<Allocator>::pointer;
39
  using const_pointer = typename allocator_traits<Allocator>::const_pointer;
40
  using reference = value_type&;
41
  using const_reference = const value_type&;
42
+ using size_type = implementation-defined // type of unordered_multimap::size_type; // see [container.requirements]
43
+ using difference_type = implementation-defined // type of unordered_multimap::difference_type; // see [container.requirements]
44
 
45
  using iterator = implementation-defined // type of unordered_multimap::iterator; // see [container.requirements]
46
  using const_iterator = implementation-defined // type of unordered_multimap::const_iterator; // see [container.requirements]
47
  using local_iterator = implementation-defined // type of unordered_multimap::local_iterator; // see [container.requirements]
48
  using const_local_iterator = implementation-defined // type of unordered_multimap::const_local_iterator; // see [container.requirements]
 
58
  unordered_multimap(InputIterator f, InputIterator l,
59
  size_type n = see below,
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_multimap(from_range_t, R&& rg,
65
+ size_type n = see below,
66
+ const hasher& hf = hasher(),
67
+ const key_equal& eql = key_equal(),
68
+ const allocator_type& a = allocator_type());
69
  unordered_multimap(const unordered_multimap&);
70
  unordered_multimap(unordered_multimap&&);
71
  explicit unordered_multimap(const Allocator&);
72
+ unordered_multimap(const unordered_multimap&, const type_identity_t<Allocator>&);
73
+ unordered_multimap(unordered_multimap&&, const type_identity_t<Allocator>&);
74
  unordered_multimap(initializer_list<value_type> il,
75
  size_type n = see below,
76
  const hasher& hf = hasher(),
77
  const key_equal& eql = key_equal(),
78
  const allocator_type& a = allocator_type());
 
85
  : unordered_multimap(f, l, n, hasher(), key_equal(), a) { }
86
  template<class InputIterator>
87
  unordered_multimap(InputIterator f, InputIterator l, size_type n, const hasher& hf,
88
  const allocator_type& a)
89
  : unordered_multimap(f, l, n, hf, key_equal(), a) { }
90
+ template<container-compatible-range<value_type> R>
91
+ unordered_multimap(from_range_t, R&& rg, size_type n, const allocator_type& a)
92
+ : unordered_multimap(from_range, std::forward<R>(rg),
93
+ n, hasher(), key_equal(), a) { }
94
+ template<container-compatible-range<value_type> R>
95
+ unordered_multimap(from_range_t, R&& rg, size_type n, const hasher& hf,
96
+ const allocator_type& a)
97
+ : unordered_multimap(from_range, std::forward<R>(rg), n, hf, key_equal(), a) { }
98
  unordered_multimap(initializer_list<value_type> il, size_type n, const allocator_type& a)
99
  : unordered_multimap(il, n, hasher(), key_equal(), a) { }
100
  unordered_multimap(initializer_list<value_type> il, size_type n, const hasher& hf,
101
  const allocator_type& a)
102
  : unordered_multimap(il, n, hf, key_equal(), a) { }
 
130
  template<class P> iterator insert(P&& obj);
131
  iterator insert(const_iterator hint, const value_type& obj);
132
  iterator insert(const_iterator hint, value_type&& obj);
133
  template<class P> iterator insert(const_iterator hint, P&& obj);
134
  template<class InputIterator> void insert(InputIterator first, InputIterator last);
135
+ template<container-compatible-range<value_type> R>
136
+ void insert_range(R&& rg);
137
  void insert(initializer_list<value_type>);
138
 
139
  node_type extract(const_iterator position);
140
  node_type extract(const key_type& x);
141
+ template<class K> node_type extract(K&& x);
142
  iterator insert(node_type&& nh);
143
  iterator insert(const_iterator hint, node_type&& nh);
144
 
145
  iterator erase(iterator position);
146
  iterator erase(const_iterator position);
147
  size_type erase(const key_type& k);
148
+ template<class K> size_type erase(K&& x);
149
  iterator erase(const_iterator first, const_iterator last);
150
  void swap(unordered_multimap&)
151
  noexcept(allocator_traits<Allocator>::is_always_equal::value &&
152
  is_nothrow_swappable_v<Hash> &&
153
  is_nothrow_swappable_v<Pred>);
 
214
  typename see below::size_type = see below,
215
  Hash = Hash(), Pred = Pred(), Allocator = Allocator())
216
  -> unordered_multimap<iter-key-type<InputIterator>, iter-mapped-type<InputIterator>,
217
  Hash, Pred, Allocator>;
218
 
219
+ template<ranges::input_range R,
220
+ class Hash = hash<range-key-type<R>>,
221
+ class Pred = equal_to<range-key-type<R>>,
222
+ class Allocator = allocator<range-to-alloc-type<R>>>
223
+ unordered_multimap(from_range_t, R&&, typename see below::size_type = see below,
224
+ Hash = Hash(), Pred = Pred(), Allocator = Allocator())
225
+ -> unordered_multimap<range-key-type<R>, range-mapped-type<R>, Hash, Pred, Allocator>;
226
+
227
  template<class Key, class T, class Hash = hash<Key>,
228
  class Pred = equal_to<Key>, class Allocator = allocator<pair<const Key, T>>>
229
  unordered_multimap(initializer_list<pair<Key, T>>,
230
  typename see below::size_type = see below,
231
  Hash = Hash(), Pred = Pred(), Allocator = Allocator())
 
247
  unordered_multimap(InputIterator, InputIterator, typename see below::size_type, Hash,
248
  Allocator)
249
  -> unordered_multimap<iter-key-type<InputIterator>, iter-mapped-type<InputIterator>, Hash,
250
  equal_to<iter-key-type<InputIterator>>, Allocator>;
251
 
252
+ template<ranges::input_range R, class Allocator>
253
+ unordered_multimap(from_range_t, R&&, typename see below::size_type, Allocator)
254
+ -> unordered_multimap<range-key-type<R>, range-mapped-type<R>, hash<range-key-type<R>>,
255
+ equal_to<range-key-type<R>>, Allocator>;
256
+
257
+ template<ranges::input_range R, class Allocator>
258
+ unordered_multimap(from_range_t, R&&, Allocator)
259
+ -> unordered_multimap<range-key-type<R>, range-mapped-type<R>, hash<range-key-type<R>>,
260
+ equal_to<range-key-type<R>>, Allocator>;
261
+
262
+ template<ranges::input_range R, class Hash, class Allocator>
263
+ unordered_multimap(from_range_t, R&&, typename see below::size_type, Hash, Allocator)
264
+ -> unordered_multimap<range-key-type<R>, range-mapped-type<R>, Hash,
265
+ equal_to<range-key-type<R>>, Allocator>;
266
+
267
  template<class Key, class T, class Allocator>
268
  unordered_multimap(initializer_list<pair<Key, T>>, typename see below::size_type,
269
  Allocator)
270
  -> unordered_multimap<Key, T, hash<Key>, equal_to<Key>, Allocator>;
271
 
 
275
 
276
  template<class Key, class T, class Hash, class Allocator>
277
  unordered_multimap(initializer_list<pair<Key, T>>, typename see below::size_type,
278
  Hash, Allocator)
279
  -> unordered_multimap<Key, T, Hash, equal_to<Key>, Allocator>;
 
 
 
 
 
 
280
  }
281
  ```
282
 
283
  A `size_type` parameter type in an `unordered_multimap` deduction guide
284
  refers to the `size_type` member type of the type deduced by the