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 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
``` cpp
|
| 14 |
template <class T> struct hash<shared_ptr<T> >;
|
| 15 |
```
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 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 |
|