5#ifndef MP_PROXY_TYPE_PAIR_H
6#define MP_PROXY_TYPE_PAIR_H
12template <
typename KeyLocalType,
typename ValueLocalType,
typename Value,
typename Output>
19 auto pair = output.init();
20 using Accessors =
typename ProxyStruct<
typename decltype(pair)::Builds>::Accessors;
25template <
typename KeyLocalType,
typename ValueLocalType,
typename Input,
typename ReadDest>
32 const auto& pair = input.get();
33 using Accessors =
typename ProxyStruct<
typename Decay<
decltype(pair)>::Reads>::Accessors;
37 KeyLocalType* key =
nullptr;
40 auto&
ret = read_dest.construct(std::piecewise_construct, std::forward_as_tuple(key_args...),
41 std::forward_as_tuple(value_args...));
Functions to serialize / deserialize common bitcoin types.
std::decay_t< T > Decay
Type helper abbreviating std::decay.
void BuildField(TypeList< LocalTypes... >, Context &context, Output &&output, Values &&... values)
decltype(auto) CustomReadField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Input &&input, ReadDest &&read_dest)
Class< Types..., std::remove_reference_t< Args >... > Make(Args &&... args)
decltype(auto) ReadField(TypeList< LocalTypes... >, InvokeContext &invoke_context, Input &&input, Args &&... args)
void CustomBuildField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Value &&value, Output &&output)
Mapping from capnp struct type to struct traits (specializations are generated by proxy-codegen....
Generic utility functions used by capnp code.