From Jason Turner

[unord.multiset]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpwz9xdk4a/{from.md → to.md} +32 -14
tmp/tmpwz9xdk4a/{from.md → to.md} RENAMED
@@ -35,24 +35,25 @@ namespace std {
35
  typedef Key key_type;
36
  typedef Key value_type;
37
  typedef Hash hasher;
38
  typedef Pred key_equal;
39
  typedef Allocator allocator_type;
40
- typedef typename allocator_type::pointer pointer;
41
- typedef typename allocator_type::const_pointer const_pointer;
42
- typedef typename allocator_type::reference reference;
43
- typedef typename allocator_type::const_reference const_reference;
44
  typedef implementation-defined size_type;
45
  typedef implementation-defined difference_type;
46
 
47
  typedef implementation-defined iterator;
48
  typedef implementation-defined const_iterator;
49
  typedef implementation-defined local_iterator;
50
  typedef implementation-defined const_local_iterator;
51
 
52
  // construct/destroy/copy
53
- explicit unordered_multiset(size_type n = see below,
 
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,
@@ -68,13 +69,29 @@ namespace std {
68
  unordered_multiset(initializer_list<value_type>,
69
  size_type = see below,
70
  const hasher& hf = hasher(),
71
  const key_equal& eql = key_equal(),
72
  const allocator_type& a = allocator_type());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  ~unordered_multiset();
74
  unordered_multiset& operator=(const unordered_multiset&);
75
- unordered_multiset operator=(unordered_multiset&&);
76
  unordered_multiset& operator=(initializer_list<value_type>);
77
  allocator_type get_allocator() const noexcept;
78
 
79
  // size and capacity
80
  bool empty() const noexcept;
@@ -138,31 +155,32 @@ namespace std {
138
  };
139
 
140
  template <class Key, class Hash, class Pred, class Alloc>
141
  void swap(unordered_multiset<Key, Hash, Pred, Alloc>& x,
142
  unordered_multiset<Key, Hash, Pred, Alloc>& y);
143
- template <class Key, class T, class Hash, class Pred, class Alloc>
144
- bool operator==(const unordered_multiset<Key, T, Hash, Pred, Alloc>& a,
145
- const unordered_multiset<Key, T, Hash, Pred, Alloc>& b);
146
- template <class Key, class T, class Hash, class Pred, class Alloc>
147
- bool operator!=(const unordered_multiset<Key, T, Hash, Pred, Alloc>& a,
148
- const unordered_multiset<Key, T, Hash, Pred, Alloc>& b);
149
  }
150
  ```
151
 
152
  #### `unordered_multiset` constructors <a id="unord.multiset.cnstr">[[unord.multiset.cnstr]]</a>
153
 
154
  ``` cpp
155
- explicit unordered_multiset(size_type n = see below,
 
156
  const hasher& hf = hasher(),
157
  const key_equal& eql = key_equal(),
158
  const allocator_type& a = allocator_type());
159
  ```
160
 
161
  *Effects:* Constructs an empty `unordered_multiset` using the specified
162
  hash function, key equality function, and allocator, and using at least
163
- *`n`* buckets. If *`n`* is not provided, the number of buckets is
164
  *implementation-defined*. `max_load_factor()` returns 1.0.
165
 
166
  *Complexity:* Constant.
167
 
168
  ``` cpp
 
35
  typedef Key key_type;
36
  typedef Key value_type;
37
  typedef Hash hasher;
38
  typedef Pred key_equal;
39
  typedef Allocator allocator_type;
40
+ typedef typename allocator_traits<Allocator>::pointer pointer;
41
+ typedef typename allocator_traits<Allocator>::const_pointer const_pointer;
42
+ typedef value_type& reference;
43
+ typedef const value_type& const_reference;
44
  typedef implementation-defined size_type;
45
  typedef implementation-defined difference_type;
46
 
47
  typedef implementation-defined iterator;
48
  typedef implementation-defined const_iterator;
49
  typedef implementation-defined local_iterator;
50
  typedef implementation-defined const_local_iterator;
51
 
52
  // construct/destroy/copy
53
+ unordered_multiset();
54
+ explicit unordered_multiset(size_type n,
55
  const hasher& hf = hasher(),
56
  const key_equal& eql = key_equal(),
57
  const allocator_type& a = allocator_type());
58
  template <class InputIterator>
59
  unordered_multiset(InputIterator f, InputIterator l,
 
69
  unordered_multiset(initializer_list<value_type>,
70
  size_type = see below,
71
  const hasher& hf = hasher(),
72
  const key_equal& eql = key_equal(),
73
  const allocator_type& a = allocator_type());
74
+ unordered_multiset(size_type n, const allocator_type& a)
75
+ : unordered_multiset(n, hasher(), key_equal(), a) { }
76
+ unordered_multiset(size_type n, const hasher& hf, const allocator_type& a)
77
+ : unordered_multiset(n, hf, key_equal(), a) { }
78
+ template <class InputIterator>
79
+ unordered_multiset(InputIterator f, InputIterator l, size_type n, const allocator_type& a)
80
+ : unordered_multiset(f, l, n, hasher(), key_equal(), a) { }
81
+ template <class InputIterator>
82
+ unordered_multiset(InputIterator f, InputIterator l, size_type n, const hasher& hf,
83
+ const allocator_type& a)
84
+ : unordered_multiset(f, l, n, hf, key_equal(), a) { }
85
+ unordered_multiset(initializer_list<value_type> il, size_type n, const allocator_type& a)
86
+ : unordered_multiset(il, n, hasher(), key_equal(), a) { }
87
+ unordered_multiset(initializer_list<value_type> il, size_type n, const hasher& hf,
88
+ const allocator_type& a)
89
+ : unordered_multiset(il, n, hf, key_equal(), a) { }
90
  ~unordered_multiset();
91
  unordered_multiset& operator=(const unordered_multiset&);
92
+ unordered_multiset& operator=(unordered_multiset&&);
93
  unordered_multiset& operator=(initializer_list<value_type>);
94
  allocator_type get_allocator() const noexcept;
95
 
96
  // size and capacity
97
  bool empty() const noexcept;
 
155
  };
156
 
157
  template <class Key, class Hash, class Pred, class Alloc>
158
  void swap(unordered_multiset<Key, Hash, Pred, Alloc>& x,
159
  unordered_multiset<Key, Hash, Pred, Alloc>& y);
160
+ template <class Key, class Hash, class Pred, class Alloc>
161
+ bool operator==(const unordered_multiset<Key, Hash, Pred, Alloc>& a,
162
+ const unordered_multiset<Key, Hash, Pred, Alloc>& b);
163
+ template <class Key, class Hash, class Pred, class Alloc>
164
+ bool operator!=(const unordered_multiset<Key, Hash, Pred, Alloc>& a,
165
+ const unordered_multiset<Key, Hash, Pred, Alloc>& b);
166
  }
167
  ```
168
 
169
  #### `unordered_multiset` constructors <a id="unord.multiset.cnstr">[[unord.multiset.cnstr]]</a>
170
 
171
  ``` cpp
172
+ unordered_multiset() : unordered_multiset(size_type(see below)) { }
173
+ explicit unordered_multiset(size_type n,
174
  const hasher& hf = hasher(),
175
  const key_equal& eql = key_equal(),
176
  const allocator_type& a = allocator_type());
177
  ```
178
 
179
  *Effects:* Constructs an empty `unordered_multiset` using the specified
180
  hash function, key equality function, and allocator, and using at least
181
+ *`n`* buckets. For the default constructor, the number of buckets is
182
  *implementation-defined*. `max_load_factor()` returns 1.0.
183
 
184
  *Complexity:* Constant.
185
 
186
  ``` cpp