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
9bf34ace
Commit
9bf34ace
authored
Aug 23, 2019
by
Xiaoyi Zhang
Browse files
Merge pull request #2400 from kuzkry:custom-type-traits-enable_if
PiperOrigin-RevId: 264693952
parents
fb49e6c1
11471da7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
10 deletions
+3
-10
googletest/include/gtest/gtest-matchers.h
googletest/include/gtest/gtest-matchers.h
+2
-2
googletest/include/gtest/gtest.h
googletest/include/gtest/gtest.h
+1
-1
googletest/include/gtest/internal/gtest-internal.h
googletest/include/gtest/internal/gtest-internal.h
+0
-7
No files found.
googletest/include/gtest/gtest-matchers.h
View file @
9bf34ace
...
...
@@ -300,7 +300,7 @@ class MatcherBase {
template
<
typename
U
>
explicit
MatcherBase
(
const
MatcherInterface
<
U
>*
impl
,
typename
internal
::
E
nable
I
f
<!
std
::
is_same
<
U
,
const
U
&>::
value
>::
type
*
=
typename
std
::
e
nable
_i
f
<!
std
::
is_same
<
U
,
const
U
&>::
value
>::
type
*
=
nullptr
)
:
impl_
(
new
internal
::
MatcherInterfaceAdapter
<
U
>
(
impl
))
{}
...
...
@@ -336,7 +336,7 @@ class Matcher : public internal::MatcherBase<T> {
template
<
typename
U
>
explicit
Matcher
(
const
MatcherInterface
<
U
>*
impl
,
typename
internal
::
E
nable
I
f
<!
std
::
is_same
<
U
,
const
U
&>::
value
>::
type
*
=
typename
std
::
e
nable
_i
f
<!
std
::
is_same
<
U
,
const
U
&>::
value
>::
type
*
=
nullptr
)
:
internal
::
MatcherBase
<
T
>
(
impl
)
{}
...
...
googletest/include/gtest/gtest.h
View file @
9bf34ace
...
...
@@ -292,7 +292,7 @@ class GTEST_API_ AssertionResult {
template
<
typename
T
>
explicit
AssertionResult
(
const
T
&
success
,
typename
internal
::
E
nable
I
f
<
typename
std
::
e
nable
_i
f
<
!
std
::
is_convertible
<
T
,
AssertionResult
>::
value
>::
type
*
/*enabler*/
=
nullptr
)
...
...
googletest/include/gtest/internal/gtest-internal.h
View file @
9bf34ace
...
...
@@ -970,13 +970,6 @@ struct IsRecursiveContainerImpl<C, true> {
template
<
typename
C
>
struct
IsRecursiveContainer
:
public
IsRecursiveContainerImpl
<
C
>::
type
{};
// EnableIf<condition>::type is void when 'Cond' is true, and
// undefined when 'Cond' is false. To use SFINAE to make a function
// overload only apply when a particular expression is true, add
// "typename EnableIf<expression>::type* = 0" as the last parameter.
template
<
bool
>
struct
EnableIf
;
template
<
>
struct
EnableIf
<
true
>
{
typedef
void
type
;
};
// NOLINT
// Utilities for native arrays.
// ArrayEq() compares two k-dimensional native arrays using the
...
...
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