GenericDocument move-assignment now uses std::foward to move-assign the base class.

This commit is contained in:
ecorm 2014-10-24 15:25:27 -03:00
parent 20a9cd2810
commit b0328d2d3b

View File

@ -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();