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
aa0ff417
Commit
aa0ff417
authored
Jun 18, 2013
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed forwarding of become() args
parent
1823f1c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
cppa/cppa.hpp
cppa/cppa.hpp
+8
-3
cppa/local_actor.hpp
cppa/local_actor.hpp
+6
-0
No files found.
cppa/cppa.hpp
View file @
aa0ff417
...
...
@@ -679,9 +679,14 @@ inline void send_exit(actor_ptr whom, std::uint32_t reason) {
* unless {@link keep_behavior} is given as first argument.
*/
template
<
typename
T
,
typename
...
Ts
>
inline
void
become
(
T
arg
,
Ts
&&
...
args
)
{
self
->
do_become
(
match_expr_convert
(
arg
,
std
::
forward
<
Ts
>
(
args
)...),
true
);
//become(std::forward<Ts>(args)...);
inline
typename
std
::
enable_if
<
!
is_behavior_policy
<
typename
util
::
rm_const_and_ref
<
T
>::
type
>::
value
,
void
>::
type
become
(
T
&&
arg
,
Ts
&&
...
args
)
{
self
->
do_become
(
match_expr_convert
(
std
::
forward
<
T
>
(
arg
),
std
::
forward
<
Ts
>
(
args
)...),
true
);
}
template
<
bool
Discard
,
typename
...
Ts
>
...
...
cppa/local_actor.hpp
View file @
aa0ff417
...
...
@@ -65,6 +65,12 @@ class sync_handle_helper;
template
<
bool
DiscardBehavior
>
struct
behavior_policy
{
static
constexpr
bool
discard_old
=
DiscardBehavior
;
};
template
<
typename
T
>
struct
is_behavior_policy
:
std
::
false_type
{
};
template
<
bool
DiscardBehavior
>
struct
is_behavior_policy
<
behavior_policy
<
DiscardBehavior
>>
:
std
::
true_type
{
};
typedef
behavior_policy
<
false
>
keep_behavior_t
;
typedef
behavior_policy
<
true
>
discard_behavior_t
;
...
...
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