Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
39963a47
Commit
39963a47
authored
Dec 12, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix shadowing warnings
parent
8b45b58f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
libcaf_core/caf/detail/lifted_fun.hpp
libcaf_core/caf/detail/lifted_fun.hpp
+17
-17
unit_testing/test_typed_spawn.cpp
unit_testing/test_typed_spawn.cpp
+4
-4
No files found.
libcaf_core/caf/detail/lifted_fun.hpp
View file @
39963a47
...
...
@@ -82,24 +82,24 @@ class lifted_fun_invoker {
using
arg_types
=
typename
get_callable_trait
<
F
>::
arg_types
;
static
constexpr
size_t
args
=
tl_size
<
arg_types
>::
value
;
static
constexpr
size_t
num_
args
=
tl_size
<
arg_types
>::
value
;
public:
lifted_fun_invoker
(
F
&
fun
)
:
f
(
fun
)
{}
template
<
class
...
Ts
>
typename
std
::
enable_if
<
sizeof
...(
Ts
)
==
args
,
R
>::
type
operator
()(
Ts
&
...
arg
s
)
const
{
if
(
has_none
(
arg
s
...))
return
none
;
return
f
(
unopt
(
arg
s
)...);
typename
std
::
enable_if
<
sizeof
...(
Ts
)
==
num_
args
,
R
>::
type
operator
()(
Ts
&
...
v
s
)
const
{
if
(
has_none
(
v
s
...))
return
none
;
return
f
(
unopt
(
v
s
)...);
}
template
<
class
T
,
class
...
Ts
>
typename
std
::
enable_if
<
(
sizeof
...(
Ts
)
+
1
>
args
),
R
>::
type
operator
()(
T
&
arg
,
Ts
&
...
arg
s
)
const
{
if
(
has_none
(
arg
))
return
none
;
return
(
*
this
)(
arg
s
...);
typename
std
::
enable_if
<
(
sizeof
...(
Ts
)
+
1
>
num_
args
),
R
>::
type
operator
()(
T
&
v
,
Ts
&
...
v
s
)
const
{
if
(
has_none
(
v
))
return
none
;
return
(
*
this
)(
v
s
...);
}
private:
...
...
@@ -113,25 +113,25 @@ class lifted_fun_invoker<bool, F> {
using
arg_types
=
typename
get_callable_trait
<
F
>::
arg_types
;
static
constexpr
size_t
args
=
tl_size
<
arg_types
>::
value
;
static
constexpr
size_t
num_
args
=
tl_size
<
arg_types
>::
value
;
public:
lifted_fun_invoker
(
F
&
fun
)
:
f
(
fun
)
{}
template
<
class
...
Ts
>
typename
std
::
enable_if
<
sizeof
...(
Ts
)
==
args
,
bool
>::
type
operator
()(
Ts
&&
...
arg
s
)
const
{
if
(
has_none
(
arg
s
...))
return
false
;
f
(
unopt
(
arg
s
)...);
typename
std
::
enable_if
<
sizeof
...(
Ts
)
==
num_
args
,
bool
>::
type
operator
()(
Ts
&&
...
v
s
)
const
{
if
(
has_none
(
v
s
...))
return
false
;
f
(
unopt
(
v
s
)...);
return
true
;
}
template
<
class
T
,
class
...
Ts
>
typename
std
::
enable_if
<
(
sizeof
...(
Ts
)
+
1
>
args
),
bool
>::
type
operator
()(
T
&&
arg
,
Ts
&&
...
arg
s
)
const
{
typename
std
::
enable_if
<
(
sizeof
...(
Ts
)
+
1
>
num_
args
),
bool
>::
type
operator
()(
T
&&
arg
,
Ts
&&
...
v
s
)
const
{
if
(
has_none
(
arg
))
return
false
;
return
(
*
this
)(
arg
s
...);
return
(
*
this
)(
v
s
...);
}
private:
...
...
unit_testing/test_typed_spawn.cpp
View file @
39963a47
...
...
@@ -67,11 +67,11 @@ class typed_server3 : public server_type::base {
void
client
(
event_based_actor
*
self
,
actor
parent
,
server_type
serv
)
{
self
->
sync_send
(
serv
,
my_request
{
0
,
0
}).
then
(
[
=
](
bool
val
ue
)
{
CAF_CHECK_EQUAL
(
val
ue
,
true
);
[
=
](
bool
val
1
)
{
CAF_CHECK_EQUAL
(
val
1
,
true
);
self
->
sync_send
(
serv
,
my_request
{
10
,
20
}).
then
(
[
=
](
bool
val
ue
)
{
CAF_CHECK_EQUAL
(
val
ue
,
false
);
[
=
](
bool
val
2
)
{
CAF_CHECK_EQUAL
(
val
2
,
false
);
self
->
send
(
parent
,
atom
(
"passed"
));
}
);
...
...
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