diff --git a/include/sled/status_or.h b/include/sled/status_or.h index 834fb8a..cfa60c2 100644 --- a/include/sled/status_or.h +++ b/include/sled/status_or.h @@ -107,13 +107,13 @@ public: T &value_or(T &&val) & { - if (!ok()) return std::forward(val); + if (!ok()) return val; return **this; } T const &value_or(T &&val) const & { - if (!ok()) return std::forward(val); + if (!ok()) return val; return **this; }