Commit 83714ced authored by Dominik Charousset's avatar Dominik Charousset

added rvalue overload for receive_loop

parent fbad4957
...@@ -129,8 +129,10 @@ void receive(Arg0&& arg0, Args&&... args) { ...@@ -129,8 +129,10 @@ void receive(Arg0&& arg0, Args&&... args) {
} }
void receive_loop(behavior& rules); void receive_loop(behavior& rules);
void receive_loop(behavior&& rules);
void receive_loop(partial_function& rules); void receive_loop(partial_function& rules);
void receive_loop(partial_function&& rules);
template<typename Arg0, typename... Args> template<typename Arg0, typename... Args>
void receive_loop(Arg0&& arg0, Args&&... args) { void receive_loop(Arg0&& arg0, Args&&... args) {
......
...@@ -39,6 +39,11 @@ void receive_loop(behavior& rules) { ...@@ -39,6 +39,11 @@ void receive_loop(behavior& rules) {
} }
} }
void receive_loop(behavior&& rules) {
behavior tmp(std::move(rules));
receive_loop(tmp);
}
void receive_loop(partial_function& rules) { void receive_loop(partial_function& rules) {
local_actor* sptr = self; local_actor* sptr = self;
for (;;) { for (;;) {
...@@ -46,4 +51,10 @@ void receive_loop(partial_function& rules) { ...@@ -46,4 +51,10 @@ void receive_loop(partial_function& rules) {
} }
} }
void receive_loop(partial_function&& rules) {
partial_function tmp(std::move(rules));
receive_loop(tmp);
}
} // namespace cppa } // namespace cppa
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment