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
890a2485
Commit
890a2485
authored
Nov 05, 2015
by
Joseph Noir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add conversion constructor
parent
873538b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
libcaf_core/caf/maybe.hpp
libcaf_core/caf/maybe.hpp
+17
-1
No files found.
libcaf_core/caf/maybe.hpp
View file @
890a2485
...
...
@@ -93,13 +93,29 @@ public:
cr_error
(
other
.
error_
);
}
maybe
(
maybe
&&
other
)
:
valid_
(
other
.
valid_
)
{
maybe
(
maybe
&&
other
)
{
if
(
other
.
valid_
)
cr_moved_value
(
other
.
value_
);
else
cr_error
(
std
::
move
(
other
.
error_
));
}
template
<
class
U
>
maybe
(
maybe
<
U
>&&
other
)
{
if
(
other
)
cr_moved_value
(
*
other
);
else
cr_error
(
std
::
move
(
other
.
error
()));
}
template
<
class
U
>
maybe
(
const
maybe
<
U
>&
other
)
{
if
(
other
)
cr_value
(
*
other
);
else
cr_error
(
other
.
error
());
}
~
maybe
()
{
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