result
result.hFrom:
20.17.0Similar to:
std::expectedUse
etl::expected as a replacement.A generic result type for returning either a result or an error. Deprecated. Use etl::expected
result
template <typename TValue, typename TError>
class resulttemplate <typename TError>
class result<void, TError>Description
Specialisation for void result.
result() = delete;Description
Cannot be default constructed.
result(const result& other)Description
Copy constructor.
result(result&& other)Description
Move constructor.
result(const TValue& value)Description
Construct from a value.
Not valid for void specialisation.
result(TValue&& value)Description
Move construct from a value.
Not valid for void specialisation.
result(const TError& err)Description
Construct from error.
result(TError&& err)Description
Move construct from error.
result& operator =(const result& other)Description
Copy assign.
result& operator =(result&& other)Description
Move assign.
result& operator =(const TValue& value)Description
Copy assign from value.
Not valid for void specialisation.
result& operator =(TValue&& value)Description
Move assign from value.
Not valid for void specialisation.
result& operator =(const TError& err)Description
Copy assign from error.
result& operator =(TError&& err)Description
Move assign from error.
bool is_value() constDescription
true if result contains a value.
bool is_error() constDescription
true if result contains an error.
const TValue& value() constDescription
Returns a const reference to the value.
Undefined if the result does not contain an value.
Not valid for void specialisation.
TValue&& value()Description
Returns an rvalue reference to the value.
Undefined if the result does not contain an value.
Not valid for void specialisation.
const TError& error() constDescription
Returns a const reference to the error.
Undefined if the result does not contain an error.
TError&& error()Description
Returns an rvalue reference to the error.
Undefined if the result does not contain an error.