X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/26ade07ab0e62b98b452fbbd18edba0450035e35..03b35a9a1bd1f583e32b27d260b223a0989d6c75:/rpc/marshall.h diff --git a/rpc/marshall.h b/rpc/marshall.h index 8592e4b..08b6aaa 100644 --- a/rpc/marshall.h +++ b/rpc/marshall.h @@ -122,7 +122,7 @@ tuple_marshall_imp(marshall & m, tuple & t, tuple_indices) // to be evaluated in order. Order matters because the elements must be // serialized consistently! The empty struct resulting from construction // is discarded. - (void)pass{(m << get(t))...}; + (void)pass{(m << std::get(t))...}; return m; } @@ -133,7 +133,7 @@ operator<<(marshall & m, tuple && t) { template inline unmarshall & tuple_unmarshall_imp(unmarshall & u, tuple t, tuple_indices) { - (void)pass{(u >> get(t))...}; + (void)pass{(u >> std::get(t))...}; return u; } @@ -182,22 +182,22 @@ operator>>(unmarshall & u, A & x) { // std::pair template inline marshall & -operator<<(marshall & m, const pair & d) { +operator<<(marshall & m, const std::pair & d) { return m << d.first << d.second; } template inline unmarshall & -operator>>(unmarshall & u, pair & d) { +operator>>(unmarshall & u, std::pair & d) { return u >> d.first >> d.second; } // std::map template inline unmarshall & -operator>>(unmarshall & u, map & x) { +operator>>(unmarshall & u, std::map & x) { uint32_t n = u._grab(); x.clear(); while (n--) - x.emplace(u._grab>()); + x.emplace(u._grab>()); return u; } @@ -221,12 +221,12 @@ inline unmarshall & operator>>(unmarshall & u, string & s) { // Marshalling for strongly-typed enums // -template typename enable_if::value, marshall>::type & +template typename enable_if::value, marshall>::type & operator<<(marshall & m, E e) { return m << from_enum(e); } -template typename enable_if::value, unmarshall>::type & +template typename enable_if::value, unmarshall>::type & operator>>(unmarshall & u, E & e) { e = to_enum(u._grab>()); return u;