zpp
Zephyr C++20 Framework
|
result class More...
#include <result.hpp>
Public Member Functions | |
result () noexcept=default | |
default initialization to error state More... | |
result (const error_result< T_Error > &rhs) noexcept | |
initialization to error state More... | |
result (error_result< T_Error > &&rhs) noexcept | |
result (const result &rhs) noexcept=default | |
copy contructor More... | |
result (result &&rhs) noexcept=default | |
move contructor More... | |
~result () noexcept=default | |
destructor More... | |
result & | operator= (const result &rhs) noexcept=default |
copy operator More... | |
result & | operator= (result &&rhs) noexcept=default |
move operator More... | |
void | assign_value () noexcept |
void | assign_error (const T_Error &e) noexcept |
void | assign_error (T_Error &&e) noexcept |
result & | operator= (const error_result< T_Error > &rhs) noexcept |
copy operator More... | |
result & | operator= (error_result< T_Error > &&rhs) noexcept |
move operator More... | |
void | value () noexcept |
return a reference to the OK value More... | |
void | value () const noexcept |
return a const reference to the result value More... | |
T_Error & | error () noexcept |
return a reference to the OK value More... | |
const T_Error & | error () const noexcept |
return a const reference to the result value More... | |
constexpr bool | has_value () const noexcept |
convert the result to a bool More... | |
constexpr | operator bool () const noexcept |
convert the result to a bool More... | |
result class
T_Ok | the type for the OK result |
T_Error | the type for the error result |
Definition at line 467 of file result.hpp.
|
defaultnoexcept |
default initialization to error state
|
inlinenoexcept |
initialization to error state
rhs | the error value to assign |
Definition at line 484 of file result.hpp.
|
inlinenoexcept |
Definition at line 490 of file result.hpp.
|
defaultnoexcept |
copy contructor
rhs | the value to assign |
|
defaultnoexcept |
move contructor
rhs | the value to assign |
|
defaultnoexcept |
destructor
|
inlinenoexcept |
Definition at line 534 of file result.hpp.
References zpp::result< T_Ok, T_Error >::m_error_value.
|
inlinenoexcept |
Definition at line 539 of file result.hpp.
References zpp::result< T_Ok, T_Error >::m_error_value.
|
inlinenoexcept |
Definition at line 530 of file result.hpp.
|
inlinenoexcept |
return a const reference to the result value
Definition at line 614 of file result.hpp.
References zpp::result< T_Ok, T_Error >::m_error_value.
|
inlinenoexcept |
return a reference to the OK value
Definition at line 599 of file result.hpp.
References zpp::result< T_Ok, T_Error >::m_error_value.
|
inlineconstexprnoexcept |
convert the result to a bool
Definition at line 627 of file result.hpp.
|
inlineexplicitconstexprnoexcept |
convert the result to a bool
Definition at line 636 of file result.hpp.
|
inlinenoexcept |
copy operator
rhs | the value to assign |
Definition at line 549 of file result.hpp.
References zpp::result< T_Ok, T_Error >::assign_error().
|
defaultnoexcept |
copy operator
rhs | the value to assign |
|
inlinenoexcept |
move operator
rhs | the value to assign |
Definition at line 560 of file result.hpp.
References zpp::result< T_Ok, T_Error >::assign_error().
|
defaultnoexcept |
move operator
rhs | the value to assign |
|
inlinenoexcept |
return a const reference to the result value
Definition at line 586 of file result.hpp.
|
inlinenoexcept |
return a reference to the OK value
Definition at line 573 of file result.hpp.