10#ifndef MSGPACK_V1_TYPE_VECTOR_BOOL_HPP
11#define MSGPACK_V1_TYPE_VECTOR_BOOL_HPP
27template <
typename Alloc>
28struct convert<std::vector<bool, Alloc> > {
31 if (
o.via.array.size > 0) {
32 v.resize(
o.via.array.size);
34 for (
typename std::vector<bool, Alloc>::iterator
it =
v.begin(),
end =
v.end();
45template <
typename Alloc>
46struct pack<std::vector<bool, Alloc> > {
47 template <
typename Stream>
51 for(
typename std::vector<bool, Alloc>::const_iterator
it(
v.begin()),
it_end(
v.end());
53 o.pack(
static_cast<bool>(*
it));
59template <
typename Alloc>
62 o.type = msgpack::type::ARRAY;
71 o.via.array.size = size;
72 typename std::vector<bool, Alloc>::const_iterator
it(
v.begin());
The class template that supports continuous packing.
Definition pack.hpp:33
Definition object_fwd.hpp:231
Definition adaptor_base.hpp:15
msgpack::object_kv * end(msgpack::object_map &map)
Definition iterator.hpp:25
uint32_t checked_get_container_size(T size)
Definition check_container_size.hpp:55
msgpack::object const & operator()(msgpack::object const &o, std::vector< bool, Alloc > &v) const
Definition vector_bool.hpp:29
Definition adaptor_base.hpp:27
void operator()(msgpack::object::with_zone &o, const std::vector< bool, Alloc > &v) const
Definition vector_bool.hpp:61
Definition adaptor_base.hpp:43
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::vector< bool, Alloc > &v) const
Definition vector_bool.hpp:48
Definition adaptor_base.hpp:32
Object class that corresponding to MessagePack format object.
Definition object_fwd.hpp:75
#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