Hermes
|
Holds a valid object or an error. More...
Public Member Functions | |
HERMES_DEVICE_CALLABLE | Result (const UnexpectedResultType< E > &err={}) |
HERMES_DEVICE_CALLABLE | Result (const T &v) |
Value constructor. More... | |
HERMES_DEVICE_CALLABLE | Result (T &&v) |
Move value constructor. More... | |
HERMES_DEVICE_CALLABLE | Result (const Result &other) |
Copy constructor. More... | |
HERMES_DEVICE_CALLABLE | Result (Result &&other) noexcept |
Move constructor. More... | |
HERMES_DEVICE_CALLABLE | operator bool () const noexcept |
Casts to bool (indicates whether this contains value) More... | |
HERMES_DEVICE_CALLABLE Result & | operator= (const Result &other) |
Copy assignment. More... | |
HERMES_DEVICE_CALLABLE Result & | operator= (Result &&other) noexcept |
Move assignment. More... | |
HERMES_DEVICE_CALLABLE Result & | operator= (const T &v) |
Value assignment. More... | |
HERMES_DEVICE_CALLABLE Result & | operator= (T &&v) |
Move value assignment. More... | |
HERMES_DEVICE_CALLABLE T * | operator-> () |
Gets value pointer. More... | |
HERMES_DEVICE_CALLABLE const T * | operator-> () const |
Gets const value pointer. More... | |
HERMES_DEVICE_CALLABLE T & | operator* () |
Gets value reference. More... | |
HERMES_DEVICE_CALLABLE const T & | operator* () const |
Gets value const reference. More... | |
HERMES_DEVICE_CALLABLE bool | good () const |
HERMES_DEVICE_CALLABLE E | status () const |
HERMES_DEVICE_CALLABLE void | reset () |
Destroys stored value (if present) | |
HERMES_DEVICE_CALLABLE T | valueOr (const T &v) const |
Gets value copy (if present) More... | |
HERMES_DEVICE_CALLABLE T & | value () |
Gets value's reference. More... | |
HERMES_DEVICE_CALLABLE const T & | value () const |
Gets value's const reference. More... | |
Static Public Member Functions | |
static HERMES_DEVICE_CALLABLE Result< T, E > | error (E e) |
Holds a valid object or an error.
|
inlineexplicit |
err |
|
inlineexplicit |
Value constructor.
v |
|
inlineexplicit |
Move value constructor.
v |
|
inline |
Copy constructor.
other |
|
inlinenoexcept |
Move constructor.
other |
|
inlinestatic |
e |
|
inlineexplicitnoexcept |
Casts to bool (indicates whether this contains value)
|
inline |
Gets value reference.
|
inline |
Gets value const reference.
|
inline |
Gets value pointer.
|
inline |
Gets const value pointer.
|
inline |
Copy assignment.
other |
|
inline |
Value assignment.
v |
|
inlinenoexcept |
Move assignment.
other |
|
inline |
Move value assignment.
v |
|
inline |
Gets value's reference.
|
inline |
Gets value's const reference.
|
inline |
Gets value copy (if present)
v | value returned in case of empty |