5#ifndef MP_PROXY_TYPE_CHRONO_H
6#define MP_PROXY_TYPE_CHRONO_H
15template <
class Rep,
class Period,
typename Value,
typename Output>
19 static_assert(std::numeric_limits<
decltype(output.get())>::lowest() <= std::numeric_limits<Rep>::lowest(),
20 "capnp type does not have enough range to hold lowest std::chrono::duration value");
21 static_assert(std::numeric_limits<
decltype(output.get())>::max() >= std::numeric_limits<Rep>::max(),
22 "capnp type does not have enough range to hold highest std::chrono::duration value");
23 output.set(value.count());
26template <
class Rep,
class Period,
typename Input,
typename ReadDest>
28 Input&& input, ReadDest&& read_dest)
30 return read_dest.construct(input.get());
Functions to serialize / deserialize common bitcoin types.
decltype(auto) CustomReadField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Input &&input, ReadDest &&read_dest)
Overload multiprocess library's CustomReadField hook to allow any object with an Unserialize method t...
void CustomBuildField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Value &&value, Output &&output)
Overload multiprocess library's CustomBuildField hook to allow any serializable object to be stored i...
Function parameter type for prioritizing overloaded function calls that would otherwise be ambiguous.
Generic utility functions used by capnp code.