10 #ifndef MSGPACK_V1_TYPE_CPP11_TUPLE_HPP 11 #define MSGPACK_V1_TYPE_CPP11_TUPLE_HPP 27 template <
typename Stream,
typename Tuple, std::
size_t N>
33 o.
pack(std::get<N-1>(v));
37 template <
typename Stream,
typename Tuple>
47 template <
typename... Args>
48 struct pack<std::tuple<Args...>> {
49 template <
typename Stream>
52 const std::tuple<Args...>& v)
const {
64 template <
typename... Args>
67 template <
typename T,
typename... Args>
76 template <
typename... Args>
86 return std::tuple<>();
90 template <
typename Tuple, std::
size_t N>
96 o.
via.
array.
ptr[N-1].
convert<
typename std::remove_reference<decltype(std::get<N-1>(v))>::type>(std::get<N-1>(v));
100 template <
typename Tuple>
110 template <
typename... Args>
111 struct as<std::tuple<Args...>, typename std::enable_if<msgpack::all_of<msgpack::has_as, Args...>::value>::type> {
120 template <
typename... Args>
124 std::tuple<Args...>& v)
const {
135 template <
typename Tuple, std::
size_t N>
145 template <
typename Tuple>
155 template <
typename... Args>
159 std::tuple<Args...>
const& v)
const {
176 #endif // MSGPACK_V1_TYPE_CPP11_TUPLE_HPP static std::tuple as(msgpack::object const &)
Definition: tuple.hpp:85
static void convert(msgpack::object::with_zone &, const Tuple &)
Definition: tuple.hpp:147
std::tuple< Args... > operator()(msgpack::object const &o) const
Definition: tuple.hpp:112
uint32_t size
Definition: object_fwd.hpp:23
static void convert(msgpack::object const &o, Tuple &v)
Definition: tuple.hpp:92
void * allocate_align(size_t size, size_t align=MSGPACK_ZONE_ALIGN)
Definition: cpp03_zone.hpp:236
uint32_t checked_get_container_size(T size)
Definition: check_container_size.hpp:55
Definition: object_fwd_decl.hpp:60
union_type via
Definition: object_fwd.hpp:92
msgpack::zone & zone
Definition: object.hpp:36
static void pack(msgpack::packer< Stream > &, const Tuple &)
Definition: tuple.hpp:39
msgpack::object * ptr
Definition: object_fwd.hpp:24
packer< Stream > & pack_array(uint32_t n)
Packing array header and size.
Definition: pack.hpp:1160
Definition: adaptor_base.hpp:15
void operator()(msgpack::object::with_zone &o, std::tuple< Args... > const &v) const
Definition: tuple.hpp:157
static std::tuple< T, Args... > as(msgpack::object const &o)
Definition: tuple.hpp:69
void convert(T &v, msgpack::object const &o)
Definition: object.hpp:657
Definition: object.hpp:34
packer< Stream > & pack(const T &v)
Packing function template.
static std::tuple< Args... > as(msgpack::object const &o)
Definition: tuple.hpp:78
std::enable_if< msgpack::has_as< T >::value, T >::type as() const
Get value as T.
Definition: object.hpp:584
Definition: adaptor_base.hpp:43
static void convert(msgpack::object const &, Tuple &)
Definition: tuple.hpp:102
static void convert(msgpack::object::with_zone &o, const Tuple &v)
Definition: tuple.hpp:137
static void pack(msgpack::packer< Stream > &o, const Tuple &v)
Definition: tuple.hpp:29
msgpack::enable_if< !msgpack::is_array< T >::value &&!msgpack::is_pointer< T >::value, T & >::type convert(T &v) const
Convert the object.
Definition: object.hpp:534
tuple make_tuple()
Definition: cpp03_msgpack_tuple.hpp:10375
Definition: object_fwd.hpp:233
Definition: adaptor_base.hpp:32
msgpack::object_array array
Definition: object_fwd.hpp:84
msgpack::object const & operator()(msgpack::object const &o, std::tuple< Args... > &v) const
Definition: tuple.hpp:122
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
msgpack::type::object_type type
Definition: object_fwd.hpp:91
Definition: tuple.hpp:136
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::tuple< Args... > &v) const
Definition: tuple.hpp:50
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:58
Definition: object_fwd_decl.hpp:39
auto tuple_cat(Tuples &&...args) -> decltype(std::tuple_cat(std::forward< typename std::remove_reference< Tuples >::type::base >(args)...))
Definition: cpp11_msgpack_tuple.hpp:36
The class template that supports continuous packing.
Definition: adaptor_base_decl.hpp:24
Definition: adaptor_base.hpp:27