mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-03-09 11:09:32 +01:00
GenericDocument move-assignment now uses std::foward to move-assign the base class.
This commit is contained in:
parent
20a9cd2810
commit
b0328d2d3b
@ -1655,9 +1655,9 @@ public:
|
||||
//! Move assignment in C++11
|
||||
GenericDocument& operator=(GenericDocument&& rhs) RAPIDJSON_NOEXCEPT
|
||||
{
|
||||
// The static cast is necessary here, because otherwise it would
|
||||
// The cast to ValueType is necessary here, because otherwise it would
|
||||
// attempt to call GenericValue's templated assignment operator.
|
||||
ValueType::operator=(std::move(static_cast<ValueType&&>(rhs)));
|
||||
ValueType::operator=(std::forward<ValueType>(rhs));
|
||||
|
||||
// Calling the destructor here would prematurely call stack_'s destructor
|
||||
Destroy();
|
||||
|
Loading…
x
Reference in New Issue
Block a user