class error
Defined at line 90 of file ../../sdk/lib/fit/include/lib/fit/result.h
Type representing an error value of type E to return as a result. Returning an error through fit::result always requires using fit::error to disambiguate errors from values.
fit::result<E, Ts...> is implicitly constructible from any fit::error<F>, where E is constructible from F. This simplifies returning errors when the E has converting constructors.
Example usage:
fit::result<std::string, size_t> StringLength(const char* string) { if (string == nullptr) { return fit::error("Argument to StringLength is nullptr!"); } return fit::success(strlen(string)); }
Functions
error<E>
public void error<E>(Args &&... args)
Defined at line 97 of file ../../sdk/lib/fit/include/lib/fit/result.h
Constructs an error with the given arguments.
~error<E>
public void ~error<E>()
Defined at line 99 of file ../../sdk/lib/fit/include/lib/fit/result.h
error<E>
public void error<E>(const error<E> & )
Defined at line 102 of file ../../sdk/lib/fit/include/lib/fit/result.h
Error has the same copyability and moveability as the underlying type E.
operator=
public error<E> & operator=(const error<E> & )
Defined at line 103 of file ../../sdk/lib/fit/include/lib/fit/result.h
error<E>
public void error<E>(error<E> && )
Defined at line 104 of file ../../sdk/lib/fit/include/lib/fit/result.h
operator=
public error<E> & operator=(error<E> && )
Defined at line 105 of file ../../sdk/lib/fit/include/lib/fit/result.h