Fix an instance of move-pessimization.

This commit is contained in:
kosak 2015-07-24 20:12:16 +00:00
parent 794ef030eb
commit 01e229bacf

View File

@ -1334,7 +1334,7 @@ const T& move(const T& t) {
// similar functions users may have (e.g., implicit_cast). The internal // similar functions users may have (e.g., implicit_cast). The internal
// namespace alone is not enough because the function can be found by ADL. // namespace alone is not enough because the function can be found by ADL.
template<typename To> template<typename To>
inline To ImplicitCast_(To x) { return ::testing::internal::move(x); } inline To ImplicitCast_(To x) { return x; }
// When you upcast (that is, cast a pointer from type Foo to type // When you upcast (that is, cast a pointer from type Foo to type
// SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts // SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts