|
C++ Actor Framework 1.0.0
|
The pattern expected<void> shall be used for functions that may generate an error but would otherwise return bool.
More...
#include <expected.hpp>
Public Types | |
| using | value_type = void |
| using | error_type = caf::error |
| template<class U > | |
| using | rebind = expected<U> |
Public Member Functions | |
| template<class Enum , class = std::enable_if_t<is_error_code_enum_v<Enum>>> | |
| expected (Enum x) | |
| expected (caf::error err) noexcept | |
| expected (const expected &other)=default | |
| expected (expected &&other) noexcept=default | |
| expected (std::in_place_t) | |
| expected & | operator= (const expected &other)=default |
| expected & | operator= (expected &&other) noexcept=default |
| expected & | operator= (caf::error err) noexcept |
| template<class Enum , class = std::enable_if_t<is_error_code_enum_v<Enum>>> | |
| expected & | operator= (Enum code) |
| operator bool () const noexcept | |
Returns true if the object does not hold an error. | |
| bool | has_value () const noexcept |
Returns true if the object does not hold an error. | |
| template<class... Args> | |
| void | emplace () noexcept |
| void | swap (expected &other) noexcept |
| void | value () const & |
| void | value () && |
| void | operator* () const noexcept |
| caf::error & | error () &noexcept |
| const caf::error & | error () const &noexcept |
| caf::error && | error () &&noexcept |
| const caf::error && | error () const &&noexcept |
| template<class F > | |
| auto | and_then (F &&f) & |
| template<class F > | |
| auto | and_then (F &&f) && |
| template<class F > | |
| auto | and_then (F &&f) const & |
| template<class F > | |
| auto | and_then (F &&f) const && |
| template<class F > | |
| expected | or_else (F &&f) & |
| template<class F > | |
| expected | or_else (F &&f) && |
| template<class F > | |
| expected | or_else (F &&f) const & |
| template<class F > | |
| expected | or_else (F &&f) const && |
| template<class F > | |
| auto | transform (F &&f) & |
| template<class F > | |
| auto | transform (F &&f) && |
| template<class F > | |
| auto | transform (F &&f) const & |
| template<class F > | |
| auto | transform (F &&f) const && |
| template<class F > | |
| expected | transform_or (F &&f) & |
| template<class F > | |
| expected | transform_or (F &&f) && |
| template<class F > | |
| expected | transform_or (F &&f) const & |
| template<class F > | |
| expected | transform_or (F &&f) const && |
The pattern expected<void> shall be used for functions that may generate an error but would otherwise return bool.