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
3e1f442d
Commit
3e1f442d
authored
Sep 05, 2013
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ostream support for cow_tuples in variant visitor
parent
3d7a0500
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
cppa/optional_variant.hpp
cppa/optional_variant.hpp
+18
-3
No files found.
cppa/optional_variant.hpp
View file @
3e1f442d
...
@@ -406,9 +406,24 @@ struct optional_variant_ostream_helper {
...
@@ -406,9 +406,24 @@ struct optional_variant_ostream_helper {
std
::
ostream
&
lhs
;
std
::
ostream
&
lhs
;
inline
optional_variant_ostream_helper
(
std
::
ostream
&
os
)
:
lhs
(
os
)
{
}
inline
optional_variant_ostream_helper
(
std
::
ostream
&
os
)
:
lhs
(
os
)
{
}
template
<
typename
T
>
template
<
typename
T
>
std
::
ostream
&
operator
()(
const
T
&
value
)
const
{
return
lhs
<<
value
;
}
std
::
ostream
&
operator
()(
const
T
&
value
)
const
{
inline
std
::
ostream
&
operator
()(
const
none_t
&
)
const
{
return
lhs
;
}
return
lhs
<<
value
;
inline
std
::
ostream
&
operator
()()
const
{
return
lhs
;
}
}
inline
std
::
ostream
&
operator
()(
const
none_t
&
)
const
{
return
lhs
<<
"<none>"
;
}
inline
std
::
ostream
&
operator
()()
const
{
return
lhs
<<
"<void>"
;
}
template
<
typename
T0
>
std
::
ostream
&
operator
()(
const
cow_tuple
<
T0
>&
value
)
const
{
return
lhs
<<
get
<
0
>
(
value
);
}
template
<
typename
T0
,
typename
T1
,
typename
...
Ts
>
std
::
ostream
&
operator
()(
const
cow_tuple
<
T0
,
T1
,
Ts
...
>&
value
)
const
{
lhs
<<
get
<
0
>
(
value
)
<<
" "
;
return
(
*
this
)(
value
.
drop_left
());
}
};
};
}
// namespace detail
}
// namespace detail
...
...
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