From Jason Turner

[util.smartptr.hash]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpv1tqpk2z/{from.md → to.md} +10 -7
tmp/tmpv1tqpk2z/{from.md → to.md} RENAMED
@@ -2,20 +2,23 @@
2
 
3
  ``` cpp
4
  template <class T, class D> struct hash<unique_ptr<T, D> >;
5
  ```
6
 
7
- *Requires:* The template specialization shall meet the requirements of
8
- class template `hash` ([[unord.hash]]). For an object `p` of type `UP`,
9
- where `UP` is `unique_ptr<T, D>`, `hash<UP>()(p)` shall evaluate to the
10
- same value as `hash<typename UP::pointer>()(p.get())`. The
11
- specialization `hash<typename UP::pointer>` shall be well-formed.
 
 
 
12
 
13
  ``` cpp
14
  template <class T> struct hash<shared_ptr<T> >;
15
  ```
16
 
17
- *Requires:* The template specialization shall meet the requirements of
18
- class template `hash` ([[unord.hash]]). For an object `p` of type
19
  `shared_ptr<T>`, `hash<shared_ptr<T> >()(p)` shall evaluate to the same
20
  value as `hash<T*>()(p.get())`.
21
 
 
2
 
3
  ``` cpp
4
  template <class T, class D> struct hash<unique_ptr<T, D> >;
5
  ```
6
 
7
+ The template specialization shall meet the requirements of class
8
+ template `hash` ([[unord.hash]]). For an object `p` of type `UP`, where
9
+ `UP` is `unique_ptr<T, D>`, `hash<UP>()(p)` shall evaluate to the same
10
+ value as `hash<typename UP::pointer>()(p.get())`.
11
+
12
+ *Requires:* The specialization `hash<typename UP::pointer>` shall be
13
+ well-formed and well-defined, and shall meet the requirements of class
14
+ template `hash` ([[unord.hash]]).
15
 
16
  ``` cpp
17
  template <class T> struct hash<shared_ptr<T> >;
18
  ```
19
 
20
+ The template specialization shall meet the requirements of class
21
+ template `hash` ([[unord.hash]]). For an object `p` of type
22
  `shared_ptr<T>`, `hash<shared_ptr<T> >()(p)` shall evaluate to the same
23
  value as `hash<T*>()(p.get())`.
24