RResult<void> has no data member and no Inspect() method but instead a Success() factory method.
Definition at line 264 of file RError.hxx.
Public Member Functions | |
| RResult (const RResult &other)=delete | |
| RResult (const RResult &other)=delete | |
| RResult (const void &value) | |
| RResult (RError &&error) | |
| RResult (RError &&error) | |
| RResult (RResult &&other)=default | |
| RResult (RResult &&other)=default | |
| RResult (void &&value) | |
| ~RResult ()=default | |
| ~RResult ()=default | |
| RResult & | Forward (RError::RLocation &&sourceLocation) |
| Used by R__FORWARD_RESULT in order to keep track of the stack trace in case of errors. | |
| RResult & | Forward (RError::RLocation &&sourceLocation) |
| Used by R__FORWARD_RESULT in order to keep track of the stack trace in case of errors. | |
| const void & | Inspect () |
| If the operation was successful, returns a const reference to the inner type. | |
| operator bool () | |
| operator bool () | |
| RResult & | operator= (const RResult &other)=delete |
| RResult & | operator= (const RResult &other)=delete |
| RResult & | operator= (RResult &&other)=default |
| RResult & | operator= (RResult &&other)=default |
| void | ThrowOnError () |
| Short-hand method to throw an exception in the case of errors. | |
| void | Unwrap () |
| If the operation was successful, returns the inner type by value. | |
Public Member Functions inherited from ROOT::RResultBase | |
| RResultBase (const RResultBase &other)=delete | |
| RResultBase (RResultBase &&other)=default | |
| ~RResultBase () noexcept(false) | |
| std::optional< RError > | GetError () const |
| RResultBase & | operator= (const RResultBase &other)=delete |
| RResultBase & | operator= (RResultBase &&other)=default |
| void | Throw () |
| Throws an RException with fError. | |
Static Public Member Functions | |
| static RResult | Success () |
| Returns a RResult<void> that captures the successful execution of the function. | |
Static Public Member Functions inherited from ROOT::RResultBase | |
| static RError | ForwardError (RResultBase &&result, RError::RLocation &&sourceLocation) |
| Used by R__FORWARD_ERROR in order to keep track of the stack trace. | |
Private Member Functions | |
| RResult ()=default | |
| void | ThrowOnError () |
Private Attributes | |
| std::optional< void > | fValue |
| The result value, only present in case of successful execution. | |
Additional Inherited Members | |
Protected Member Functions inherited from ROOT::RResultBase | |
| RResultBase ()=default | |
| RResultBase (RError &&error) | |
| bool | Check () |
| Used by the RResult<T> bool operator. | |
Protected Attributes inherited from ROOT::RResultBase | |
| std::unique_ptr< RError > | fError |
| This is the nullptr for an RResult representing success. | |
| bool | fIsChecked {false} |
| Switches to true once the user of an RResult object checks the object status. | |
#include <ROOT/RError.hxx>
|
privatedefault |
|
inline |
Definition at line 271 of file RError.hxx.
|
delete |
|
default |
|
default |
|
inline |
Definition at line 219 of file RError.hxx.
|
inline |
Definition at line 220 of file RError.hxx.
|
inline |
Definition at line 221 of file RError.hxx.
|
delete |
|
default |
|
default |
|
inline |
Used by R__FORWARD_RESULT in order to keep track of the stack trace in case of errors.
Definition at line 231 of file RError.hxx.
|
inline |
Used by R__FORWARD_RESULT in order to keep track of the stack trace in case of errors.
Definition at line 281 of file RError.hxx.
|
inline |
If the operation was successful, returns a const reference to the inner type.
If there was an error, Inspect() instead throws an exception.
Definition at line 240 of file RError.hxx.
|
inlineexplicit |
Definition at line 259 of file RError.hxx.
|
inlineexplicit |
Definition at line 296 of file RError.hxx.
|
delete |
|
delete |
|
default |
|
default |
|
inlinestatic |
Returns a RResult<void> that captures the successful execution of the function.
Definition at line 270 of file RError.hxx.
|
inlineprivate |
Definition at line 204 of file RError.hxx.
|
inline |
Short-hand method to throw an exception in the case of errors.
Does nothing for successful RResults.
Definition at line 290 of file RError.hxx.
|
inline |
If the operation was successful, returns the inner type by value.
For move-only types, Unwrap can only be called once, as it yields ownership of the inner value to the caller using std::move, potentially leaving the RResult in an unspecified state.
If there was an error, Unwrap() instead throws an exception.
Definition at line 253 of file RError.hxx.
|
private |
The result value, only present in case of successful execution.
Definition at line 201 of file RError.hxx.