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
b1c623b5
Commit
b1c623b5
authored
Nov 14, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert breaking change
parent
ddef551c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
libcaf_core/caf/actor_traits.hpp
libcaf_core/caf/actor_traits.hpp
+22
-11
No files found.
libcaf_core/caf/actor_traits.hpp
View file @
b1c623b5
...
...
@@ -22,6 +22,16 @@
#include "caf/fwd.hpp"
namespace
caf
{
namespace
mixin
{
// TODO: legacy API. Deprecate with 0.18, remove with 0.19.
template
<
class
T
>
struct
is_blocking_requester
:
std
::
false_type
{};
}
// namespace mixin
}
// namespace caf
namespace
caf
{
// Note: having marker types for blocking and non-blocking may seem redundant,
...
...
@@ -65,26 +75,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_v
<
dynamically_typed_actor_base
,
T
>
;
/// 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_v
<
statically_typed_actor_base
,
T
>
;
/// 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_v
<
blocking_actor_base
,
T
>
//
||
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_v
<
non_blocking_actor_base
,
T
>
;
/// 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