From Jason Turner

[unord.map.syn]

Diff to HTML by rtfpessoa

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