11 #ifndef MSGPACK_V1_TYPE_CPP11_ARRAY_HPP
12 #define MSGPACK_V1_TYPE_CPP11_ARRAY_HPP
33 template<
typename T, std::size_t N1, std::size_t... I1, std::size_t N2, std::size_t... I2>
35 std::array<T, N1>&& a1,
36 std::array<T, N2>&& a2,
39 return {{ std::move(a1[I1])..., std::move(a2[I2])... }};
42 template<
typename T, std::
size_t N1, std::
size_t N2>
43 inline std::array<T, N1+N2>
concat(std::array<T, N1>&& a1, std::array<T, N2>&& a2) {
47 template <
typename T, std::
size_t N>
59 return std::array<T, 1>{{p->
as<T>()}};
66 return std::array<T, 0>();
74 template <
typename T, std::
size_t N>
75 struct as<std::array<T, N>, typename std::enable_if<msgpack::has_as<T>::value>::type> {
83 template <
typename T, std::
size_t N>
102 template <
typename T, std::
size_t N>
103 struct pack<std::array<T, N>> {
104 template <
typename Stream>
108 for(
auto const& e : v) o.
pack(e);
113 template <
typename T, std::
size_t N>
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:231
void * allocate_align(size_t size, size_t align=MSGPACK_ZONE_ALIGN)
Definition: cpp03_zone.hpp:256
std::array< T, N1+N2 > concat(std::array< T, N1 > &&a1, std::array< T, N2 > &&a2, msgpack::seq< I1... >, msgpack::seq< I2... >)
Definition: array.hpp:34
std::size_t size(T const &t)
Definition: size_equal_only.hpp:24
@ ARRAY
Definition: object_fwd_decl.hpp:40
Definition: adaptor_base.hpp:15
uint32_t checked_get_container_size(T size)
Definition: check_container_size.hpp:55
std::array< T, N > operator()(msgpack::object const &o) const
Definition: array.hpp:76
Definition: object_fwd_decl.hpp:61
msgpack::object const & operator()(msgpack::object const &o, std::array< T, N > &v) const
Definition: array.hpp:85
Definition: adaptor_base.hpp:27
static std::array< T, 0 > as(msgpack::object const &)
Definition: array.hpp:65
static std::array< T, 1 > as(msgpack::object const &o)
Definition: array.hpp:57
static std::array< T, N > as(msgpack::object const &o)
Definition: array.hpp:49
void operator()(msgpack::object::with_zone &o, const std::array< T, N > &v) const
Definition: array.hpp:115
Definition: adaptor_base.hpp:43
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::array< T, N > &v) const
Definition: array.hpp:105
Definition: adaptor_base.hpp:32
Definition: object.hpp:35
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
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::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
msgpack::type::object_type type
Definition: object_fwd.hpp:92
msgpack::object_array array
Definition: object_fwd.hpp:85
#define MSGPACK_NULLPTR
Definition: cpp_config_decl.hpp:85
#define MSGPACK_ZONE_ALIGNOF(type)
Definition: cpp03_zone_decl.hpp:30
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:66