10 #ifndef MSGPACK_V1_CPP11_DEFINE_ARRAY_HPP
11 #define MSGPACK_V1_CPP11_DEFINE_ARRAY_HPP
24 template <
typename Tuple, std::
size_t N>
26 template <
typename Packer>
27 static void pack(Packer& pk, Tuple
const& t) {
29 pk.pack(std::get<N-1>(t));
34 if(
size <= N-1) {
return; }
43 template <
typename Tuple>
45 template <
typename Packer>
46 static void pack(Packer& pk, Tuple
const& t) {
47 pk.pack(std::get<0>(t));
51 if(
size <= 0) {
return; }
59 template <
typename... Args>
65 template <
typename Packer>
68 pk.pack_array(
sizeof...(Args));
87 std::tuple<Args&...>
a;
94 template <
typename Packer>
113 return define_array<>();
116 template <
typename... Args>
Definition: object_fwd.hpp:231
Definition: cpp03_zone.hpp:31
void * allocate_align(size_t size, size_t align=MSGPACK_ZONE_ALIGN)
Definition: cpp03_zone.hpp:256
std::enable_if< has_as< T >::value >::type convert_helper(msgpack::object const &o, T &t)
Definition: cpp11_convert_helper.hpp:27
std::size_t size(T const &t)
Definition: size_equal_only.hpp:24
define_array make_define_array()
Definition: cpp03_define_array.hpp:4274
@ ARRAY
Definition: object_fwd_decl.hpp:40
Definition: adaptor_base.hpp:15
void pack(msgpack::packer< Stream > &o, const T &v)
Definition: object.hpp:1180
msgpack::object_handle unpack(const char *data, std::size_t len, std::size_t &off, bool &referenced, unpack_reference_func f, void *user_data, unpack_limit const &limit)
Unpack msgpack::object from a buffer.
Definition: unpack.hpp:1397
uint32_t size
Definition: object_fwd.hpp:23
msgpack::object * ptr
Definition: object_fwd.hpp:24
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
union_type via
Definition: object_fwd.hpp:93
msgpack::type::object_type type
Definition: object_fwd.hpp:92
Definition: cpp03_define_array.hpp:26
std::tuple tuple_type
Definition: cpp11_define_array.hpp:93
void msgpack_pack(Packer &pk) const
Definition: cpp11_define_array.hpp:95
void msgpack_unpack(msgpack::object const &o)
Definition: cpp11_define_array.hpp:99
void msgpack_object(msgpack::object *o, msgpack::zone &) const
Definition: cpp11_define_array.hpp:103
define_array value_type
Definition: cpp11_define_array.hpp:92
static void unpack(msgpack::object const &o, Tuple &t)
Definition: cpp11_define_array.hpp:49
static void object(msgpack::object *o, msgpack::zone &z, Tuple const &t)
Definition: cpp11_define_array.hpp:54
static void pack(Packer &pk, Tuple const &t)
Definition: cpp11_define_array.hpp:46
Definition: cpp11_define_array.hpp:25
static void pack(Packer &pk, Tuple const &t)
Definition: cpp11_define_array.hpp:27
static void object(msgpack::object *o, msgpack::zone &z, Tuple const &t)
Definition: cpp11_define_array.hpp:37
static void unpack(msgpack::object const &o, Tuple &t)
Definition: cpp11_define_array.hpp:31
Definition: cpp11_define_array.hpp:60
void msgpack_object(msgpack::object *o, msgpack::zone &z) const
Definition: cpp11_define_array.hpp:78
define_array(Args &... args)
Definition: cpp11_define_array.hpp:63
void msgpack_pack(Packer &pk) const
Definition: cpp11_define_array.hpp:66
std::tuple< Args... > tuple_type
Definition: cpp11_define_array.hpp:62
void msgpack_unpack(msgpack::object const &o)
Definition: cpp11_define_array.hpp:72
define_array< Args... > value_type
Definition: cpp11_define_array.hpp:61
std::tuple< Args &... > a
Definition: cpp11_define_array.hpp:87
msgpack::object_array array
Definition: object_fwd.hpp:85
#define MSGPACK_ZONE_ALIGNOF(type)
Definition: cpp03_zone_decl.hpp:30
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:66