Option, Result: Make try_move_value() non-const since it modifies the Option
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
d842443869
commit
ae22321648
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user