tmp/tmprf0wf5er/{from.md → to.md}
RENAMED
|
@@ -1,13 +1,17 @@
|
|
| 1 |
-
##### get_deleter <a id="util.smartptr.getdeleter">[[util.smartptr.getdeleter]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
-
template<class D, class T>
|
|
|
|
| 5 |
```
|
| 6 |
|
| 7 |
-
*Returns:* If `p`
|
| 8 |
-
|
| 9 |
-
valid as long as there exists a `shared_ptr` instance that owns
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
| 13 |
|
|
|
|
| 1 |
+
##### `get_deleter` <a id="util.smartptr.getdeleter">[[util.smartptr.getdeleter]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
+
template<class D, class T>
|
| 5 |
+
D* get_deleter(const shared_ptr<T>& p) noexcept;
|
| 6 |
```
|
| 7 |
|
| 8 |
+
*Returns:* If `p` owns a deleter `d` of type cv-unqualified `D`, returns
|
| 9 |
+
`addressof(d)`; otherwise returns `nullptr`. The returned pointer
|
| 10 |
+
remains valid as long as there exists a `shared_ptr` instance that owns
|
| 11 |
+
`d`.
|
| 12 |
+
|
| 13 |
+
[*Note 14*: It is unspecified whether the pointer remains valid longer
|
| 14 |
+
than that. This can happen if the implementation doesn’t destroy the
|
| 15 |
+
deleter until all `weak_ptr` instances that share ownership with `p`
|
| 16 |
+
have been destroyed. — *end note*]
|
| 17 |
|