10#ifndef MSGPACK_V1_TYPE_CPP11_TUPLE_HPP
11#define MSGPACK_V1_TYPE_CPP11_TUPLE_HPP
27template <
typename Stream,
typename Tuple, std::
size_t N>
33 o.
pack(std::get<N-1>(v));
37template <
typename Stream,
typename Tuple>
47template <
typename... Args>
48struct pack<std::tuple<Args...>> {
49 template <
typename Stream>
52 const std::tuple<Args...>& v)
const {
64template <
typename... Args>
67template <
typename T,
typename... Args>
70 return std::tuple_cat(
76template <
typename... Args>
86 return std::tuple<>();
90template <
typename Tuple, std::
size_t N>
97 o.
via.
array.
ptr[N-1].
convert<
typename std::remove_reference<
decltype(std::get<N-1>(v))>::type>(std::get<N-1>(v));
101template <
typename Tuple>
111template <
typename... Args>
112struct as<std::tuple<Args...>, typename std::enable_if<msgpack::any_of<msgpack::has_as, Args...>::value>::type> {
120template <
typename... Args>
124 std::tuple<Args...>& v)
const {
134template <
typename Tuple, std::
size_t N>
144template <
typename Tuple>
154template <
typename... Args>
158 std::tuple<Args...>
const& v)
const {
160 o.
type = msgpack::type::ARRAY;
The class template that supports continuous packing.
Definition pack.hpp:33
packer< Stream > & pack_array(uint32_t n)
Packing array header and size.
Definition pack.hpp:1195
packer< Stream > & pack(const T &v)
Packing function template.
Definition object_fwd.hpp:236
void * allocate_align(size_t size, size_t align=MSGPACK_ZONE_ALIGN)
Definition cpp03_zone.hpp:246
Definition adaptor_base.hpp:15
uint32_t checked_get_container_size(T size)
Definition check_container_size.hpp:55
static std::tuple as(msgpack::object const &)
Definition tuple.hpp:85
static std::tuple< Args... > as(msgpack::object const &o)
Definition tuple.hpp:78
static std::tuple< T, Args... > as(msgpack::object const &o)
Definition tuple.hpp:69
static void convert(msgpack::object const &, Tuple &)
Definition tuple.hpp:103
static void convert(msgpack::object const &o, Tuple &v)
Definition tuple.hpp:92
static void pack(msgpack::packer< Stream > &, const Tuple &)
Definition tuple.hpp:39
static void pack(msgpack::packer< Stream > &o, const Tuple &v)
Definition tuple.hpp:29
static void convert(msgpack::object::with_zone &, const Tuple &)
Definition tuple.hpp:146
static void convert(msgpack::object::with_zone &o, const Tuple &v)
Definition tuple.hpp:136
std::tuple< Args... > operator()(msgpack::object const &o) const
Definition tuple.hpp:113
Definition object_fwd_decl.hpp:62
msgpack::object const & operator()(msgpack::object const &o, std::tuple< Args... > &v) const
Definition tuple.hpp:122
Definition adaptor_base.hpp:27
void operator()(msgpack::object::with_zone &o, std::tuple< Args... > const &v) const
Definition tuple.hpp:156
Definition adaptor_base.hpp:43
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::tuple< Args... > &v) const
Definition tuple.hpp:50
Definition adaptor_base.hpp:32
msgpack::zone & zone
Definition object.hpp:37
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
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:1071
std::enable_if< msgpack::has_as< T >::value, T >::type as() const
Get value as T.
Definition object.hpp:1121
union_type via
Definition object_fwd.hpp:93
msgpack::type::object_type type
Definition object_fwd.hpp:92
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:58