aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkosak <kosak@google.com>2014-11-17 01:14:16 +0000
committerkosak <kosak@google.com>2014-11-17 01:14:16 +0000
commitd370f85b0236b9d4ee9be91b4ae812f6bf6bb0dd (patch)
tree3af1f0e40c3951fa8e9a244daab6aeeed6d5f892
parent389bad61e2ebe3e99aaf17cb157f43beeb03ba4d (diff)
downloadgoogletest-d370f85b0236b9d4ee9be91b4ae812f6bf6bb0dd.tar.gz
googletest-d370f85b0236b9d4ee9be91b4ae812f6bf6bb0dd.tar.bz2
googletest-d370f85b0236b9d4ee9be91b4ae812f6bf6bb0dd.zip
Call move() by qualified name (::testing::internal::move() or just internal::move()).
Pull in gtest 696.
-rw-r--r--include/gmock/gmock-actions.h6
-rw-r--r--include/gmock/gmock-spec-builders.h10
2 files changed, 10 insertions, 6 deletions
diff --git a/include/gmock/gmock-actions.h b/include/gmock/gmock-actions.h
index 8b68fc7c..de502048 100644
--- a/include/gmock/gmock-actions.h
+++ b/include/gmock/gmock-actions.h
@@ -463,7 +463,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(move(value)) {}
+ explicit ByMoveWrapper(T value) : payload(internal::move(value)) {}
T payload;
};
@@ -497,7 +497,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(move(value))) {}
+ explicit ReturnAction(R value) : value_(new R(internal::move(value))) {}
// This template type conversion operator allows Return(x) to be
// used in ANY function that returns x's type.
@@ -561,7 +561,7 @@ class ReturnAction {
GTEST_CHECK_(!performed_)
<< "A ByMove() action should only be performed once.";
performed_ = true;
- return move(wrapper_->payload);
+ return internal::move(wrapper_->payload);
}
private:
diff --git a/include/gmock/gmock-spec-builders.h b/include/gmock/gmock-spec-builders.h
index 61e140e4..fed7de66 100644
--- a/include/gmock/gmock-spec-builders.h
+++ b/include/gmock/gmock-spec-builders.h
@@ -1302,12 +1302,14 @@ template <typename T>
class ReferenceOrValueWrapper {
public:
// Constructs a wrapper from the given value/reference.
- explicit ReferenceOrValueWrapper(T value) : value_(move(value)) {}
+ explicit ReferenceOrValueWrapper(T value)
+ : value_(::testing::internal::move(value)) {
+ }
// Unwraps and returns the underlying value/reference, exactly as
// originally passed. The behavior of calling this more than once on
// the same object is unspecified.
- T Unwrap() { return move(value_); }
+ T Unwrap() { return ::testing::internal::move(value_); }
// Provides nondestructive access to the underlying value/reference.
// Always returns a const reference (more precisely,
@@ -1404,7 +1406,9 @@ class ActionResultHolder : public UntypedActionResultHolderBase {
private:
typedef ReferenceOrValueWrapper<T> Wrapper;
- explicit ActionResultHolder(Wrapper result) : result_(move(result)) {}
+ explicit ActionResultHolder(Wrapper result)
+ : result_(::testing::internal::move(result)) {
+ }
Wrapper result_;