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
30a2a543
Commit
30a2a543
authored
Sep 17, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix noexcept warning on GCC
parent
8598816e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
10 deletions
+14
-10
libcaf_core/caf/intrusive/fifo_inbox.hpp
libcaf_core/caf/intrusive/fifo_inbox.hpp
+1
-1
libcaf_core/caf/intrusive/lifo_inbox.hpp
libcaf_core/caf/intrusive/lifo_inbox.hpp
+1
-1
libcaf_core/caf/intrusive/singly_linked.hpp
libcaf_core/caf/intrusive/singly_linked.hpp
+7
-3
libcaf_core/caf/intrusive/task_queue.hpp
libcaf_core/caf/intrusive/task_queue.hpp
+5
-5
No files found.
libcaf_core/caf/intrusive/fifo_inbox.hpp
View file @
30a2a543
...
@@ -160,7 +160,7 @@ public:
...
@@ -160,7 +160,7 @@ public:
/// Closes this inbox and moves all elements to the queue.
/// Closes this inbox and moves all elements to the queue.
/// @warning Call only from the reader (owner).
/// @warning Call only from the reader (owner).
void
close
()
{
void
close
()
{
auto
f
=
[
&
](
pointer
x
)
{
auto
f
=
[
&
](
pointer
x
)
noexcept
{
queue_
.
lifo_append
(
x
);
queue_
.
lifo_append
(
x
);
};
};
inbox_
.
close
(
f
);
inbox_
.
close
(
f
);
...
...
libcaf_core/caf/intrusive/lifo_inbox.hpp
View file @
30a2a543
...
@@ -168,7 +168,7 @@ public:
...
@@ -168,7 +168,7 @@ public:
/// `f` must take ownership of the passed pointer.
/// `f` must take ownership of the passed pointer.
/// @warning Call only from the reader (owner).
/// @warning Call only from the reader (owner).
template
<
class
F
>
template
<
class
F
>
void
close
(
F
&
f
)
noexcept
(
noexcept
(
f
(
std
::
declval
<
pointer
>
())))
{
void
close
(
F
&
f
)
noexcept
{
node_pointer
ptr
=
take_head
(
stack_closed_tag
());
node_pointer
ptr
=
take_head
(
stack_closed_tag
());
while
(
ptr
!=
nullptr
)
{
while
(
ptr
!=
nullptr
)
{
auto
next
=
ptr
->
next
;
auto
next
=
ptr
->
next
;
...
...
libcaf_core/caf/intrusive/singly_linked.hpp
View file @
30a2a543
...
@@ -36,7 +36,11 @@ struct singly_linked {
...
@@ -36,7 +36,11 @@ struct singly_linked {
// -- constructors, destructors, and assignment operators --------------------
// -- constructors, destructors, and assignment operators --------------------
singly_linked
(
node_pointer
n
=
nullptr
)
:
next
(
n
)
{
singly_linked
()
noexcept
:
next
(
nullptr
)
{
// nop
}
explicit
singly_linked
(
node_pointer
n
)
noexcept
:
next
(
n
)
{
// nop
// nop
}
}
...
@@ -48,13 +52,13 @@ struct singly_linked {
...
@@ -48,13 +52,13 @@ struct singly_linked {
/// Casts a node type to its value type.
/// Casts a node type to its value type.
template
<
class
T
>
template
<
class
T
>
T
*
promote
(
singly_linked
<
T
>*
ptr
)
{
T
*
promote
(
singly_linked
<
T
>*
ptr
)
noexcept
{
return
static_cast
<
T
*>
(
ptr
);
return
static_cast
<
T
*>
(
ptr
);
}
}
/// Casts a node type to its value type.
/// Casts a node type to its value type.
template
<
class
T
>
template
<
class
T
>
const
T
*
promote
(
const
singly_linked
<
T
>*
ptr
)
{
const
T
*
promote
(
const
singly_linked
<
T
>*
ptr
)
noexcept
{
return
static_cast
<
const
T
*>
(
ptr
);
return
static_cast
<
const
T
*>
(
ptr
);
}
}
...
...
libcaf_core/caf/intrusive/task_queue.hpp
View file @
30a2a543
...
@@ -69,7 +69,7 @@ public:
...
@@ -69,7 +69,7 @@ public:
init
();
init
();
}
}
task_queue
(
task_queue
&&
other
)
:
task_queue
(
other
.
policy
())
{
task_queue
(
task_queue
&&
other
)
noexcept
:
task_queue
(
other
.
policy
())
{
if
(
other
.
empty
())
{
if
(
other
.
empty
())
{
init
();
init
();
}
else
{
}
else
{
...
@@ -81,7 +81,7 @@ public:
...
@@ -81,7 +81,7 @@ public:
}
}
}
}
task_queue
&
operator
=
(
task_queue
&&
other
)
{
task_queue
&
operator
=
(
task_queue
&&
other
)
noexcept
{
deinit
();
deinit
();
if
(
other
.
empty
())
{
if
(
other
.
empty
())
{
init
();
init
();
...
@@ -261,7 +261,7 @@ public:
...
@@ -261,7 +261,7 @@ public:
/// Transfers all element from `other` to the front of this queue.
/// Transfers all element from `other` to the front of this queue.
template
<
class
Container
>
template
<
class
Container
>
void
prepend
(
Container
&
other
)
{
void
prepend
(
Container
&
other
)
noexcept
{
if
(
other
.
empty
())
if
(
other
.
empty
())
return
;
return
;
if
(
empty
())
{
if
(
empty
())
{
...
@@ -276,7 +276,7 @@ public:
...
@@ -276,7 +276,7 @@ public:
/// Transfers all element from `other` to the back of this queue.
/// Transfers all element from `other` to the back of this queue.
template
<
class
Container
>
template
<
class
Container
>
void
append
(
Container
&
other
)
{
void
append
(
Container
&
other
)
noexcept
{
if
(
other
.
empty
())
if
(
other
.
empty
())
return
;
return
;
if
(
empty
())
{
if
(
empty
())
{
...
@@ -296,7 +296,7 @@ public:
...
@@ -296,7 +296,7 @@ public:
/// @warning leaves the queue in an invalid state until calling
/// @warning leaves the queue in an invalid state until calling
/// `stop_lifo_append`.
/// `stop_lifo_append`.
/// @private
/// @private
void
lifo_append
(
node_pointer
ptr
)
{
void
lifo_append
(
node_pointer
ptr
)
noexcept
{
if
(
old_last_
==
nullptr
)
{
if
(
old_last_
==
nullptr
)
{
old_last_
=
back
();
old_last_
=
back
();
push_back
(
promote
(
ptr
));
push_back
(
promote
(
ptr
));
...
...
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