From Jason Turner

[unord.set.overview]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpqrxb5f4p/{from.md → to.md} +28 -11
tmp/tmpqrxb5f4p/{from.md → to.md} RENAMED
@@ -32,24 +32,25 @@ namespace std {
32
  typedef Key key_type;
33
  typedef Key value_type;
34
  typedef Hash hasher;
35
  typedef Pred key_equal;
36
  typedef Allocator allocator_type;
37
- typedef typename allocator_type::pointer pointer;
38
- typedef typename allocator_type::const_pointer const_pointer;
39
- typedef typename allocator_type::reference reference;
40
- typedef typename allocator_type::const_reference const_reference;
41
  typedef implementation-defined size_type;
42
  typedef implementation-defined difference_type;
43
 
44
  typedef implementation-defined iterator;
45
  typedef implementation-defined const_iterator;
46
  typedef implementation-defined local_iterator;
47
  typedef implementation-defined const_local_iterator;
48
 
49
  // construct/destroy/copy
50
- explicit unordered_set(size_type n = see below,
 
51
  const hasher& hf = hasher(),
52
  const key_equal& eql = key_equal(),
53
  const allocator_type& a = allocator_type());
54
  template <class InputIterator>
55
  unordered_set(InputIterator f, InputIterator l,
@@ -65,10 +66,26 @@ namespace std {
65
  unordered_set(initializer_list<value_type>,
66
  size_type = see below,
67
  const hasher& hf = hasher(),
68
  const key_equal& eql = key_equal(),
69
  const allocator_type& a = allocator_type());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  ~unordered_set();
71
  unordered_set& operator=(const unordered_set&);
72
  unordered_set& operator=(unordered_set&&);
73
  unordered_set& operator=(initializer_list<value_type>);
74
  allocator_type get_allocator() const noexcept;
@@ -136,14 +153,14 @@ namespace std {
136
 
137
  template <class Key, class Hash, class Pred, class Alloc>
138
  void swap(unordered_set<Key, Hash, Pred, Alloc>& x,
139
  unordered_set<Key, Hash, Pred, Alloc>& y);
140
 
141
- template <class Key, class T, class Hash, class Pred, class Alloc>
142
- bool operator==(const unordered_set<Key, T, Hash, Pred, Alloc>& a,
143
- const unordered_set<Key, T, Hash, Pred, Alloc>& b);
144
- template <class Key, class T, class Hash, class Pred, class Alloc>
145
- bool operator!=(const unordered_set<Key, T, Hash, Pred, Alloc>& a,
146
- const unordered_set<Key, T, Hash, Pred, Alloc>& b);
147
  }
148
  ```
149
 
 
32
  typedef Key key_type;
33
  typedef Key value_type;
34
  typedef Hash hasher;
35
  typedef Pred key_equal;
36
  typedef Allocator allocator_type;
37
+ typedef typename allocator_traits<Allocator>::pointer pointer;
38
+ typedef typename allocator_traits<Allocator>::const_pointer const_pointer;
39
+ typedef value_type& reference;
40
+ typedef const value_type& const_reference;
41
  typedef implementation-defined size_type;
42
  typedef implementation-defined difference_type;
43
 
44
  typedef implementation-defined iterator;
45
  typedef implementation-defined const_iterator;
46
  typedef implementation-defined local_iterator;
47
  typedef implementation-defined const_local_iterator;
48
 
49
  // construct/destroy/copy
50
+ unordered_set();
51
+ explicit unordered_set(size_type n,
52
  const hasher& hf = hasher(),
53
  const key_equal& eql = key_equal(),
54
  const allocator_type& a = allocator_type());
55
  template <class InputIterator>
56
  unordered_set(InputIterator f, InputIterator l,
 
66
  unordered_set(initializer_list<value_type>,
67
  size_type = see below,
68
  const hasher& hf = hasher(),
69
  const key_equal& eql = key_equal(),
70
  const allocator_type& a = allocator_type());
71
+ unordered_set(size_type n, const allocator_type& a)
72
+ : unordered_set(n, hasher(), key_equal(), a) { }
73
+ unordered_set(size_type n, const hasher& hf, const allocator_type& a)
74
+ : unordered_set(n, hf, key_equal(), a) { }
75
+ template <class InputIterator>
76
+ unordered_set(InputIterator f, InputIterator l, size_type n, const allocator_type& a)
77
+ : unordered_set(f, l, n, hasher(), key_equal(), a) { }
78
+ template <class InputIterator>
79
+ unordered_set(InputIterator f, InputIterator l, size_type n, const hasher& hf,
80
+ const allocator_type& a)
81
+ : unordered_set(f, l, n, hf, key_equal(), a) { }
82
+ unordered_set(initializer_list<value_type> il, size_type n, const allocator_type& a)
83
+ : unordered_set(il, n, hasher(), key_equal(), a) { }
84
+ unordered_set(initializer_list<value_type> il, size_type n, const hasher& hf,
85
+ const allocator_type& a)
86
+ : unordered_set(il, n, hf, key_equal(), a) { }
87
  ~unordered_set();
88
  unordered_set& operator=(const unordered_set&);
89
  unordered_set& operator=(unordered_set&&);
90
  unordered_set& operator=(initializer_list<value_type>);
91
  allocator_type get_allocator() const noexcept;
 
153
 
154
  template <class Key, class Hash, class Pred, class Alloc>
155
  void swap(unordered_set<Key, Hash, Pred, Alloc>& x,
156
  unordered_set<Key, Hash, Pred, Alloc>& y);
157
 
158
+ template <class Key, class Hash, class Pred, class Alloc>
159
+ bool operator==(const unordered_set<Key, Hash, Pred, Alloc>& a,
160
+ const unordered_set<Key, Hash, Pred, Alloc>& b);
161
+ template <class Key, class Hash, class Pred, class Alloc>
162
+ bool operator!=(const unordered_set<Key, Hash, Pred, Alloc>& a,
163
+ const unordered_set<Key, Hash, Pred, Alloc>& b);
164
  }
165
  ```
166