mirror of
https://github.com/trafi/maybe-result-cpp
synced 2024-05-20 01:06:12 +02:00
Use std::move to move value in move accessor.
This commit is contained in:
parent
26145fdd1e
commit
0a66e48140
|
@ -146,7 +146,7 @@ namespace maybe {
|
||||||
|
|
||||||
OPTIONAL_MUTABLE_CONSTEXPR T&& ok_value() &&
|
OPTIONAL_MUTABLE_CONSTEXPR T&& ok_value() &&
|
||||||
{
|
{
|
||||||
return var_ok.value();
|
return std::move(var_ok.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -223,7 +223,7 @@ namespace maybe {
|
||||||
|
|
||||||
OPTIONAL_MUTABLE_CONSTEXPR E&& err_value() &&
|
OPTIONAL_MUTABLE_CONSTEXPR E&& err_value() &&
|
||||||
{
|
{
|
||||||
return var_err.value();
|
return std::move(var_err.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue