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
bb272534
Commit
bb272534
authored
Sep 17, 2020
by
Abseil Team
Committed by
Gennadiy Rozental
Sep 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Googletest export
Reduce the demangled name bloat of the Action constructor. PiperOrigin-RevId: 332234887
parent
a4ab0abb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
gmock-actions.h
googlemock/include/gmock/gmock-actions.h
+9
-8
No files found.
googlemock/include/gmock/gmock-actions.h
View file @
bb272534
...
...
@@ -449,6 +449,9 @@ class Action {
}
};
template
<
typename
G
>
using
IsCompatibleFunctor
=
std
::
is_constructible
<
std
::
function
<
F
>
,
G
>
;
public
:
typedef
typename
internal
::
Function
<
F
>::
Result
Result
;
typedef
typename
internal
::
Function
<
F
>::
ArgumentTuple
ArgumentTuple
;
...
...
@@ -460,15 +463,13 @@ class Action {
// Construct an Action from a specified callable.
// This cannot take std::function directly, because then Action would not be
// directly constructible from lambda (it would require two conversions).
template
<
typename
G
,
typename
IsCompatibleFunctor
=
::
std
::
is_constructible
<::
std
::
function
<
F
>
,
G
>
,
typename
IsNoArgsFunctor
=
::
std
::
is_constructible
<::
std
::
function
<
Result
()
>
,
G
>
,
typename
=
typename
::
std
::
enable_if
<
internal
::
disjunction
<
IsCompatibleFunctor
,
IsNoArgsFunctor
>::
value
>::
type
>
template
<
typename
G
,
typename
=
typename
std
::
enable_if
<
internal
::
disjunction
<
IsCompatibleFunctor
<
G
>
,
std
::
is_constructible
<
std
::
function
<
Result
()
>
,
G
>>::
value
>::
type
>
Action
(
G
&&
fun
)
{
// NOLINT
Init
(
::
std
::
forward
<
G
>
(
fun
),
IsCompatibleFunctor
());
Init
(
::
std
::
forward
<
G
>
(
fun
),
IsCompatibleFunctor
<
G
>
());
}
// Constructs an Action from its implementation.
...
...
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