Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thallium
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
sds
thallium
Commits
07eaf7fb
Commit
07eaf7fb
authored
Nov 27, 2017
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made it possible to serialize rvalues
parent
68d43bdb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
include/thallium/serialization/serialize.hpp
include/thallium/serialization/serialize.hpp
+12
-2
test/TestHelloWorld.cpp
test/TestHelloWorld.cpp
+1
-3
No files found.
include/thallium/serialization/serialize.hpp
View file @
07eaf7fb
...
...
@@ -149,10 +149,15 @@ struct saver<A,T,false> {
* Generic save method calling apply on a saver.
*/
template
<
class
A
,
typename
T
>
inline
void
save
(
A
&
ar
,
T
&
&
t
)
{
inline
void
save
(
A
&
ar
,
T
&
t
)
{
saver
<
A
,
T
,
has_save_method
<
A
,
T
>::
value
>::
apply
(
ar
,
std
::
forward
<
T
>
(
t
));
}
template
<
class
A
,
typename
T
>
inline
void
save
(
A
&
ar
,
T
&&
t
)
{
save
(
ar
,
t
);
}
/**
* Loader structure, will provide an apply method that depends
* on the presence of a load function in the provided type.
...
...
@@ -178,10 +183,15 @@ struct loader<A,T,false> {
* Generic load method calling allpy on a loader.
*/
template
<
class
A
,
typename
T
>
inline
void
load
(
A
&
ar
,
T
&
&
t
)
{
inline
void
load
(
A
&
ar
,
T
&
t
)
{
loader
<
A
,
T
,
has_load_method
<
A
,
T
>::
value
>::
apply
(
ar
,
std
::
forward
<
T
>
(
t
));
}
template
<
class
A
,
typename
T
>
inline
void
load
(
A
&
ar
,
T
&&
t
)
{
load
(
ar
,
t
);
}
/**
* Helper function that serializes an arbitrary number of
* objects passed as arguments.
...
...
test/TestHelloWorld.cpp
View file @
07eaf7fb
...
...
@@ -50,9 +50,7 @@ int client() {
auto
server_endpoint
=
margo
.
lookup
(
server_addr
);
std
::
cout
<<
"Lookup done for endpoint "
<<
(
std
::
string
)
server_endpoint
<<
std
::
endl
;
std
::
string
name
(
"Matthieu"
);
remote_hello
.
on
(
server_endpoint
)(
name
);
remote_hello
.
on
(
server_endpoint
)(
std
::
string
(
"Matt"
));
int
ret
=
remote_sum
.
on
(
server_endpoint
)(
23
,
67
);
...
...
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