mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-18 02:08:09 +08:00
add missing std::move for ctors
This commit is contained in:
@@ -238,12 +238,12 @@ struct result
|
|||||||
{
|
{
|
||||||
if(other.is_ok())
|
if(other.is_ok())
|
||||||
{
|
{
|
||||||
auto tmp = ::new(std::addressof(this->succ)) success_type(other.as_ok());
|
auto tmp = ::new(std::addressof(this->succ)) success_type(std::move(other.as_ok()));
|
||||||
assert(tmp == std::addressof(this->succ));
|
assert(tmp == std::addressof(this->succ));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto tmp = ::new(std::addressof(this->fail)) failure_type(other.as_err());
|
auto tmp = ::new(std::addressof(this->fail)) failure_type(std::move(other.as_err()));
|
||||||
assert(tmp == std::addressof(this->fail));
|
assert(tmp == std::addressof(this->fail));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -267,12 +267,12 @@ struct result
|
|||||||
{
|
{
|
||||||
if(other.is_ok())
|
if(other.is_ok())
|
||||||
{
|
{
|
||||||
auto tmp = ::new(std::addressof(this->succ)) success_type(other.as_ok());
|
auto tmp = ::new(std::addressof(this->succ)) success_type(std::move(other.as_ok()));
|
||||||
assert(tmp == std::addressof(this->succ));
|
assert(tmp == std::addressof(this->succ));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto tmp = ::new(std::addressof(this->fail)) failure_type(other.as_err());
|
auto tmp = ::new(std::addressof(this->fail)) failure_type(std::move(other.as_err()));
|
||||||
assert(tmp == std::addressof(this->fail));
|
assert(tmp == std::addressof(this->fail));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user