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
54c7c6e2
Commit
54c7c6e2
authored
Sep 17, 2019
by
Dominik Charousset
Committed by
Dominik Charousset
Sep 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix noexcept warnings
parent
5788c498
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
31 additions
and
25 deletions
+31
-25
libcaf_core/caf/actor_addr.hpp
libcaf_core/caf/actor_addr.hpp
+3
-3
libcaf_core/caf/actor_control_block.hpp
libcaf_core/caf/actor_control_block.hpp
+2
-4
libcaf_core/caf/atom.hpp
libcaf_core/caf/atom.hpp
+1
-2
libcaf_core/caf/group.hpp
libcaf_core/caf/group.hpp
+3
-2
libcaf_core/caf/intrusive/drr_cached_queue.hpp
libcaf_core/caf/intrusive/drr_cached_queue.hpp
+4
-6
libcaf_core/caf/intrusive/drr_queue.hpp
libcaf_core/caf/intrusive/drr_queue.hpp
+3
-3
libcaf_core/caf/intrusive/task_queue.hpp
libcaf_core/caf/intrusive/task_queue.hpp
+1
-1
libcaf_core/caf/intrusive/wdrr_dynamic_multiplexed_queue.hpp
libcaf_core/caf/intrusive/wdrr_dynamic_multiplexed_queue.hpp
+2
-1
libcaf_core/test/composable_behavior.cpp
libcaf_core/test/composable_behavior.cpp
+1
-1
libcaf_core/test/drr_cached_queue.cpp
libcaf_core/test/drr_cached_queue.cpp
+11
-2
No files found.
libcaf_core/caf/actor_addr.hpp
View file @
54c7c6e2
...
...
@@ -161,13 +161,13 @@ inline bool operator!=(std::nullptr_t, const actor_addr& x) {
}
// namespace caf
// allow actor_addr to be used in hash maps
namespace
std
{
template
<
>
struct
hash
<
caf
::
actor_addr
>
{
inline
size_t
operator
()(
const
caf
::
actor_addr
&
ref
)
cons
t
{
size_t
operator
()(
const
caf
::
actor_addr
&
ref
)
const
noexcep
t
{
return
static_cast
<
size_t
>
(
ref
.
id
());
}
};
}
// namespace std
}
// namespace std
libcaf_core/caf/actor_control_block.hpp
View file @
54c7c6e2
...
...
@@ -231,22 +231,20 @@ typename Inspector::result_type inspect(Inspector& f, weak_actor_ptr& x) {
}
// namespace caf
// allow actor pointers to be used in hash maps
namespace
std
{
template
<
>
struct
hash
<
caf
::
strong_actor_ptr
>
{
inline
size_t
operator
()(
const
caf
::
strong_actor_ptr
&
ptr
)
cons
t
{
size_t
operator
()(
const
caf
::
strong_actor_ptr
&
ptr
)
const
noexcep
t
{
return
ptr
?
static_cast
<
size_t
>
(
ptr
->
id
())
:
0
;
}
};
template
<
>
struct
hash
<
caf
::
weak_actor_ptr
>
{
inline
size_t
operator
()(
const
caf
::
weak_actor_ptr
&
ptr
)
cons
t
{
size_t
operator
()(
const
caf
::
weak_actor_ptr
&
ptr
)
const
noexcep
t
{
return
ptr
?
static_cast
<
size_t
>
(
ptr
->
id
())
:
0
;
}
};
}
// namespace std
libcaf_core/caf/atom.hpp
View file @
54c7c6e2
...
...
@@ -203,11 +203,10 @@ namespace std {
template
<
>
struct
hash
<
caf
::
atom_value
>
{
size_t
operator
()(
caf
::
atom_value
x
)
const
{
size_t
operator
()(
caf
::
atom_value
x
)
const
noexcept
{
hash
<
uint64_t
>
f
;
return
f
(
static_cast
<
uint64_t
>
(
x
));
}
};
}
// namespace std
libcaf_core/caf/group.hpp
View file @
54c7c6e2
...
...
@@ -148,12 +148,13 @@ std::string to_string(const group& x);
}
// namespace caf
namespace
std
{
template
<
>
struct
hash
<
caf
::
group
>
{
inline
size_t
operator
()(
const
caf
::
group
&
x
)
cons
t
{
size_t
operator
()(
const
caf
::
group
&
x
)
const
noexcep
t
{
// groups are singleton objects, the address is thus the best possible hash
return
!
x
?
0
:
reinterpret_cast
<
size_t
>
(
x
.
get
());
}
};
}
// namespace std
}
// namespace std
libcaf_core/caf/intrusive/drr_cached_queue.hpp
View file @
54c7c6e2
...
...
@@ -59,21 +59,19 @@ public:
// -- constructors, destructors, and assignment operators -------------------
drr_cached_queue
(
policy_type
p
)
:
list_
(
p
),
deficit_
(
0
),
cache_
(
std
::
move
(
p
))
{
drr_cached_queue
(
policy_type
p
)
noexcept
:
list_
(
p
),
deficit_
(
0
),
cache_
(
std
::
move
(
p
))
{
// nop
}
drr_cached_queue
(
drr_cached_queue
&&
other
)
drr_cached_queue
(
drr_cached_queue
&&
other
)
noexcept
:
list_
(
std
::
move
(
other
.
list_
)),
deficit_
(
other
.
deficit_
),
cache_
(
std
::
move
(
other
.
cache_
))
{
// nop
}
drr_cached_queue
&
operator
=
(
drr_cached_queue
&&
other
)
{
drr_cached_queue
&
operator
=
(
drr_cached_queue
&&
other
)
noexcept
{
list_
=
std
::
move
(
other
.
list_
);
deficit_
=
other
.
deficit_
;
cache_
=
std
::
move
(
other
.
cache_
);
...
...
libcaf_core/caf/intrusive/drr_queue.hpp
View file @
54c7c6e2
...
...
@@ -46,15 +46,15 @@ public:
// -- constructors, destructors, and assignment operators --------------------
drr_queue
(
policy_type
p
)
:
super
(
std
::
move
(
p
)),
deficit_
(
0
)
{
drr_queue
(
policy_type
p
)
noexcept
:
super
(
std
::
move
(
p
)),
deficit_
(
0
)
{
// nop
}
drr_queue
(
drr_queue
&&
other
)
:
super
(
std
::
move
(
other
)),
deficit_
(
0
)
{
drr_queue
(
drr_queue
&&
other
)
noexcept
:
super
(
std
::
move
(
other
)),
deficit_
(
0
)
{
// nop
}
drr_queue
&
operator
=
(
drr_queue
&&
other
)
{
drr_queue
&
operator
=
(
drr_queue
&&
other
)
noexcept
{
super
::
operator
=
(
std
::
move
(
other
));
return
*
this
;
}
...
...
libcaf_core/caf/intrusive/task_queue.hpp
View file @
54c7c6e2
...
...
@@ -62,7 +62,7 @@ public:
// -- constructors, destructors, and assignment operators -------------------
task_queue
(
policy_type
p
)
task_queue
(
policy_type
p
)
noexcept
:
old_last_
(
nullptr
),
new_head_
(
nullptr
),
policy_
(
std
::
move
(
p
))
{
...
...
libcaf_core/caf/intrusive/wdrr_dynamic_multiplexed_queue.hpp
View file @
54c7c6e2
...
...
@@ -52,7 +52,8 @@ public:
using
queue_type
=
typename
queue_map_type
::
mapped_type
;
template
<
class
...
Ps
>
wdrr_dynamic_multiplexed_queue
(
policy_type
p
)
:
policy_
(
p
)
{
wdrr_dynamic_multiplexed_queue
(
policy_type
p
)
noexcept
:
policy_
(
std
::
move
(
p
))
{
// nop
}
...
...
libcaf_core/test/composable_behavior.cpp
View file @
54c7c6e2
...
...
@@ -147,7 +147,7 @@ namespace std {
template
<
>
struct
hash
<
counting_string
>
{
inline
size_t
operator
()(
const
counting_string
&
ref
)
cons
t
{
size_t
operator
()(
const
counting_string
&
ref
)
const
noexcep
t
{
hash
<
string
>
f
;
return
f
(
ref
.
str
());
}
...
...
libcaf_core/test/drr_cached_queue.cpp
View file @
54c7c6e2
...
...
@@ -33,9 +33,15 @@ namespace {
struct
inode
:
singly_linked
<
inode
>
{
int
value
;
inode
(
int
x
=
0
)
:
value
(
x
)
{
inode
(
int
x
=
0
)
noexcept
:
value
(
x
)
{
// nop
}
inode
()
noexcept
:
inode
(
0
)
{
// nop
}
};
std
::
string
to_string
(
const
inode
&
x
)
{
...
...
@@ -53,7 +59,9 @@ struct inode_policy {
using
unique_pointer
=
std
::
unique_ptr
<
mapped_type
,
deleter_type
>
;
static
inline
task_size_type
task_size
(
const
mapped_type
&
)
noexcept
{
inode_policy
()
noexcept
=
default
;
static
task_size_type
task_size
(
const
mapped_type
&
)
noexcept
{
return
1
;
}
};
...
...
@@ -62,6 +70,7 @@ using queue_type = drr_cached_queue<inode_policy>;
struct
fixture
{
inode_policy
policy
;
queue_type
queue
{
policy
};
template
<
class
Queue
>
...
...
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