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
c6f9dc0a
Commit
c6f9dc0a
authored
Mar 03, 2012
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug in extend_pattern
parent
958b6617
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
cppa/pattern.hpp
cppa/pattern.hpp
+11
-14
No files found.
cppa/pattern.hpp
View file @
c6f9dc0a
...
...
@@ -97,6 +97,9 @@ class pattern
static
constexpr
size_t
size
=
sizeof
...(
Types
);
static
constexpr
wildcard_position
wildcard_pos
=
get_wildcard_position
<
util
::
type_list
<
Types
...
>
>
();
typedef
util
::
type_list
<
Types
...
>
types
;
typedef
typename
util
::
tl_filter_not
<
types
,
is_anything
>::
type
...
...
@@ -181,21 +184,15 @@ template<class ExtendedType, class BasicType>
ExtendedType
*
extend_pattern
(
BasicType
const
*
p
)
{
ExtendedType
*
et
=
new
ExtendedType
;
detail
::
tdata_set
(
et
->
m_data
,
p
->
m_data
);
for
(
size_t
i
=
0
;
i
<
BasicType
::
size
;
++
i
)
if
(
p
->
has_values
())
{
et
->
m_ptrs
[
i
].
first
=
p
->
m_ptrs
[
i
].
first
;
if
(
p
->
m_ptrs
[
i
].
second
!=
nullptr
)
{
et
->
m_ptrs
[
i
].
second
=
et
->
m_data
.
at
(
i
);
}
}
detail
::
tdata_set
(
et
->
m_data
,
p
->
m_data
);
et
->
m_has_values
=
true
;
typedef
typename
ExtendedType
::
types
extended_types
;
typedef
typename
detail
::
static_types_array_from_type_list
<
extended_types
>::
type
tarr
;
auto
&
arr
=
tarr
::
arr
;
for
(
auto
i
=
BasicType
::
size
;
i
<
ExtendedType
::
size
;
++
i
)
{
et
->
m_ptrs
[
i
].
first
=
arr
[
i
];
typename
ExtendedType
::
init_helper
f
(
et
->
m_ptrs
,
arr
);
util
::
static_foreach
<
0
,
BasicType
::
size
>::
_
(
et
->
m_data
,
f
);
}
return
et
;
}
...
...
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