Option, Result: Make try_move_value() non-const since it modifies the Option
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
apio 2023-02-25 16:22:11 +01:00
parent d842443869
commit ae22321648
Signed by: apio
GPG Key ID: B8A7D06E42258954
2 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ template <typename T> class Option
return true;
}
bool try_move_value(T& ref) const
bool try_move_value(T& ref)
{
if (!has_value()) return false;
m_has_value = false;

View File

@ -110,7 +110,7 @@ template <typename T> class Result
return m_value.try_set_value(ref);
}
bool try_move_value(T& ref) const
bool try_move_value(T& ref)
{
return m_value.try_move_value(ref);
}