Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
6729a136
Commit
6729a136
authored
Dec 27, 2018
by
Ryohei Machida
Committed by
Gennadiy Civil
Dec 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge #2002
PiperOrigin-RevId: 227030722
parent
77004096
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
22 deletions
+15
-22
gtest-internal.h
googletest/include/gtest/internal/gtest-internal.h
+9
-22
googletest-printers-test.cc
googletest/test/googletest-printers-test.cc
+6
-0
No files found.
googletest/include/gtest/internal/gtest-internal.h
View file @
6729a136
...
@@ -967,37 +967,24 @@ struct IsHashTable {
...
@@ -967,37 +967,24 @@ struct IsHashTable {
template
<
typename
T
>
template
<
typename
T
>
const
bool
IsHashTable
<
T
>::
value
;
const
bool
IsHashTable
<
T
>::
value
;
template
<
typename
T
>
struct
VoidT
{
typedef
void
value_type
;
};
template
<
typename
T
,
typename
=
void
>
struct
HasValueType
:
false_type
{};
template
<
typename
T
>
struct
HasValueType
<
T
,
VoidT
<
typename
T
::
value_type
>
>
:
true_type
{
};
template
<
typename
C
,
template
<
typename
C
,
bool
=
sizeof
(
IsContainerTest
<
C
>
(
0
))
==
sizeof
(
IsContainer
),
bool
=
sizeof
(
IsContainerTest
<
C
>
(
0
))
==
sizeof
(
IsContainer
)
>
bool
=
HasValueType
<
C
>::
value
>
struct
IsRecursiveContainerImpl
;
struct
IsRecursiveContainerImpl
;
template
<
typename
C
,
bool
HV
>
template
<
typename
C
>
struct
IsRecursiveContainerImpl
<
C
,
false
,
HV
>
:
public
false_type
{};
struct
IsRecursiveContainerImpl
<
C
,
false
>
:
public
false_type
{};
// Since the IsRecursiveContainerImpl depends on the IsContainerTest we need to
// Since the IsRecursiveContainerImpl depends on the IsContainerTest we need to
// obey the same inconsistencies as the IsContainerTest, namely check if
// obey the same inconsistencies as the IsContainerTest, namely check if
// something is a container is relying on only const_iterator in C++11 and
// something is a container is relying on only const_iterator in C++11 and
// is relying on both const_iterator and iterator otherwise
// is relying on both const_iterator and iterator otherwise
template
<
typename
C
>
template
<
typename
C
>
struct
IsRecursiveContainerImpl
<
C
,
true
,
false
>
:
public
false_type
{};
struct
IsRecursiveContainerImpl
<
C
,
true
>
{
using
value_type
=
decltype
(
*
std
::
declval
<
typename
C
::
const_iterator
>
());
template
<
typename
C
>
using
type
=
struct
IsRecursiveContainerImpl
<
C
,
true
,
true
>
{
is_same
<
typename
std
::
remove_const
<
typedef
typename
IteratorTraits
<
typename
C
::
const_iterator
>::
value_type
typename
std
::
remove_reference
<
value_type
>::
type
>::
type
,
value_type
;
C
>
;
typedef
is_same
<
value_type
,
C
>
type
;
};
};
// IsRecursiveContainer<Type> is a unary compile-time predicate that
// IsRecursiveContainer<Type> is a unary compile-time predicate that
...
...
googletest/test/googletest-printers-test.cc
View file @
6729a136
...
@@ -183,8 +183,14 @@ class PathLike {
...
@@ -183,8 +183,14 @@ class PathLike {
public
:
public
:
struct
iterator
{
struct
iterator
{
typedef
PathLike
value_type
;
typedef
PathLike
value_type
;
iterator
&
operator
++
();
PathLike
&
operator
*
();
};
};
using
value_type
=
char
;
using
const_iterator
=
iterator
;
PathLike
()
{}
PathLike
()
{}
iterator
begin
()
const
{
return
iterator
();
}
iterator
begin
()
const
{
return
iterator
();
}
...
...
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