Unexpected - a helper type used to disambiguate the construction of Expected objects in the error state.
Declared in <folly/Expected.h>
template<class Error>
class [[nodiscard]] Unexpected final
| Name | Description |
|---|---|
Unexpected [constructor] | Constructors |
operator= | Assignment operators |
error | Returns the stored error. |
| Name | Description |
|---|---|
folly::expected_detail::expected_detail_ExpectedHelper::ExpectedHelper | Static helpers implementing the Expected continuation operations. |
folly::Expected | Forward declarations |
folly::Unexpected | Unexpected - a helper type used to disambiguate the construction of Expected objects in the error state. |
| Name | Description |
|---|---|
makeUnexpected | For constructing an Unexpected object from an error code. Unexpected objects are implicitly convertible to Expected object in the error state. Usage is as follows: |
operator co_await | Enables co_await on an Unexpected to short-circuit with an error. |
operator!= | Compares two Unexpected values for inequality. |
operator== | Compares two Unexpected values for equality. |
The return value should not be discarded.