diff options
author | Jerry Turcios <jerryturcios08@gmail.com> | 2018-10-19 23:13:06 -0400 |
---|---|---|
committer | Jerry Turcios <jerryturcios08@gmail.com> | 2018-10-19 23:13:06 -0400 |
commit | 648ac832aa92b9e2f314db47131990eb49a54245 (patch) | |
tree | 5eb4bd8ab46975936e0a4487db41eb249fc49261 /googlemock/include/gmock/gmock-actions.h | |
parent | 9424e7b0d2c8cf938c4a824e75b6fdea8cd2c687 (diff) | |
parent | f410177a8b54705bb5efaa7be4ef322153349187 (diff) | |
download | googletest-648ac832aa92b9e2f314db47131990eb49a54245.tar.gz googletest-648ac832aa92b9e2f314db47131990eb49a54245.tar.bz2 googletest-648ac832aa92b9e2f314db47131990eb49a54245.zip |
Merge branch 'master' of https://github.com/google/googletest
Diffstat (limited to 'googlemock/include/gmock/gmock-actions.h')
-rw-r--r-- | googlemock/include/gmock/gmock-actions.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h index 8e7e0e7b..d4af9490 100644 --- a/googlemock/include/gmock/gmock-actions.h +++ b/googlemock/include/gmock/gmock-actions.h @@ -43,6 +43,7 @@ #include <algorithm> #include <string> +#include <utility> #include "gmock/internal/gmock-internal-utils.h" #include "gmock/internal/gmock-port.h" @@ -527,7 +528,7 @@ class ActionAdaptor : public ActionInterface<F1> { // on return. Useful for move-only types, but could be used on any type. template <typename T> struct ByMoveWrapper { - explicit ByMoveWrapper(T value) : payload(internal::move(value)) {} + explicit ByMoveWrapper(T value) : payload(std::move(value)) {} T payload; }; @@ -564,7 +565,7 @@ class ReturnAction { // Constructs a ReturnAction object from the value to be returned. // 'value' is passed by value instead of by const reference in order // to allow Return("string literal") to compile. - explicit ReturnAction(R value) : value_(new R(internal::move(value))) {} + explicit ReturnAction(R value) : value_(new R(std::move(value))) {} // This template type conversion operator allows Return(x) to be // used in ANY function that returns x's type. @@ -632,7 +633,7 @@ class ReturnAction { GTEST_CHECK_(!performed_) << "A ByMove() action should only be performed once."; performed_ = true; - return internal::move(wrapper_->payload); + return std::move(wrapper_->payload); } private: @@ -1116,7 +1117,7 @@ Action<To>::Action(const Action<From>& from) // will trigger a compiler error about using array as initializer. template <typename R> internal::ReturnAction<R> Return(R value) { - return internal::ReturnAction<R>(internal::move(value)); + return internal::ReturnAction<R>(std::move(value)); } // Creates an action that returns NULL. @@ -1149,7 +1150,7 @@ inline internal::ReturnRefOfCopyAction<R> ReturnRefOfCopy(const R& x) { // invariant. template <typename R> internal::ByMoveWrapper<R> ByMove(R x) { - return internal::ByMoveWrapper<R>(internal::move(x)); + return internal::ByMoveWrapper<R>(std::move(x)); } // Creates an action that does the default action for the give mock function. |