tmp/tmpug49v_xm/{from.md → to.md}
RENAMED
|
@@ -2,37 +2,37 @@
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
constexpr weak_ptr() noexcept;
|
| 5 |
```
|
| 6 |
|
| 7 |
-
*Effects:* Constructs an
|
| 8 |
|
| 9 |
*Postconditions:* `use_count() == 0`.
|
| 10 |
|
| 11 |
``` cpp
|
| 12 |
weak_ptr(const weak_ptr& r) noexcept;
|
| 13 |
template<class Y> weak_ptr(const weak_ptr<Y>& r) noexcept;
|
| 14 |
template<class Y> weak_ptr(const shared_ptr<Y>& r) noexcept;
|
| 15 |
```
|
| 16 |
|
| 17 |
-
The second and third constructors shall not participate in
|
| 18 |
-
resolution unless `Y*` is
|
| 19 |
|
| 20 |
-
*Effects:* If `r` is
|
| 21 |
-
otherwise, constructs a `weak_ptr` object that
|
| 22 |
-
|
| 23 |
|
| 24 |
*Postconditions:* `use_count() == r.use_count()`.
|
| 25 |
|
| 26 |
``` cpp
|
| 27 |
weak_ptr(weak_ptr&& r) noexcept;
|
| 28 |
template<class Y> weak_ptr(weak_ptr<Y>&& r) noexcept;
|
| 29 |
```
|
| 30 |
|
| 31 |
-
The second constructor shall not participate in overload
|
| 32 |
-
unless `Y*` is
|
| 33 |
|
| 34 |
-
*Effects:* Move
|
| 35 |
|
| 36 |
*Postconditions:* `*this` shall contain the old value of `r`. `r` shall
|
| 37 |
-
be
|
| 38 |
|
|
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
constexpr weak_ptr() noexcept;
|
| 5 |
```
|
| 6 |
|
| 7 |
+
*Effects:* Constructs an empty `weak_ptr` object.
|
| 8 |
|
| 9 |
*Postconditions:* `use_count() == 0`.
|
| 10 |
|
| 11 |
``` cpp
|
| 12 |
weak_ptr(const weak_ptr& r) noexcept;
|
| 13 |
template<class Y> weak_ptr(const weak_ptr<Y>& r) noexcept;
|
| 14 |
template<class Y> weak_ptr(const shared_ptr<Y>& r) noexcept;
|
| 15 |
```
|
| 16 |
|
| 17 |
+
*Remarks:* The second and third constructors shall not participate in
|
| 18 |
+
overload resolution unless `Y*` is compatible with `T*`.
|
| 19 |
|
| 20 |
+
*Effects:* If `r` is empty, constructs an empty `weak_ptr` object;
|
| 21 |
+
otherwise, constructs a `weak_ptr` object that shares ownership with `r`
|
| 22 |
+
and stores a copy of the pointer stored in `r`.
|
| 23 |
|
| 24 |
*Postconditions:* `use_count() == r.use_count()`.
|
| 25 |
|
| 26 |
``` cpp
|
| 27 |
weak_ptr(weak_ptr&& r) noexcept;
|
| 28 |
template<class Y> weak_ptr(weak_ptr<Y>&& r) noexcept;
|
| 29 |
```
|
| 30 |
|
| 31 |
+
*Remarks:* The second constructor shall not participate in overload
|
| 32 |
+
resolution unless `Y*` is compatible with `T*`.
|
| 33 |
|
| 34 |
+
*Effects:* Move constructs a `weak_ptr` instance from `r`.
|
| 35 |
|
| 36 |
*Postconditions:* `*this` shall contain the old value of `r`. `r` shall
|
| 37 |
+
be empty. `r.use_count() == 0`.
|
| 38 |
|