Implicitly cast result value to OK result with given value.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
6f932f375f
commit
e3853bf290
|
@ -18,6 +18,10 @@ namespace ArbUt {
|
||||||
/// @return The result class
|
/// @return The result class
|
||||||
inline static const Result& Error(const std::string& message) { return Result(message); }
|
inline static const Result& Error(const std::string& message) { return Result(message); }
|
||||||
|
|
||||||
|
/// @brief Implicitly return a success result with a value.
|
||||||
|
/// @param value The value to return.
|
||||||
|
inline Result(const T& value) : Result(ResultStatus::Ok, value) {}
|
||||||
|
|
||||||
/// @brief Returns whether or not the function succeeded,
|
/// @brief Returns whether or not the function succeeded,
|
||||||
/// @return Whether or not the function succeeded.
|
/// @return Whether or not the function succeeded.
|
||||||
[[nodiscard]] inline ResultStatus GetStatus() const noexcept { return _resultStatus; }
|
[[nodiscard]] inline ResultStatus GetStatus() const noexcept { return _resultStatus; }
|
||||||
|
|
Loading…
Reference in New Issue