tmp/tmpecc_6g_8/{from.md → to.md}
RENAMED
|
@@ -43,11 +43,11 @@ constexpr optional(optional&& rhs) noexcept(see below);
|
|
| 43 |
```
|
| 44 |
|
| 45 |
*Constraints:* `is_move_constructible_v<T>` is `true`.
|
| 46 |
|
| 47 |
*Effects:* If `rhs` contains a value, direct-non-list-initializes the
|
| 48 |
-
contained value with `std::move(
|
| 49 |
|
| 50 |
*Ensures:* `rhs.has_value() == this->has_value()`.
|
| 51 |
|
| 52 |
*Throws:* Any exception thrown by the selected constructor of `T`.
|
| 53 |
|
|
@@ -89,11 +89,11 @@ template<class U, class... Args>
|
|
| 89 |
|
| 90 |
*Remarks:* If `T`’s constructor selected for the initialization is a
|
| 91 |
constexpr constructor, this constructor is a constexpr constructor.
|
| 92 |
|
| 93 |
``` cpp
|
| 94 |
-
template<class U = T> constexpr explicit(see below) optional(U&& v);
|
| 95 |
```
|
| 96 |
|
| 97 |
*Constraints:*
|
| 98 |
|
| 99 |
- `is_constructible_v<T, U>` is `true`,
|
|
@@ -149,11 +149,11 @@ template<class U> constexpr explicit(see below) optional(optional<U>&& rhs);
|
|
| 149 |
- `is_constructible_v<T, U>` is `true`, and
|
| 150 |
- if `T` is not cv `bool`, *`converts-from-any-cvref`*`<T, optional<U>>`
|
| 151 |
is `false`.
|
| 152 |
|
| 153 |
*Effects:* If `rhs` contains a value, direct-non-list-initializes the
|
| 154 |
-
contained value with `std::move(
|
| 155 |
|
| 156 |
*Ensures:* `rhs.has_value() == this->has_value()`.
|
| 157 |
|
| 158 |
*Throws:* Any exception thrown by the selected constructor of `T`.
|
| 159 |
|
|
|
|
| 43 |
```
|
| 44 |
|
| 45 |
*Constraints:* `is_move_constructible_v<T>` is `true`.
|
| 46 |
|
| 47 |
*Effects:* If `rhs` contains a value, direct-non-list-initializes the
|
| 48 |
+
contained value with `*std::move(rhs)`. `rhs.has_value()` is unchanged.
|
| 49 |
|
| 50 |
*Ensures:* `rhs.has_value() == this->has_value()`.
|
| 51 |
|
| 52 |
*Throws:* Any exception thrown by the selected constructor of `T`.
|
| 53 |
|
|
|
|
| 89 |
|
| 90 |
*Remarks:* If `T`’s constructor selected for the initialization is a
|
| 91 |
constexpr constructor, this constructor is a constexpr constructor.
|
| 92 |
|
| 93 |
``` cpp
|
| 94 |
+
template<class U = remove_cv_t<T>> constexpr explicit(see below) optional(U&& v);
|
| 95 |
```
|
| 96 |
|
| 97 |
*Constraints:*
|
| 98 |
|
| 99 |
- `is_constructible_v<T, U>` is `true`,
|
|
|
|
| 149 |
- `is_constructible_v<T, U>` is `true`, and
|
| 150 |
- if `T` is not cv `bool`, *`converts-from-any-cvref`*`<T, optional<U>>`
|
| 151 |
is `false`.
|
| 152 |
|
| 153 |
*Effects:* If `rhs` contains a value, direct-non-list-initializes the
|
| 154 |
+
contained value with `*std::move(rhs)`. `rhs.has_value()` is unchanged.
|
| 155 |
|
| 156 |
*Ensures:* `rhs.has_value() == this->has_value()`.
|
| 157 |
|
| 158 |
*Throws:* Any exception thrown by the selected constructor of `T`.
|
| 159 |
|