emlabcpp
modern opinionated embedded C++ library
|
outcome
represents tristate resut of some operation, which can succeed, fail or produce an error.
More...
#include <outcome.h>
Public Member Functions | |
constexpr | outcome (result const r) noexcept |
constexpr | outcome (result_e const r) noexcept |
constexpr | operator result () const noexcept |
constexpr | status (enum_type s) noexcept |
constexpr | status (status const &) noexcept=default |
constexpr | status (status &&) noexcept=default |
![]() | |
constexpr | status (enum_type s) noexcept |
constexpr | status (status const &) noexcept=default |
constexpr | status (status &&) noexcept=default |
constexpr status & | operator= (status const &) noexcept=default |
constexpr status & | operator= (status &&) noexcept=default |
constexpr enum_type | value () const noexcept |
Additional Inherited Members | |
![]() | |
using | enum_type = outcome_e |
outcome
represents tristate resut of some operation, which can succeed, fail or produce an error.
outcome
is designed to be used with SUCCESS, FAILURE, and ERROR global constants. The common semantics should be:
Supports comparison: outcome ot = ...; if(ot == outcome::SUCCESS) { ... }
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
References emlabcpp::SUCCESS.
|
inlineconstexprnoexcept |
|
constexprdefaultnoexcept |
|
constexprdefaultnoexcept |