tmp/tmpzz3_pkxy/{from.md → to.md}
RENAMED
|
@@ -50,12 +50,12 @@ public:
|
|
| 50 |
|
| 51 |
// [expected.void.obs], observers
|
| 52 |
constexpr explicit operator bool() const noexcept;
|
| 53 |
constexpr bool has_value() const noexcept;
|
| 54 |
constexpr void operator*() const noexcept;
|
| 55 |
-
constexpr void value() const &;
|
| 56 |
-
constexpr void value() &&;
|
| 57 |
constexpr const E& error() const & noexcept;
|
| 58 |
constexpr E& error() & noexcept;
|
| 59 |
constexpr const E&& error() const && noexcept;
|
| 60 |
constexpr E&& error() && noexcept;
|
| 61 |
template<class G = E> constexpr E error_or(G&&) const &;
|
|
@@ -92,15 +92,13 @@ private:
|
|
| 92 |
};
|
| 93 |
};
|
| 94 |
```
|
| 95 |
|
| 96 |
Any object of type `expected<T, E>` either represents a value of type
|
| 97 |
-
`T`, or contains a value of type `E` within
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
indicates whether the `expected<T, E>` object represents a value of type
|
| 101 |
-
`T`.
|
| 102 |
|
| 103 |
A program that instantiates the definition of the template
|
| 104 |
`expected<T, E>` with a type for the `E` parameter that is not a valid
|
| 105 |
template argument for `unexpected` is ill-formed.
|
| 106 |
|
|
|
|
| 50 |
|
| 51 |
// [expected.void.obs], observers
|
| 52 |
constexpr explicit operator bool() const noexcept;
|
| 53 |
constexpr bool has_value() const noexcept;
|
| 54 |
constexpr void operator*() const noexcept;
|
| 55 |
+
constexpr void value() const &; // freestanding-deleted
|
| 56 |
+
constexpr void value() &&; // freestanding-deleted
|
| 57 |
constexpr const E& error() const & noexcept;
|
| 58 |
constexpr E& error() & noexcept;
|
| 59 |
constexpr const E&& error() const && noexcept;
|
| 60 |
constexpr E&& error() && noexcept;
|
| 61 |
template<class G = E> constexpr E error_or(G&&) const &;
|
|
|
|
| 92 |
};
|
| 93 |
};
|
| 94 |
```
|
| 95 |
|
| 96 |
Any object of type `expected<T, E>` either represents a value of type
|
| 97 |
+
`T`, or contains a value of type `E` nested within [[intro.object]] it.
|
| 98 |
+
Member *`has_val`* indicates whether the `expected<T, E>` object
|
| 99 |
+
represents a value of type `T`.
|
|
|
|
|
|
|
| 100 |
|
| 101 |
A program that instantiates the definition of the template
|
| 102 |
`expected<T, E>` with a type for the `E` parameter that is not a valid
|
| 103 |
template argument for `unexpected` is ill-formed.
|
| 104 |
|