From Jason Turner

[util.smartptr.getdeleter]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmprf0wf5er/{from.md → to.md} +12 -8
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> D* get_deleter(const shared_ptr<T>& p) noexcept;
 
5
  ```
6
 
7
- *Returns:* If `p` *owns* a deleter `d` of type cv-unqualified `D`,
8
- returns `&d`; otherwise returns `nullptr`. The returned pointer remains
9
- valid as long as there exists a `shared_ptr` instance that owns `d`. It
10
- is unspecified whether the pointer remains valid longer than that. This
11
- can happen if the implementation doesn’t destroy the deleter until all
12
- `weak_ptr` instances that share ownership with `p` have been destroyed.
 
 
 
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