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
ea00fd7f
Commit
ea00fd7f
authored
Mar 06, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reject stream<T> from message handlers
parent
ed2c2bad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
libcaf_core/caf/detail/invoke_result_visitor.hpp
libcaf_core/caf/detail/invoke_result_visitor.hpp
+5
-7
No files found.
libcaf_core/caf/detail/invoke_result_visitor.hpp
View file @
ea00fd7f
...
...
@@ -32,8 +32,9 @@
#include "caf/make_message.hpp"
#include "caf/stream_result.hpp"
#include "caf/detail/int_list.hpp"
#include "caf/detail/apply_args.hpp"
#include "caf/detail/int_list.hpp"
#include "caf/detail/type_traits.hpp"
namespace
caf
{
namespace
detail
{
...
...
@@ -101,6 +102,9 @@ public:
/// Wraps arbitrary values into a `message` and calls the visitor recursively.
template
<
class
...
Ts
>
void
operator
()(
Ts
&
...
xs
)
{
static_assert
(
detail
::
conjunction
<!
detail
::
is_stream
<
Ts
>::
value
...
>::
value
,
"returning a stream<T> from a message handler achieves not "
"what you would expect and is most likely a mistake"
);
auto
tmp
=
make_message
(
std
::
move
(
xs
)...);
(
*
this
)(
tmp
);
}
...
...
@@ -141,12 +145,6 @@ public:
(
*
this
)();
}
/// Calls `(*this)(x.ptr)`.
template
<
class
T
>
void
operator
()(
stream
<
T
>&
x
)
{
(
*
this
)(
x
.
slot
(),
x
.
ptr
());
}
/// Calls `(*this)(x.in(), x.out(), x.ptr())`.
template
<
class
Out
,
class
...
Ts
>
void
operator
()(
output_stream
<
Out
,
Ts
...
>&
x
)
{
...
...
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