Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
71271d2c
Commit
71271d2c
authored
Nov 17, 2014
by
kosak
Browse files
Call move() by qualified name (::testing::internal::move() or just internal::move()).
parent
d3d142ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
include/gtest/internal/gtest-port.h
include/gtest/internal/gtest-port.h
+2
-2
No files found.
include/gtest/internal/gtest-port.h
View file @
71271d2c
...
@@ -1319,7 +1319,7 @@ inline void FlushInfoLog() { fflush(NULL); }
...
@@ -1319,7 +1319,7 @@ inline void FlushInfoLog() { fflush(NULL); }
#if GTEST_HAS_STD_MOVE_
#if GTEST_HAS_STD_MOVE_
using
std
::
move
;
using
std
::
move
;
#else // GTEST_
LANG_CXX11
#else // GTEST_
HAS_STD_MOVE_
template
<
typename
T
>
template
<
typename
T
>
const
T
&
move
(
const
T
&
t
)
{
const
T
&
move
(
const
T
&
t
)
{
return
t
;
return
t
;
...
@@ -1347,7 +1347,7 @@ const T& move(const T& t) {
...
@@ -1347,7 +1347,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
move
(
x
);
}
inline
To
ImplicitCast_
(
To
x
)
{
return
::
testing
::
internal
::
move
(
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment