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
a3e322b2
Commit
a3e322b2
authored
Feb 13, 2018
by
Gennadiy Civil
Browse files
cleanup, merges
parent
68e4f076
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
26 deletions
+34
-26
googletest/include/gtest/internal/gtest-filepath.h
googletest/include/gtest/internal/gtest-filepath.h
+1
-1
googletest/include/gtest/internal/gtest-internal.h
googletest/include/gtest/internal/gtest-internal.h
+0
-25
googletest/include/gtest/internal/gtest-port.h
googletest/include/gtest/internal/gtest-port.h
+33
-0
No files found.
googletest/include/gtest/internal/gtest-filepath.h
View file @
a3e322b2
...
...
@@ -191,7 +191,7 @@ class GTEST_API_ FilePath {
void
Normalize
();
// Returns a pointer to the last
i
occur
r
ence of a valid path separator in
// Returns a pointer to the last occurence of a valid path separator in
// the FilePath. On Windows, for example, both '/' and '\' are valid path
// separators. Returns NULL if no path separator was found.
const
char
*
FindLastPathSeparator
()
const
;
...
...
googletest/include/gtest/internal/gtest-internal.h
View file @
a3e322b2
...
...
@@ -803,31 +803,6 @@ struct RemoveConst<T[N]> {
#define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \
GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T))
// Adds reference to a type if it is not a reference type,
// otherwise leaves it unchanged. This is the same as
// tr1::add_reference, which is not widely available yet.
template
<
typename
T
>
struct
AddReference
{
typedef
T
&
type
;
};
// NOLINT
template
<
typename
T
>
struct
AddReference
<
T
&>
{
typedef
T
&
type
;
};
// NOLINT
// A handy wrapper around AddReference that works when the argument T
// depends on template parameters.
#define GTEST_ADD_REFERENCE_(T) \
typename ::testing::internal::AddReference<T>::type
// Adds a reference to const on top of T as necessary. For example,
// it transforms
//
// char ==> const char&
// const char ==> const char&
// char& ==> const char&
// const char& ==> const char&
//
// The argument T must depend on some template parameters.
#define GTEST_REFERENCE_TO_CONST_(T) \
GTEST_ADD_REFERENCE_(const GTEST_REMOVE_REFERENCE_(T))
// ImplicitlyConvertible<From, To>::value is a compile-time bool
// constant that's true iff type From can be implicitly converted to
// type To.
...
...
googletest/include/gtest/internal/gtest-port.h
View file @
a3e322b2
...
...
@@ -1366,6 +1366,39 @@ inline void FlushInfoLog() { fflush(NULL); }
GTEST_LOG_(FATAL) << #posix_call << "failed with error " \
<< gtest_error
// Adds reference to a type if it is not a reference type,
// otherwise leaves it unchanged. This is the same as
// tr1::add_reference, which is not widely available yet.
template
<
typename
T
>
struct
AddReference
{
typedef
T
&
type
;
};
// NOLINT
template
<
typename
T
>
struct
AddReference
<
T
&>
{
typedef
T
&
type
;
};
// NOLINT
// A handy wrapper around AddReference that works when the argument T
// depends on template parameters.
#define GTEST_ADD_REFERENCE_(T) \
typename ::testing::internal::AddReference<T>::type
// Transforms "T" into "const T&" according to standard reference collapsing
// rules (this is only needed as a backport for C++98 compilers that do not
// support reference collapsing). Specifically, it transforms:
//
// char ==> const char&
// const char ==> const char&
// char& ==> char&
// const char& ==> const char&
//
// Note that the non-const reference will not have "const" added. This is
// standard, and necessary so that "T" can always bind to "const T&".
template
<
typename
T
>
struct
ConstRef
{
typedef
const
T
&
type
;
};
template
<
typename
T
>
struct
ConstRef
<
T
&>
{
typedef
T
&
type
;
};
// The argument T must depend on some template parameters.
#define GTEST_REFERENCE_TO_CONST_(T) \
typename ::testing::internal::ConstRef<T>::type
#if GTEST_HAS_STD_MOVE_
using
std
::
forward
;
using
std
::
move
;
...
...
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