fix status_or return value_or
All checks were successful
linux-x64-gcc / linux-gcc (Debug) (push) Successful in 1m26s
linux-x64-gcc / linux-gcc (Release) (push) Successful in 1m44s

This commit is contained in:
tqcq 2024-03-18 16:56:27 +08:00
parent 0544a85b94
commit 2dd0ce8964

View File

@ -107,13 +107,13 @@ public:
T &value_or(T &&val) &
{
if (!ok()) return std::forward<T>(val);
if (!ok()) return val;
return **this;
}
T const &value_or(T &&val) const &
{
if (!ok()) return std::forward<T>(val);
if (!ok()) return val;
return **this;
}