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
89e7d2cb
Commit
89e7d2cb
authored
Apr 28, 2012
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(on(...) || on(...)) >> ...
parent
a8342ddc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
cppa/on.hpp
cppa/on.hpp
+29
-0
No files found.
cppa/on.hpp
View file @
89e7d2cb
...
@@ -118,6 +118,29 @@ class behavior_rvalue_builder
...
@@ -118,6 +118,29 @@ class behavior_rvalue_builder
struct
rvalue_builder_args_ctor
{
};
struct
rvalue_builder_args_ctor
{
};
template
<
class
Left
,
class
Right
>
struct
disjunct_rvalue_builders
{
Left
m_left
;
Right
m_right
;
public:
disjunct_rvalue_builders
(
Left
l
,
Right
r
)
:
m_left
(
std
::
move
(
l
))
,
m_right
(
std
::
move
(
r
))
{
}
template
<
typename
Expr
>
auto
operator
>>
(
Expr
expr
)
->
decltype
((
*
(
static_cast
<
Left
*>
(
nullptr
))
>>
expr
).
or_else
(
*
(
static_cast
<
Right
*>
(
nullptr
))
>>
expr
))
const
{
return
(
m_left
>>
expr
).
or_else
(
m_right
>>
expr
);
}
};
template
<
class
Guard
,
class
Transformers
,
class
Pattern
>
template
<
class
Guard
,
class
Transformers
,
class
Pattern
>
struct
rvalue_builder
struct
rvalue_builder
{
{
...
@@ -191,6 +214,12 @@ struct rvalue_builder
...
@@ -191,6 +214,12 @@ struct rvalue_builder
std
::
move
(
m_guard
)}};
std
::
move
(
m_guard
)}};
}
}
template
<
class
Other
>
disjunct_rvalue_builders
<
rvalue_builder
,
Other
>
operator
||
(
Other
other
)
const
{
return
{
*
this
,
std
::
move
(
other
)};
}
};
};
template
<
bool
IsCallable
,
typename
T
>
template
<
bool
IsCallable
,
typename
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