26Result::Result() noexcept {}
28Result::Result (
const String& message) noexcept
29 : errorMessage (message)
33Result::Result (
const Result& other)
34 : errorMessage (other.errorMessage)
38Result& Result::operator= (
const Result& other)
40 errorMessage = other.errorMessage;
44Result::Result (Result&& other) noexcept
45 : errorMessage (std::move (other.errorMessage))
49Result& Result::operator= (Result&& other)
noexcept
51 errorMessage = std::move (other.errorMessage);
55bool Result::operator== (
const Result& other)
const noexcept
57 return errorMessage == other.errorMessage;
60bool Result::operator!= (
const Result& other)
const noexcept
62 return errorMessage != other.errorMessage;
67 return Result (errorMessage.isEmpty() ?
"Unknown Error" : errorMessage);
77bool Result::failed()
const noexcept {
return errorMessage.isNotEmpty(); }
78bool Result::operator!()
const noexcept {
return errorMessage.isNotEmpty(); }
Holds a resizable array of primitive or copy-by-value objects.
bool isEmpty() const noexcept
Returns true if the array is empty, false otherwise.
Represents the 'success' or 'failure' of an operation, and holds an associated error message to descr...