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
8a212b66
Unverified
Commit
8a212b66
authored
Nov 16, 2019
by
Dominik Charousset
Committed by
GitHub
Nov 16, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #969
Revert breaking change
parents
9608d557
afcb0a7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
libcaf_core/caf/actor_traits.hpp
libcaf_core/caf/actor_traits.hpp
+20
-11
No files found.
libcaf_core/caf/actor_traits.hpp
View file @
8a212b66
...
...
@@ -22,6 +22,14 @@
#include "caf/fwd.hpp"
namespace
caf
::
mixin
{
// TODO: legacy API. Deprecate with 0.18, remove with 0.19.
template
<
class
T
>
struct
is_blocking_requester
:
std
::
false_type
{};
}
// namespace caf::mixin
namespace
caf
{
// Note: having marker types for blocking and non-blocking may seem redundant,
...
...
@@ -65,26 +73,27 @@ struct default_actor_traits {
template
<
class
T
>
struct
default_actor_traits
<
T
,
true
>
{
/// Denotes whether `T` is dynamically typed.
static
constexpr
bool
is_dynamically_typed
=
//
std
::
is_base_of
<
dynamically_typed_actor_base
,
T
>::
value
;
static
constexpr
bool
is_dynamically_typed
=
std
::
is_base_of
<
dynamically_typed_actor_base
,
T
>::
value
;
/// Denotes whether `T` is statically typed.
static
constexpr
bool
is_statically_typed
=
//
std
::
is_base_of
<
statically_typed_actor_base
,
T
>::
value
;
static
constexpr
bool
is_statically_typed
=
std
::
is_base_of
<
statically_typed_actor_base
,
T
>::
value
;
/// Denotes whether `T` is a blocking actor type.
static
constexpr
bool
is_blocking
=
//
std
::
is_base_of
<
blocking_actor_base
,
T
>::
value
;
static
constexpr
bool
is_blocking
=
std
::
is_base_of
<
blocking_actor_base
,
T
>::
value
||
mixin
::
is_blocking_requester
<
T
>::
value
;
/// Denotes whether `T` is a non-blocking actor type.
static
constexpr
bool
is_non_blocking
=
//
std
::
is_base_of
<
non_blocking_actor_base
,
T
>::
value
;
static
constexpr
bool
is_non_blocking
=
std
::
is_base_of
<
non_blocking_actor_base
,
T
>::
value
;
/// Denotes whether `T` is an incomplete actor type that misses one or more
/// markers.
static
constexpr
bool
is_incomplete
=
//
(
!
is_dynamically_typed
&&
!
is_statically_typed
)
||
(
!
is_blocking
&&
!
is_non_blocking
);
static
constexpr
bool
is_incomplete
=
(
!
is_dynamically_typed
&&
!
is_statically_typed
)
||
(
!
is_blocking
&&
!
is_non_blocking
);
static_assert
(
!
is_dynamically_typed
||
!
is_statically_typed
,
"an actor cannot be both statically and dynamically typed"
);
...
...
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