6#include <bond/core/config.h>
9#include "detail/tuple_fields.h"
18template <
typename ...T>
19struct schema<
std::tuple<T...>>
24 typedef typename detail::tuple_fields<std::tuple<T...>, 0, T...>::type fields;
26 static const Metadata metadata;
34 static Metadata GetMetadata()
36 Metadata m = reflection::MetadataInit(
37 "tuple",
"bond.tuple", reflection::Attributes());
41 boost::mpl::for_each<
typename detail::param_list<T...>::type>(
42 detail::TypeListBuilder(params));
44 m.name +=
"<" + params +
">";
45 m.qualified_name +=
"<" + params +
">";
53template <
typename... T>
54const Metadata schema<std::tuple<T...>>::type::metadata
55 = schema<std::tuple<T...>>::type::GetMetadata();
58template <
typename Protocols = BuiltInProtocols,
typename Writer,
typename... T>
59inline void Pack(Writer& writer, T&&... args)
61 Serialize<Protocols>(std::forward_as_tuple(args...), writer);
65template <
typename Protocols = BuiltInProtocols,
typename Reader,
typename... T>
66inline void Unpack(Reader reader, T&... arg)
68 auto pack = std::tie(arg...);
69 Deserialize<Protocols>(reader, pack);
namespace bond
Definition: apply.h:17