projects
/
invirt/third/libt4.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-ups and fixes to compile with more warnings enabled and with g++.
[invirt/third/libt4.git]
/
rpc
/
marshall_wrap.h
diff --git
a/rpc/marshall_wrap.h
b/rpc/marshall_wrap.h
index
8e10a75
..
4ba7a20
100644
(file)
--- a/
rpc/marshall_wrap.h
+++ b/
rpc/marshall_wrap.h
@@
-3,7
+3,7
@@
#include "marshall.h"
#include "marshall.h"
-typedef function<int(unmarshall &, marshall &)> handler;
+typedef function<rpc_protocol::status(unmarshall &&, marshall &)> handler;
//
// Automatic marshalling wrappers for RPC handlers
//
// Automatic marshalling wrappers for RPC handlers
@@
-43,7
+43,7
@@
struct VerifyOnFailure {
// One for function pointers...
template <class F, class R, class RV, class args_type, size_t... Indices>
// One for function pointers...
template <class F, class R, class RV, class args_type, size_t... Indices>
-typename enable_if<!is_member_function_pointer<F>::value, RV>::type
+typename enable_if<!is_member_function_pointer<F>::value, RV>::type inline
invoke(RV, F f, void *, R & r, args_type & t, tuple_indices<Indices...>) {
return f(r, move(get<Indices>(t))...);
}
invoke(RV, F f, void *, R & r, args_type & t, tuple_indices<Indices...>) {
return f(r, move(get<Indices>(t))...);
}
@@
-51,7
+51,7
@@
invoke(RV, F f, void *, R & r, args_type & t, tuple_indices<Indices...>) {
// And one for pointers to member functions...
template <class F, class C, class RV, class R, class args_type, size_t... Indices>
// And one for pointers to member functions...
template <class F, class C, class RV, class R, class args_type, size_t... Indices>
-typename enable_if<is_member_function_pointer<F>::value, RV>::type
+typename enable_if<is_member_function_pointer<F>::value, RV>::type inline
invoke(RV, F f, C *c, R & r, args_type & t, tuple_indices<Indices...>) {
return (c->*f)(r, move(get<Indices>(t))...);
}
invoke(RV, F f, C *c, R & r, args_type & t, tuple_indices<Indices...>) {
return (c->*f)(r, move(get<Indices>(t))...);
}
@@
-71,7
+71,7
@@
template <class Functor, class Instance, class Signature,
// between various types of callable objects at this level of abstraction.
template <class F, class C, class ErrorHandler, class R, class RV, class... Args>
// between various types of callable objects at this level of abstraction.
template <class F, class C, class ErrorHandler, class R, class RV, class... Args>
-struct marshalled_func_imp<F, C, RV(R&, Args...), ErrorHandler> {
+struct marshalled_func_imp<F, C, RV(R &, Args...), ErrorHandler> {
static inline handler *wrap(F f, C *c=nullptr) {
// This type definition corresponds to an empty struct with
// template parameters running from 0 up to (# args) - 1.
static inline handler *wrap(F f, C *c=nullptr) {
// This type definition corresponds to an empty struct with
// template parameters running from 0 up to (# args) - 1.
@@
-82,7
+82,7
@@
struct marshalled_func_imp<F, C, RV(R&, Args...), ErrorHandler> {
using ArgsStorage = tuple<typename decay<Args>::type...>;
// Allocate a handler (i.e. function) to hold the lambda
// which will unmarshall RPCs and call f.
using ArgsStorage = tuple<typename decay<Args>::type...>;
// Allocate a handler (i.e. function) to hold the lambda
// which will unmarshall RPCs and call f.
- return new handler([=](unmarshall &u, marshall &m) -> RV {
+ return new handler([=](unmarshall && u, marshall & m) -> RV {
// Unmarshall each argument with the correct type and store the
// result in a tuple.
ArgsStorage t{u._grab<typename decay<Args>::type>()...};
// Unmarshall each argument with the correct type and store the
// result in a tuple.
ArgsStorage t{u._grab<typename decay<Args>::type>()...};