|
|
@ -388,11 +388,16 @@ public:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Asserts that the result succeeded and returns a reference to it.
|
|
|
|
/// Asserts that the result succeeded and returns a reference to it.
|
|
|
|
T& Unwrap() {
|
|
|
|
T& Unwrap() & {
|
|
|
|
ASSERT_MSG(Succeeded(), "Tried to Unwrap empty ResultVal");
|
|
|
|
ASSERT_MSG(Succeeded(), "Tried to Unwrap empty ResultVal");
|
|
|
|
return **this;
|
|
|
|
return **this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
T&& Unwrap() && {
|
|
|
|
|
|
|
|
ASSERT_MSG(Succeeded(), "Tried to Unwrap empty ResultVal");
|
|
|
|
|
|
|
|
return std::move(**this);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
T&& MoveFrom() {
|
|
|
|
T&& MoveFrom() {
|
|
|
|
return std::move(Unwrap());
|
|
|
|
return std::move(Unwrap());
|
|
|
|
}
|
|
|
|
}
|
|
|
|