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
e9398439
Commit
e9398439
authored
Nov 19, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue/786'
parents
e3591562
830cea36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
libcaf_core/caf/data_processor.hpp
libcaf_core/caf/data_processor.hpp
+2
-0
libcaf_core/test/serialization.cpp
libcaf_core/test/serialization.cpp
+9
-0
No files found.
libcaf_core/caf/data_processor.hpp
View file @
e9398439
...
@@ -285,6 +285,7 @@ public:
...
@@ -285,6 +285,7 @@ public:
template
<
class
T
>
template
<
class
T
>
error
fill_range
(
T
&
xs
,
size_t
num_elements
)
{
error
fill_range
(
T
&
xs
,
size_t
num_elements
)
{
xs
.
clear
();
auto
insert_iter
=
std
::
inserter
(
xs
,
xs
.
end
());
auto
insert_iter
=
std
::
inserter
(
xs
,
xs
.
end
());
for
(
size_t
i
=
0
;
i
<
num_elements
;
++
i
)
{
for
(
size_t
i
=
0
;
i
<
num_elements
;
++
i
)
{
typename
std
::
remove_const
<
typename
T
::
value_type
>::
type
x
;
typename
std
::
remove_const
<
typename
T
::
value_type
>::
type
x
;
...
@@ -299,6 +300,7 @@ public:
...
@@ -299,6 +300,7 @@ public:
/// Loads elements from type `U` before inserting to `xs`.
/// Loads elements from type `U` before inserting to `xs`.
template
<
class
U
,
class
T
>
template
<
class
U
,
class
T
>
error
fill_range_c
(
T
&
xs
,
size_t
num_elements
)
{
error
fill_range_c
(
T
&
xs
,
size_t
num_elements
)
{
xs
.
clear
();
auto
insert_iter
=
std
::
inserter
(
xs
,
xs
.
end
());
auto
insert_iter
=
std
::
inserter
(
xs
,
xs
.
end
());
for
(
size_t
i
=
0
;
i
<
num_elements
;
++
i
)
{
for
(
size_t
i
=
0
;
i
<
num_elements
;
++
i
)
{
U
x
;
U
x
;
...
...
libcaf_core/test/serialization.cpp
View file @
e9398439
...
@@ -475,6 +475,15 @@ CAF_TEST(long_sequences) {
...
@@ -475,6 +475,15 @@ CAF_TEST(long_sequences) {
CAF_CHECK_EQUAL
(
n
,
m
);
CAF_CHECK_EQUAL
(
n
,
m
);
}
}
CAF_TEST
(
non
-
empty
vector
)
{
CAF_MESSAGE
(
"deserializing into a non-empty vector overrides any content"
);
std
::
vector
<
int
>
foo
{
1
,
2
,
3
};
std
::
vector
<
int
>
bar
{
0
};
auto
buf
=
serialize
(
foo
);
deserialize
(
buf
,
bar
);
CAF_CHECK_EQUAL
(
foo
,
bar
);
}
// -- our vector<bool> serialization packs into an uint64_t. Hence, the
// -- our vector<bool> serialization packs into an uint64_t. Hence, the
// critical sizes to test are 0, 1, 63, 64, and 65.
// critical sizes to test are 0, 1, 63, 64, and 65.
...
...
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