ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
#include <acts/blob/master/Core/include/Acts/Utilities/Result.hpp>
Public Member Functions | |
Result ()=delete | |
Result (const Result< T, E > &other)=delete | |
Result< T, E > & | operator= (const Result< T, E > &other)=delete |
Result (Result< T, E > &&other) | |
Result< T, E > & | operator= (Result< T, E > &&other) |
template<typename T2 , typename _E = E, typename _T = T, typename = std::enable_if_t< (!std::is_same_v<_T, _E> && !std::is_constructible_v<_T, _E> && !std::is_convertible_v<_T, _E> && !std::is_constructible_v<_E, _T> && !std::is_convertible_v<_E, _T> && !(std::is_convertible_v<T2, _T> && std::is_convertible_v<T2, _E>))>> | |
Result (T2 value) noexcept | |
Constructor from arbitrary value This constructor allows construction from any value. This constructor is only enabled if T and E are unambiguous, meaning the cannot be implicitly converted and there is T cannot be constructed from E and vice-versa. This means that when this is invoked, the value can be propagated to the underlying variant, and the assignment will be correct, and error will be an error, and a value will be a value. | |
Private Member Functions | |
Result (std::variant< T, E > &&var) | |
Class which encapsulates either a valid result, or an error
T | The valid result value |
E | The error, defaults to std::error_code |
Definition at line 25 of file Result.hpp.
View newest version in sPHENIX GitHub at line 25 of file Result.hpp
|
inlineprivate |
Private constructor which accepts an external variant. This is used by the factory static methods to set up the variant unambiguously in all cases.
Definition at line 31 of file Result.hpp.
View newest version in sPHENIX GitHub at line 31 of file Result.hpp
|
delete |
Default construction is disallowed.
|
delete |
Copy construction is disallowed
|
inline |
Move construction is allowed
Definition at line 52 of file Result.hpp.
View newest version in sPHENIX GitHub at line 52 of file Result.hpp
|
inlinenoexcept |
Constructor from arbitrary value This constructor allows construction from any value. This constructor is only enabled if T and E are unambiguous, meaning the cannot be implicitly converted and there is T cannot be constructed from E and vice-versa. This means that when this is invoked, the value can be propagated to the underlying variant, and the assignment will be correct, and error will be an error, and a value will be a value.
success
and failure
static factory methods. T2 | Type of the potential assignment |
value | The potential value, could be an actual valid value or an error. |
Definition at line 85 of file Result.hpp.
View newest version in sPHENIX GitHub at line 85 of file Result.hpp
|
delete |
Assignment is disallowed
|
inline |
Move assignment is allowed
other | The other result instance, rvalue reference |
Definition at line 59 of file Result.hpp.
View newest version in sPHENIX GitHub at line 59 of file Result.hpp