23 char *c = (
char*) malloc(ts.bytes_size());
25 auto ts2 = from_bytes<TestSerialization>(&dsm,c);
27 assert(ts.a == ts2->a);
28 assert(ts.b == ts2->b);
35 auto foo2 = from_bytes<int>(&dsm,c);
#define DEFAULT_SERIALIZATION_SUPPORT(CLASS_NAME, CLASS_MEMBERS...)
THIS (below) is the only user-facing macro in this file.
A non-POD type which wishes to mark itself byte representable should extend this class.
auto bytes_size(const T &)
Just calls sizeof(T)
The manager for any RemoteDeserializationContexts.
TestSerialization(int a, long b)
std::size_t to_bytes(const ByteRepresentable &b, char *v)
calls b.to_bytes(v) when b is a ByteRepresentable; calls std::memcpy() when b is POD.