fix status_or return value_or
This commit is contained in:
parent
0544a85b94
commit
2dd0ce8964
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user