From Jason Turner

[unord.set.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpl0jcl17a/{from.md → to.md} +25 -10
tmp/tmpl0jcl17a/{from.md → to.md} RENAMED
@@ -2,32 +2,33 @@
2
 
3
  ``` cpp
4
  #include <initializer_list>
5
 
6
  namespace std {
7
-
8
- // [unord.set], class template unordered_set:
9
  template <class Key,
10
  class Hash = hash<Key>,
11
- class Pred = std::equal_to<Key>,
12
- class Alloc = std::allocator<Key> >
13
  class unordered_set;
14
 
15
- // [unord.multiset], class template unordered_multiset:
16
  template <class Key,
17
  class Hash = hash<Key>,
18
- class Pred = std::equal_to<Key>,
19
- class Alloc = std::allocator<Key> >
20
  class unordered_multiset;
21
 
22
  template <class Key, class Hash, class Pred, class Alloc>
23
  void swap(unordered_set<Key, Hash, Pred, Alloc>& x,
24
- unordered_set<Key, Hash, Pred, Alloc>& y);
 
25
 
26
  template <class Key, class Hash, class Pred, class Alloc>
27
  void swap(unordered_multiset<Key, Hash, Pred, Alloc>& x,
28
- unordered_multiset<Key, Hash, Pred, Alloc>& y);
 
29
 
30
  template <class Key, class Hash, class Pred, class Alloc>
31
  bool operator==(const unordered_set<Key, Hash, Pred, Alloc>& a,
32
  const unordered_set<Key, Hash, Pred, Alloc>& b);
33
  template <class Key, class Hash, class Pred, class Alloc>
@@ -37,8 +38,22 @@ namespace std {
37
  bool operator==(const unordered_multiset<Key, Hash, Pred, Alloc>& a,
38
  const unordered_multiset<Key, Hash, Pred, Alloc>& b);
39
  template <class Key, class Hash, class Pred, class Alloc>
40
  bool operator!=(const unordered_multiset<Key, Hash, Pred, Alloc>& a,
41
  const unordered_multiset<Key, Hash, Pred, Alloc>& b);
42
- } // namespace std
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  ```
44
 
 
2
 
3
  ``` cpp
4
  #include <initializer_list>
5
 
6
  namespace std {
7
+ // [unord.set], class template unordered_set
 
8
  template <class Key,
9
  class Hash = hash<Key>,
10
+ class Pred = equal_to<Key>,
11
+ class Alloc = allocator<Key>>
12
  class unordered_set;
13
 
14
+ // [unord.multiset], class template unordered_multiset
15
  template <class Key,
16
  class Hash = hash<Key>,
17
+ class Pred = equal_to<Key>,
18
+ class Alloc = allocator<Key>>
19
  class unordered_multiset;
20
 
21
  template <class Key, class Hash, class Pred, class Alloc>
22
  void swap(unordered_set<Key, Hash, Pred, Alloc>& x,
23
+ unordered_set<Key, Hash, Pred, Alloc>& y)
24
+ noexcept(noexcept(x.swap(y)));
25
 
26
  template <class Key, class Hash, class Pred, class Alloc>
27
  void swap(unordered_multiset<Key, Hash, Pred, Alloc>& x,
28
+ unordered_multiset<Key, Hash, Pred, Alloc>& y)
29
+ noexcept(noexcept(x.swap(y)));
30
 
31
  template <class Key, class Hash, class Pred, class Alloc>
32
  bool operator==(const unordered_set<Key, Hash, Pred, Alloc>& a,
33
  const unordered_set<Key, Hash, Pred, Alloc>& b);
34
  template <class Key, class Hash, class Pred, class Alloc>
 
38
  bool operator==(const unordered_multiset<Key, Hash, Pred, Alloc>& a,
39
  const unordered_multiset<Key, Hash, Pred, Alloc>& b);
40
  template <class Key, class Hash, class Pred, class Alloc>
41
  bool operator!=(const unordered_multiset<Key, Hash, Pred, Alloc>& a,
42
  const unordered_multiset<Key, Hash, Pred, Alloc>& b);
43
+
44
+ namespace pmr {
45
+ template <class Key,
46
+ class Hash = hash<Key>,
47
+ class Pred = equal_to<Key>>
48
+ using unordered_set = std::unordered_set<Key, Hash, Pred,
49
+ polymorphic_allocator<Key>>;
50
+
51
+ template <class Key,
52
+ class Hash = hash<Key>,
53
+ class Pred = equal_to<Key>>
54
+ using unordered_multiset = std::unordered_multiset<Key, Hash, Pred,
55
+ polymorphic_allocator<Key>>;
56
+ }
57
+ }
58
  ```
59