summaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock/gmock-actions.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-10-16 19:29:37 (GMT)
committerGennadiy Civil <misterg@google.com>2018-10-18 15:32:16 (GMT)
commit29b47e45cfd0b30f8e7efd93e7ea34c8343012b3 (patch)
tree49018da5c8f0a81eb644dbbfcf0af5ed565b7063 /googlemock/include/gmock/gmock-actions.h
parenta651a4d44e65b749467fa3dddf93819a22f0cc4a (diff)
downloadgoogletest-29b47e45cfd0b30f8e7efd93e7ea34c8343012b3.zip
googletest-29b47e45cfd0b30f8e7efd93e7ea34c8343012b3.tar.gz
googletest-29b47e45cfd0b30f8e7efd93e7ea34c8343012b3.tar.bz2
Googletest export
C++11 code cleanup. PiperOrigin-RevId: 217364243
Diffstat (limited to 'googlemock/include/gmock/gmock-actions.h')
-rw-r--r--googlemock/include/gmock/gmock-actions.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h
index 8e7e0e7..d4af949 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.