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
a83feea0
Commit
a83feea0
authored
Sep 28, 2016
by
Matthias Vallentin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark optional<T>'s move ctor/assignment noexcept
parent
f08bb338
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
libcaf_core/caf/optional.hpp
libcaf_core/caf/optional.hpp
+6
-2
No files found.
libcaf_core/caf/optional.hpp
View file @
a83feea0
...
@@ -59,7 +59,9 @@ class optional {
...
@@ -59,7 +59,9 @@ class optional {
}
}
}
}
optional
(
optional
&&
other
)
:
m_valid
(
false
)
{
optional
(
optional
&&
other
)
noexcept
(
std
::
is_nothrow_move_constructible
<
T
>::
value
)
:
m_valid
(
false
)
{
if
(
other
.
m_valid
)
{
if
(
other
.
m_valid
)
{
cr
(
std
::
move
(
other
.
m_value
));
cr
(
std
::
move
(
other
.
m_value
));
}
}
...
@@ -80,7 +82,9 @@ class optional {
...
@@ -80,7 +82,9 @@ class optional {
return
*
this
;
return
*
this
;
}
}
optional
&
operator
=
(
optional
&&
other
)
{
optional
&
operator
=
(
optional
&&
other
)
noexcept
(
std
::
is_nothrow_destructible
<
T
>::
value
&&
std
::
is_nothrow_move_assignable
<
T
>::
value
)
{
if
(
m_valid
)
{
if
(
m_valid
)
{
if
(
other
.
m_valid
)
m_value
=
std
::
move
(
other
.
m_value
);
if
(
other
.
m_valid
)
m_value
=
std
::
move
(
other
.
m_value
);
else
destroy
();
else
destroy
();
...
...
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