tmp/tmp_dvso6tb/{from.md → to.md}
RENAMED
|
@@ -2,23 +2,20 @@
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template <class T, class D> struct hash<unique_ptr<T, D>>;
|
| 5 |
```
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
`
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 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 |
-
|
| 21 |
-
|
| 22 |
-
`
|
| 23 |
-
value as `hash<T*>()(p.get())`.
|
| 24 |
|
|
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template <class T, class D> struct hash<unique_ptr<T, D>>;
|
| 5 |
```
|
| 6 |
|
| 7 |
+
Letting `UP` be `unique_ptr<T,D>`, the specialization `hash<UP>` is
|
| 8 |
+
enabled ([[unord.hash]]) if and only if `hash<typename UP::pointer>` is
|
| 9 |
+
enabled. When enabled, for an object `p` of type `UP`, `hash<UP>()(p)`
|
| 10 |
+
shall evaluate to the same value as
|
| 11 |
+
`hash<typename UP::pointer>()(p.get())`. The member functions are not
|
| 12 |
+
guaranteed to be `noexcept`.
|
|
|
|
|
|
|
| 13 |
|
| 14 |
``` cpp
|
| 15 |
template <class T> struct hash<shared_ptr<T>>;
|
| 16 |
```
|
| 17 |
|
| 18 |
+
For an object `p` of type `shared_ptr<T>`, `hash<shared_ptr<T>>()(p)`
|
| 19 |
+
shall evaluate to the same value as
|
| 20 |
+
`hash<typename shared_ptr<T>::element_type*>()(p.get())`.
|
|
|
|
| 21 |
|