From b0328d2d3b17398118849f9977a3b44fbfcfe487 Mon Sep 17 00:00:00 2001 From: ecorm Date: Fri, 24 Oct 2014 15:25:27 -0300 Subject: [PATCH] GenericDocument move-assignment now uses std::foward to move-assign the base class. --- include/rapidjson/document.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 73a89fde..f993a672 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -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(rhs))); + ValueType::operator=(std::forward(rhs)); // Calling the destructor here would prematurely call stack_'s destructor Destroy();