tmp/tmp1agryg0d/{from.md → to.md}
RENAMED
|
@@ -15,11 +15,11 @@ function(nullptr_t) noexcept;
|
|
| 15 |
``` cpp
|
| 16 |
function(const function& f);
|
| 17 |
```
|
| 18 |
|
| 19 |
*Ensures:* `!*this` if `!f`; otherwise, the target object of `*this` is
|
| 20 |
-
a copy of `f
|
| 21 |
|
| 22 |
*Throws:* Nothing if `f`’s target is a specialization of
|
| 23 |
`reference_wrapper` or a function pointer. Otherwise, may throw
|
| 24 |
`bad_alloc` or any exception thrown by the copy constructor of the
|
| 25 |
stored callable object.
|
|
@@ -49,12 +49,11 @@ template<class F> function(F&& f);
|
|
| 49 |
Let `FD` be `decay_t<F>`.
|
| 50 |
|
| 51 |
*Constraints:*
|
| 52 |
|
| 53 |
- `is_same_v<remove_cvref_t<F>, function>` is `false`, and
|
| 54 |
-
- `FD
|
| 55 |
-
`ArgTypes...` and return type `R`.
|
| 56 |
|
| 57 |
*Mandates:*
|
| 58 |
|
| 59 |
- `is_copy_constructible_v<FD>` is `true`, and
|
| 60 |
- `is_constructible_v<FD, F>` is `true`.
|
|
@@ -135,12 +134,12 @@ function& operator=(nullptr_t) noexcept;
|
|
| 135 |
|
| 136 |
``` cpp
|
| 137 |
template<class F> function& operator=(F&& f);
|
| 138 |
```
|
| 139 |
|
| 140 |
-
*Constraints:* `decay_t<F>
|
| 141 |
-
|
| 142 |
|
| 143 |
*Effects:* As if by: `function(std::forward<F>(f)).swap(*this);`
|
| 144 |
|
| 145 |
*Returns:* `*this`.
|
| 146 |
|
|
|
|
| 15 |
``` cpp
|
| 16 |
function(const function& f);
|
| 17 |
```
|
| 18 |
|
| 19 |
*Ensures:* `!*this` if `!f`; otherwise, the target object of `*this` is
|
| 20 |
+
a copy of the target object of `f`.
|
| 21 |
|
| 22 |
*Throws:* Nothing if `f`’s target is a specialization of
|
| 23 |
`reference_wrapper` or a function pointer. Otherwise, may throw
|
| 24 |
`bad_alloc` or any exception thrown by the copy constructor of the
|
| 25 |
stored callable object.
|
|
|
|
| 49 |
Let `FD` be `decay_t<F>`.
|
| 50 |
|
| 51 |
*Constraints:*
|
| 52 |
|
| 53 |
- `is_same_v<remove_cvref_t<F>, function>` is `false`, and
|
| 54 |
+
- `is_invocable_r_v<R, FD&, ArgTypes...>` is `true`.
|
|
|
|
| 55 |
|
| 56 |
*Mandates:*
|
| 57 |
|
| 58 |
- `is_copy_constructible_v<FD>` is `true`, and
|
| 59 |
- `is_constructible_v<FD, F>` is `true`.
|
|
|
|
| 134 |
|
| 135 |
``` cpp
|
| 136 |
template<class F> function& operator=(F&& f);
|
| 137 |
```
|
| 138 |
|
| 139 |
+
*Constraints:* `is_invocable_r_v<R, decay_t<F>&, ArgTypes...>` is
|
| 140 |
+
`true`.
|
| 141 |
|
| 142 |
*Effects:* As if by: `function(std::forward<F>(f)).swap(*this);`
|
| 143 |
|
| 144 |
*Returns:* `*this`.
|
| 145 |
|