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
53c92ec6
Commit
53c92ec6
authored
Nov 09, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewind atom sytnax sugar due to compiler issues
parent
d729bd2a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
13 deletions
+6
-13
libcaf_core/caf/atom.hpp
libcaf_core/caf/atom.hpp
+4
-11
libcaf_io/src/basp_broker.cpp
libcaf_io/src/basp_broker.cpp
+2
-2
No files found.
libcaf_core/caf/atom.hpp
View file @
53c92ec6
...
...
@@ -38,11 +38,6 @@ enum class atom_value : uint64_t {
/// @relates atom_value
std
::
string
to_string
(
const
atom_value
&
x
);
/// @relates atom_value
constexpr
uint64_t
to_u64
(
atom_value
x
)
{
return
static_cast
<
uint64_t
>
(
x
);
}
atom_value
atom_from_string
(
const
std
::
string
&
x
);
/// Creates an atom from given string literal.
...
...
@@ -63,6 +58,9 @@ struct atom_constant {
constexpr
operator
atom_value
()
const
{
return
V
;
}
static
constexpr
uint64_t
uint_value
()
{
return
static_cast
<
uint64_t
>
(
V
);
}
/// Returns an instance *of this constant* (*not* an `atom_value`).
static
const
atom_constant
value
;
};
...
...
@@ -78,15 +76,10 @@ struct is_atom_constant<atom_constant<X>> {
};
template
<
atom_value
V
>
std
::
string
to_string
(
atom_constant
<
V
>
)
{
std
::
string
to_string
(
const
atom_constant
<
V
>&
)
{
return
to_string
(
V
);
}
template
<
atom_value
V
>
constexpr
uint64_t
to_u64
(
atom_constant
<
V
>
)
{
return
static_cast
<
uint64_t
>
(
V
);
}
template
<
atom_value
V
>
const
atom_constant
<
V
>
atom_constant
<
V
>::
value
=
atom_constant
<
V
>
{};
...
...
libcaf_io/src/basp_broker.cpp
View file @
53c92ec6
...
...
@@ -239,7 +239,7 @@ void basp_broker_state::deliver(const node_id& src_nid, actor_id src_aid,
switch
(
static_cast
<
uint64_t
>
(
msg
.
get_as
<
atom_value
>
(
0
)))
{
default:
break
;
case
to_u64
(
link_atom
:
:
value
)
:
{
case
link_atom
:
:
value
.
uint_value
(
)
:
{
if
(
src_nid
!=
this_node
())
{
CAF_LOG_WARNING
(
"received link message for an other node"
);
return
;
...
...
@@ -258,7 +258,7 @@ void basp_broker_state::deliver(const node_id& src_nid, actor_id src_aid,
static_cast
<
actor_proxy
*>
(
ptr
->
get
())
->
local_link_to
(
src
->
get
());
return
;
}
case
to_u64
(
unlink_atom
:
:
value
)
:
{
case
unlink_atom
:
:
value
.
uint_value
(
)
:
{
if
(
src_nid
!=
this_node
())
{
CAF_LOG_WARNING
(
"received unlink message for an other node"
);
return
;
...
...
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