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
13a37636
Commit
13a37636
authored
Aug 25, 2011
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed pattern matching bug
parent
437c5bef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
src/uniform_type_info.cpp
src/uniform_type_info.cpp
+11
-1
unit_testing/test__tuple.cpp
unit_testing/test__tuple.cpp
+5
-2
No files found.
src/uniform_type_info.cpp
View file @
13a37636
...
...
@@ -23,6 +23,8 @@
#include "cppa/uniform_type_info.hpp"
#include "cppa/util/void_type.hpp"
#include "cppa/util/enable_if.hpp"
#include "cppa/util/disable_if.hpp"
#include "cppa/detail/demangle.hpp"
#include "cppa/detail/object_array.hpp"
...
...
@@ -565,12 +567,20 @@ class uniform_type_info_map
}
template
<
typename
T
>
inline
void
insert
(
const
std
::
set
<
std
::
string
>&
tnames
)
inline
void
insert
(
const
std
::
set
<
std
::
string
>&
tnames
,
typename
util
::
enable_if
<
std
::
is_integral
<
T
>>::
type
*
=
0
)
{
//insert(new default_uniform_type_info_impl<T>(), tnames);
insert
(
new
int_tinfo
<
T
>
,
tnames
);
}
template
<
typename
T
>
inline
void
insert
(
const
std
::
set
<
std
::
string
>&
tnames
,
typename
util
::
disable_if
<
std
::
is_integral
<
T
>>::
type
*
=
0
)
{
insert
(
new
default_uniform_type_info_impl
<
T
>
(),
tnames
);
}
template
<
typename
T
>
inline
void
insert
()
{
...
...
unit_testing/test__tuple.cpp
View file @
13a37636
...
...
@@ -60,14 +60,17 @@ size_t test__tuple()
tuple
<
int
>
t6
;
// untyped tuples under test
any_tuple
ut0
=
t1
;
tuple
<
int
,
long
,
double
>
t7
;
CPPA_CHECK
((
match
<
int
,
long
,
double
>
(
t7
)));
// tuple views under test
auto
tv0
=
get_view
<
any_type
*
,
float
,
any_type
*
,
int
,
any_type
>
(
t1
);
auto
tv1
=
get_view
<
any_type
*
,
int
,
any_type
*>
(
tv0
);
auto
tv2
=
get_view
<
int
,
any_type
*
,
std
::
string
>
(
t1
);
auto
tv3
=
get_view
<
any_type
*
,
int
,
std
::
string
>
(
t1
);
// any_tuple ut1 = tv0;
CPPA_CHECK
(
get
<
0
>
(
t6
)
==
0
);
CPPA_CHECK
(
get
<
0
>
(
tv2
)
==
get
<
0
>
(
t1
));
CPPA_CHECK
(
get
<
1
>
(
tv2
)
==
get
<
3
>
(
t1
));
...
...
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