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
8b5d6409
Commit
8b5d6409
authored
Mar 05, 2012
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
forced_tuple_cast
parent
7b82c18b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
cppa/tuple_cast.hpp
cppa/tuple_cast.hpp
+15
-0
No files found.
cppa/tuple_cast.hpp
View file @
8b5d6409
...
@@ -89,6 +89,21 @@ auto unsafe_tuple_cast(any_tuple const& tup, pattern<T...> const& p)
...
@@ -89,6 +89,21 @@ auto unsafe_tuple_cast(any_tuple const& tup, pattern<T...> const& p)
return
detail
::
tuple_cast_impl
<
impl
,
tuple_type
,
T
...
>::
unsafe
(
tup
,
p
);
return
detail
::
tuple_cast_impl
<
impl
,
tuple_type
,
T
...
>::
unsafe
(
tup
,
p
);
}
}
// cast using a pattern; does neither perform type checking nor checks values
template
<
typename
...
T
>
auto
forced_tuple_cast
(
any_tuple
const
&
tup
,
pattern
<
T
...
>
const
&
p
)
->
typename
tuple_from_type_list
<
typename
pattern
<
T
...
>::
filtered_types
>::
type
{
typedef
typename
pattern
<
T
...
>::
filtered_types
filtered_types
;
typedef
typename
tuple_from_type_list
<
filtered_types
>::
type
tuple_type
;
static
constexpr
auto
impl
=
get_wildcard_position
<
util
::
type_list
<
T
...
>>
();
return
detail
::
tuple_cast_impl
<
impl
,
tuple_type
,
T
...
>::
force
(
tup
,
p
);
}
}
// namespace cppa
}
// namespace cppa
#endif // TUPLE_CAST_HPP
#endif // TUPLE_CAST_HPP
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