HDK
|
#include <VE_Result.h>
Public Member Functions | |
VE_ResultBase (T &&t) | |
VE_ResultBase (E &&e) | |
bool | ok () const |
Returns true if we have a valid result. Otherwise, we have an error. More... | |
T && | unpack () |
E && | error () |
T | peek () |
Static Public Member Functions | |
static VE_ResultBase< T, E > | copyFrom (T t) |
Protected Attributes | |
std::variant< T, E > | myItem |
Definition at line 24 of file VE_Result.h.
|
inline |
Definition at line 27 of file VE_Result.h.
|
inline |
Definition at line 28 of file VE_Result.h.
|
inlinestatic |
Definition at line 30 of file VE_Result.h.
|
inline |
Moves the error out of result. Once this is called, the VE_ResultBase object is in an undefined state and MUST NOT be accessed again.
Definition at line 46 of file VE_Result.h.
|
inline |
Returns true if we have a valid result. Otherwise, we have an error.
Definition at line 33 of file VE_Result.h.
|
inline |
Copies the value out for classes that suuport copying, allowing result to still be used. I am not sure if this is an actually a useful method to have, and am worried it might provide a false sense of safety around accessing result values multiply times.
Definition at line 58 of file VE_Result.h.
|
inline |
Moves the value out of result. Once this is called, the VE_ResultBase object is in an undefined state and MUST NOT be accessed again.
Definition at line 37 of file VE_Result.h.
|
protected |
Definition at line 66 of file VE_Result.h.