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
a0059d78
Commit
a0059d78
authored
Sep 03, 2013
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed handling of 'const' in `to_uniform_name`
parent
40b92b4c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
134 additions
and
39 deletions
+134
-39
cppa/detail/uniform_type_info_map.hpp
cppa/detail/uniform_type_info_map.hpp
+7
-1
src/to_uniform_name.cpp
src/to_uniform_name.cpp
+117
-38
src/uniform_type_info_map.cpp
src/uniform_type_info_map.cpp
+5
-0
unit_testing/test_uniform_type.cpp
unit_testing/test_uniform_type.cpp
+5
-0
No files found.
cppa/detail/uniform_type_info_map.hpp
View file @
a0059d78
...
@@ -94,7 +94,13 @@ constexpr const char* mapped_name() {
...
@@ -94,7 +94,13 @@ constexpr const char* mapped_name() {
return
mapped_type_names
[
util
::
tl_index_of
<
zipped_type_list
,
T
>::
value
][
1
];
return
mapped_type_names
[
util
::
tl_index_of
<
zipped_type_list
,
T
>::
value
][
1
];
}
}
const
char
*
mapped_name_by_decorated_name
(
const
char
*
decorated_type_name
);
const
char
*
mapped_name_by_decorated_name
(
const
char
*
decorated_name
);
std
::
string
mapped_name_by_decorated_name
(
std
::
string
&&
decorated_name
);
inline
const
char
*
mapped_name_by_decorated_name
(
const
std
::
string
&
decorated_name
)
{
return
mapped_name_by_decorated_name
(
decorated_name
.
c_str
());
}
// lookup table for integer types
// lookup table for integer types
extern
const
char
*
mapped_int_names
[][
2
];
extern
const
char
*
mapped_int_names
[][
2
];
...
...
src/to_uniform_name.cpp
View file @
a0059d78
This diff is collapsed.
Click to expand it.
src/uniform_type_info_map.cpp
View file @
a0059d78
...
@@ -123,6 +123,11 @@ const char* mapped_name_by_decorated_name(const char* cstr) {
...
@@ -123,6 +123,11 @@ const char* mapped_name_by_decorated_name(const char* cstr) {
return
cstr
;
return
cstr
;
}
}
std
::
string
mapped_name_by_decorated_name
(
std
::
string
&&
str
)
{
auto
res
=
mapped_name_by_decorated_name
(
str
.
c_str
());
if
(
res
==
str
.
c_str
())
return
std
::
move
(
str
);
return
res
;
}
namespace
{
namespace
{
...
...
unit_testing/test_uniform_type.cpp
View file @
a0059d78
...
@@ -64,6 +64,11 @@ int main() {
...
@@ -64,6 +64,11 @@ int main() {
CPPA_CHECK_EQUAL
(
get
<
foo
>
(
obj1
).
value
,
42
);
CPPA_CHECK_EQUAL
(
get
<
foo
>
(
obj1
).
value
,
42
);
CPPA_CHECK_EQUAL
(
get
<
foo
>
(
obj2
).
value
,
0
);
CPPA_CHECK_EQUAL
(
get
<
foo
>
(
obj2
).
value
,
0
);
}
}
{
auto
uti
=
uniform_typeid
<
atom_value
>
();
CPPA_CHECK
(
uti
!=
nullptr
);
CPPA_CHECK_EQUAL
(
uti
->
name
(),
"@atom"
);
}
// these types (and only those) are present if
// these types (and only those) are present if
// the uniform_type_info implementation is correct
// the uniform_type_info implementation is correct
std
::
set
<
std
::
string
>
expected
=
{
std
::
set
<
std
::
string
>
expected
=
{
...
...
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