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
11471da7
Commit
11471da7
authored
Aug 13, 2019
by
Krystian Kuzniarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove a custom implementation of std::enable_if
parent
90a443f9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
13 deletions
+8
-13
gtest-matchers.h
googletest/include/gtest/gtest-matchers.h
+7
-5
gtest.h
googletest/include/gtest/gtest.h
+1
-1
gtest-internal.h
googletest/include/gtest/internal/gtest-internal.h
+0
-7
No files found.
googletest/include/gtest/gtest-matchers.h
View file @
11471da7
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
#include <memory>
#include <memory>
#include <ostream>
#include <ostream>
#include <string>
#include <string>
#include <type_traits>
#include "gtest/gtest-printers.h"
#include "gtest/gtest-printers.h"
#include "gtest/internal/gtest-internal.h"
#include "gtest/internal/gtest-internal.h"
...
@@ -299,8 +300,8 @@ class MatcherBase {
...
@@ -299,8 +300,8 @@ class MatcherBase {
template
<
typename
U
>
template
<
typename
U
>
explicit
MatcherBase
(
explicit
MatcherBase
(
const
MatcherInterface
<
U
>*
impl
,
const
MatcherInterface
<
U
>*
impl
,
typename
internal
::
EnableIf
<
typename
std
::
enable_if
<!
internal
::
IsSame
<
U
,
const
U
&>::
value
>::
type
*
=
!
internal
::
IsSame
<
U
,
const
U
&>::
value
>::
type
*
=
nullptr
)
nullptr
)
:
impl_
(
new
internal
::
MatcherInterfaceAdapter
<
U
>
(
impl
))
{}
:
impl_
(
new
internal
::
MatcherInterfaceAdapter
<
U
>
(
impl
))
{}
MatcherBase
(
const
MatcherBase
&
)
=
default
;
MatcherBase
(
const
MatcherBase
&
)
=
default
;
...
@@ -333,9 +334,10 @@ class Matcher : public internal::MatcherBase<T> {
...
@@ -333,9 +334,10 @@ class Matcher : public internal::MatcherBase<T> {
:
internal
::
MatcherBase
<
T
>
(
impl
)
{}
:
internal
::
MatcherBase
<
T
>
(
impl
)
{}
template
<
typename
U
>
template
<
typename
U
>
explicit
Matcher
(
const
MatcherInterface
<
U
>*
impl
,
explicit
Matcher
(
typename
internal
::
EnableIf
<
const
MatcherInterface
<
U
>*
impl
,
!
internal
::
IsSame
<
U
,
const
U
&>::
value
>::
type
*
=
nullptr
)
typename
std
::
enable_if
<!
internal
::
IsSame
<
U
,
const
U
&>::
value
>::
type
*
=
nullptr
)
:
internal
::
MatcherBase
<
T
>
(
impl
)
{}
:
internal
::
MatcherBase
<
T
>
(
impl
)
{}
// Implicit constructor here allows people to write
// Implicit constructor here allows people to write
...
...
googletest/include/gtest/gtest.h
View file @
11471da7
...
@@ -292,7 +292,7 @@ class GTEST_API_ AssertionResult {
...
@@ -292,7 +292,7 @@ class GTEST_API_ AssertionResult {
template
<
typename
T
>
template
<
typename
T
>
explicit
AssertionResult
(
explicit
AssertionResult
(
const
T
&
success
,
const
T
&
success
,
typename
internal
::
EnableI
f
<
typename
std
::
enable_i
f
<
!
std
::
is_convertible
<
T
,
AssertionResult
>::
value
>::
type
*
!
std
::
is_convertible
<
T
,
AssertionResult
>::
value
>::
type
*
/*enabler*/
/*enabler*/
=
nullptr
)
=
nullptr
)
...
...
googletest/include/gtest/internal/gtest-internal.h
View file @
11471da7
...
@@ -991,13 +991,6 @@ struct IsRecursiveContainerImpl<C, true> {
...
@@ -991,13 +991,6 @@ struct IsRecursiveContainerImpl<C, true> {
template
<
typename
C
>
template
<
typename
C
>
struct
IsRecursiveContainer
:
public
IsRecursiveContainerImpl
<
C
>::
type
{};
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.
// Utilities for native arrays.
// ArrayEq() compares two k-dimensional native arrays using the
// 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