tmp/tmph3mko7hd/{from.md → to.md}
RENAMED
|
@@ -9,40 +9,45 @@ constexpr bool has_value() const noexcept;
|
|
| 9 |
|
| 10 |
``` cpp
|
| 11 |
constexpr void operator*() const noexcept;
|
| 12 |
```
|
| 13 |
|
| 14 |
-
|
| 15 |
|
| 16 |
``` cpp
|
| 17 |
constexpr void value() const &;
|
| 18 |
```
|
| 19 |
|
|
|
|
|
|
|
| 20 |
*Throws:* `bad_expected_access(error())` if `has_value()` is `false`.
|
| 21 |
|
| 22 |
``` cpp
|
| 23 |
constexpr void value() &&;
|
| 24 |
```
|
| 25 |
|
|
|
|
|
|
|
|
|
|
| 26 |
*Throws:* `bad_expected_access(std::move(error()))` if `has_value()` is
|
| 27 |
`false`.
|
| 28 |
|
| 29 |
``` cpp
|
| 30 |
constexpr const E& error() const & noexcept;
|
| 31 |
constexpr E& error() & noexcept;
|
| 32 |
```
|
| 33 |
|
| 34 |
-
|
| 35 |
|
| 36 |
*Returns:* *unex*.
|
| 37 |
|
| 38 |
``` cpp
|
| 39 |
constexpr E&& error() && noexcept;
|
| 40 |
constexpr const E&& error() const && noexcept;
|
| 41 |
```
|
| 42 |
|
| 43 |
-
|
| 44 |
|
| 45 |
*Returns:* `std::move(`*`unex`*`)`.
|
| 46 |
|
| 47 |
``` cpp
|
| 48 |
template<class G = E> constexpr E error_or(G&& e) const &;
|
|
|
|
| 9 |
|
| 10 |
``` cpp
|
| 11 |
constexpr void operator*() const noexcept;
|
| 12 |
```
|
| 13 |
|
| 14 |
+
`has_value()` is `true`.
|
| 15 |
|
| 16 |
``` cpp
|
| 17 |
constexpr void value() const &;
|
| 18 |
```
|
| 19 |
|
| 20 |
+
*Mandates:* `is_copy_constructible_v<E>` is `true`.
|
| 21 |
+
|
| 22 |
*Throws:* `bad_expected_access(error())` if `has_value()` is `false`.
|
| 23 |
|
| 24 |
``` cpp
|
| 25 |
constexpr void value() &&;
|
| 26 |
```
|
| 27 |
|
| 28 |
+
*Mandates:* `is_copy_constructible_v<E>` is `true` and
|
| 29 |
+
`is_move_constructible_v<E>` is `true`.
|
| 30 |
+
|
| 31 |
*Throws:* `bad_expected_access(std::move(error()))` if `has_value()` is
|
| 32 |
`false`.
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
constexpr const E& error() const & noexcept;
|
| 36 |
constexpr E& error() & noexcept;
|
| 37 |
```
|
| 38 |
|
| 39 |
+
`has_value()` is `false`.
|
| 40 |
|
| 41 |
*Returns:* *unex*.
|
| 42 |
|
| 43 |
``` cpp
|
| 44 |
constexpr E&& error() && noexcept;
|
| 45 |
constexpr const E&& error() const && noexcept;
|
| 46 |
```
|
| 47 |
|
| 48 |
+
`has_value()` is `false`.
|
| 49 |
|
| 50 |
*Returns:* `std::move(`*`unex`*`)`.
|
| 51 |
|
| 52 |
``` cpp
|
| 53 |
template<class G = E> constexpr E error_or(G&& e) const &;
|