iox::cxx::expected< void, ErrorType >🔗
Inherits from iox::cxx::expected< ErrorType >
Additional inherited members🔗
Public Functions inherited from iox::cxx::expected< ErrorType >
Name | |
---|---|
expected() default ctor is deleted since you have to clearly state if the expected contains a success value or an error value |
|
expected(const expected & ) =default the copy constructor calls the copy constructor of the contained success value or the error value - depending on what is stored in the expected |
|
expected(expected && rhs) the move constructor calls the move constructor of the contained success value or the error value - depending on what is stored in the expected |
|
~expected() =default calls the destructor of the success value or error value - depending on what is stored in the expected |
|
expected & | operator=(const expected & ) calls the copy assignment operator of the contained success value or the error value - depending on what is stored in the expected |
expected & | operator=(expected && rhs) calls the move assignment operator of the contained success value or the error value - depending on what is stored in the expected |
expected(const success< void > & successValue) constructs an expected which is signaling success |
|
expected(const error< ErrorType > & errorValue) constructs an expected which is signaling an error and stores the error value provided by errorValue |
|
expected(error< ErrorType > && errorValue) constructs an expected which is signaling an error and stores the error value provided by value |
|
operator bool() const returns true if the expected contains an error otherwise false |
|
bool | has_error() const returns true if the expected contains an error otherwise false |
ErrorType & | get_error() returns a reference to the contained error value, if the expected does not contain an error this is undefined behavior |
const ErrorType & | get_error() const returns a const reference to the contained error value, if the expected does not contain an error this is undefined behavior |
ErrorType && | get_error() returns a rvalue reference to the contained error value, if the expected does not contain an error this is undefined behavior |
const expected & | or_else(const cxx::function_ref< void(ErrorType &)> & callable) const if the expected does contain an error the given callable is called and a reference to the ErrorType is given as an argument to the callable |
expected & | or_else(const cxx::function_ref< void(ErrorType &)> & callable) if the expected does contain an error the given callable is called and a reference to the ErrorType is given as an argument to the callable |
const expected & | and_then(const cxx::function_ref< void()> & callable) const if the expected does contain a success value the given callable is called and a reference to the expected is given as an argument to the callable |
expected & | and_then(const cxx::function_ref< void()> & callable) if the expected does contain a success value the given callable is called and a reference to the expected is given as an argument to the callable |
expected | create_value() creates an expected which is signaling success |
template <typename... Targs> expected |
create_error(Targs &&... args) creates an expected which is signaling an error and perfectly forwards the args to the constructor of lErrorType |
Detailed Description🔗
template <typename ErrorType >
class iox::cxx::expected< void, ErrorType >;
Updated on 18 December 2023 at 13:11:42 CET