10#ifndef MSGPACK_V1_TYPE_CPP11_ARRAY_UNSIGNED_CHAR_HPP
11#define MSGPACK_V1_TYPE_CPP11_ARRAY_UNSIGNED_CHAR_HPP
29template <std::
size_t N>
30struct convert<std::array<unsigned char, N>> {
33 case msgpack::type::BIN:
35 std::memcpy(
v.data(),
o.via.bin.ptr,
o.via.bin.size);
37 case msgpack::type::STR:
39 std::memcpy(
v.data(),
o.via.str.ptr,
N);
50struct convert<std::array<unsigned char, 0>> {
56template <std::
size_t N>
57struct pack<std::array<unsigned char, N>> {
58 template <
typename Stream>
62 o.pack_bin_body(
reinterpret_cast<char const*
>(
v.data()), size);
68template <std::
size_t N>
69struct object<std::array<unsigned char, N>> {
72 o.type = msgpack::type::BIN;
73 o.via.bin.ptr =
reinterpret_cast<char const*
>(
v.data());
74 o.via.bin.size = size;
78template <std::
size_t N>
82 o.type = msgpack::type::BIN;
85 o.via.bin.size = size;
86 std::memcpy(ptr,
v.data(), size);
The class template that supports continuous packing.
Definition pack.hpp:33
Definition object_fwd.hpp:231
Definition adaptor_base.hpp:15
uint32_t checked_get_container_size(T size)
Definition check_container_size.hpp:55
msgpack::object const & operator()(msgpack::object const &o, std::array< unsigned char, 0 > &) const
Definition array_unsigned_char.hpp:51
msgpack::object const & operator()(msgpack::object const &o, std::array< unsigned char, N > &v) const
Definition array_unsigned_char.hpp:31
Definition adaptor_base.hpp:27
void operator()(msgpack::object &o, const std::array< unsigned char, N > &v) const
Definition array_unsigned_char.hpp:70
void operator()(msgpack::object::with_zone &o, const std::array< unsigned char, N > &v) const
Definition array_unsigned_char.hpp:80
Definition adaptor_base.hpp:43
Definition adaptor_base.hpp:38
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::array< unsigned char, N > &v) const
Definition array_unsigned_char.hpp:59
Definition adaptor_base.hpp:32
Object class that corresponding to MessagePack format object.
Definition object_fwd.hpp:75
#define MSGPACK_ZONE_ALIGNOF(type)
Definition cpp03_zone_decl.hpp:30
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition versioning.hpp:66