emlabcpp
modern opinionated embedded C++ library
|
result
represents an result of some operation, as an alternative to returning just bool
with true/false value.
More...
#include <result.h>
Public Member Functions | |
constexpr | result (result_e s) noexcept |
![]() | |
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 = result_e |
result
represents an result of some operation, as an alternative to returning just bool
with true/false value.
Result has only two states, SUCCESS or ERROR. Supports comparison: status st = ...; if(st == result::SUCCESS) { ... }
|
inlineconstexprnoexcept |