tmp/tmph9_1jrqs/{from.md → to.md}
RENAMED
|
@@ -3,19 +3,27 @@
|
|
| 3 |
``` cpp
|
| 4 |
template<class T>
|
| 5 |
constexpr void swap(optional<T>& x, optional<T>& y) noexcept(noexcept(x.swap(y)));
|
| 6 |
```
|
| 7 |
|
| 8 |
-
*Constraints:*
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
*Effects:* Calls `x.swap(y)`.
|
| 12 |
|
| 13 |
``` cpp
|
| 14 |
template<class T> constexpr optional<decay_t<T>> make_optional(T&& v);
|
| 15 |
```
|
| 16 |
|
|
|
|
|
|
|
|
|
|
| 17 |
*Returns:* `optional<decay_t<T>>(std::forward<T>(v))`.
|
| 18 |
|
| 19 |
``` cpp
|
| 20 |
template<class T, class...Args>
|
| 21 |
constexpr optional<T> make_optional(Args&&... args);
|
|
|
|
| 3 |
``` cpp
|
| 4 |
template<class T>
|
| 5 |
constexpr void swap(optional<T>& x, optional<T>& y) noexcept(noexcept(x.swap(y)));
|
| 6 |
```
|
| 7 |
|
| 8 |
+
*Constraints:*
|
| 9 |
+
|
| 10 |
+
``` cpp
|
| 11 |
+
is_reference_v<T> || (is_move_constructible_v<T> && is_swappable_v<T>)
|
| 12 |
+
```
|
| 13 |
+
|
| 14 |
+
is `true`.
|
| 15 |
|
| 16 |
*Effects:* Calls `x.swap(y)`.
|
| 17 |
|
| 18 |
``` cpp
|
| 19 |
template<class T> constexpr optional<decay_t<T>> make_optional(T&& v);
|
| 20 |
```
|
| 21 |
|
| 22 |
+
*Constraints:* The call to `make_optional` does not use an explicit
|
| 23 |
+
*template-argument-list* that begins with a type *template-argument*.
|
| 24 |
+
|
| 25 |
*Returns:* `optional<decay_t<T>>(std::forward<T>(v))`.
|
| 26 |
|
| 27 |
``` cpp
|
| 28 |
template<class T, class...Args>
|
| 29 |
constexpr optional<T> make_optional(Args&&... args);
|