diff --git a/googlemock/include/gmock/gmock-generated-function-mockers.h b/googlemock/include/gmock/gmock-generated-function-mockers.h index 5792d3d5..316704ef 100644 --- a/googlemock/include/gmock/gmock-generated-function-mockers.h +++ b/googlemock/include/gmock/gmock-generated-function-mockers.h @@ -1176,7 +1176,7 @@ class MockFunction { #if GTEST_HAS_STD_FUNCTION_ ::std::function AsStdFunction() { return [this](A0 a0) -> R { - return this->Call(::std::move(a0)); + return this->Call(::std::forward(a0)); }; } #endif // GTEST_HAS_STD_FUNCTION_ @@ -1195,7 +1195,7 @@ class MockFunction { #if GTEST_HAS_STD_FUNCTION_ ::std::function AsStdFunction() { return [this](A0 a0, A1 a1) -> R { - return this->Call(::std::move(a0), ::std::move(a1)); + return this->Call(::std::forward(a0), ::std::forward(a1)); }; } #endif // GTEST_HAS_STD_FUNCTION_ @@ -1214,7 +1214,7 @@ class MockFunction { #if GTEST_HAS_STD_FUNCTION_ ::std::function AsStdFunction() { return [this](A0 a0, A1 a1, A2 a2) -> R { - return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2)); + return this->Call(::std::forward(a0), ::std::forward(a1), ::std::forward(a2)); }; } #endif // GTEST_HAS_STD_FUNCTION_ @@ -1233,8 +1233,8 @@ class MockFunction { #if GTEST_HAS_STD_FUNCTION_ ::std::function AsStdFunction() { return [this](A0 a0, A1 a1, A2 a2, A3 a3) -> R { - return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2), - ::std::move(a3)); + return this->Call(::std::forward(a0), ::std::forward(a1), ::std::forward(a2), + ::std::forward(a3)); }; } #endif // GTEST_HAS_STD_FUNCTION_ @@ -1254,8 +1254,8 @@ class MockFunction { #if GTEST_HAS_STD_FUNCTION_ ::std::function AsStdFunction() { return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) -> R { - return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2), - ::std::move(a3), ::std::move(a4)); + return this->Call(::std::forward(a0), ::std::forward(a1), ::std::forward(a2), + ::std::forward(a3), ::std::forward(a4)); }; } #endif // GTEST_HAS_STD_FUNCTION_ @@ -1275,8 +1275,8 @@ class MockFunction { #if GTEST_HAS_STD_FUNCTION_ ::std::function AsStdFunction() { return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -> R { - return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2), - ::std::move(a3), ::std::move(a4), ::std::move(a5)); + return this->Call(::std::forward(a0), ::std::forward(a1), ::std::forward(a2), + ::std::forward(a3), ::std::forward(a4), ::std::forward(a5)); }; } #endif // GTEST_HAS_STD_FUNCTION_ @@ -1296,8 +1296,8 @@ class MockFunction { #if GTEST_HAS_STD_FUNCTION_ ::std::function AsStdFunction() { return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -> R { - return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2), - ::std::move(a3), ::std::move(a4), ::std::move(a5), ::std::move(a6)); + return this->Call(::std::forward(a0), ::std::forward(a1), ::std::forward(a2), + ::std::forward(a3), ::std::forward(a4), ::std::forward(a5), ::std::forward(a6)); }; } #endif // GTEST_HAS_STD_FUNCTION_ @@ -1317,9 +1317,9 @@ class MockFunction { #if GTEST_HAS_STD_FUNCTION_ ::std::function AsStdFunction() { return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -> R { - return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2), - ::std::move(a3), ::std::move(a4), ::std::move(a5), ::std::move(a6), - ::std::move(a7)); + return this->Call(::std::forward(a0), ::std::forward(a1), ::std::forward(a2), + ::std::forward(a3), ::std::forward(a4), ::std::forward(a5), ::std::forward(a6), + ::std::forward(a7)); }; } #endif // GTEST_HAS_STD_FUNCTION_ @@ -1340,9 +1340,9 @@ class MockFunction { ::std::function AsStdFunction() { return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -> R { - return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2), - ::std::move(a3), ::std::move(a4), ::std::move(a5), ::std::move(a6), - ::std::move(a7), ::std::move(a8)); + return this->Call(::std::forward(a0), ::std::forward(a1), ::std::forward(a2), + ::std::forward(a3), ::std::forward(a4), ::std::forward(a5), ::std::forward(a6), + ::std::forward(a7), ::std::forward(a8)); }; } #endif // GTEST_HAS_STD_FUNCTION_ @@ -1364,9 +1364,9 @@ class MockFunction { ::std::function AsStdFunction() { return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -> R { - return this->Call(::std::move(a0), ::std::move(a1), ::std::move(a2), - ::std::move(a3), ::std::move(a4), ::std::move(a5), ::std::move(a6), - ::std::move(a7), ::std::move(a8), ::std::move(a9)); + return this->Call(::std::forward(a0), ::std::forward(a1), ::std::forward(a2), + ::std::forward(a3), ::std::forward(a4), ::std::forward(a5), ::std::forward(a6), + ::std::forward(a7), ::std::forward(a8), ::std::forward(a9)); }; } #endif // GTEST_HAS_STD_FUNCTION_