10 #ifndef MSGPACK_V1_TYPE_VECTOR_HPP
11 #define MSGPACK_V1_TYPE_VECTOR_HPP
27 #if !defined(MSGPACK_USE_CPP03)
29 template <
typename T,
typename Alloc>
30 struct as<std::vector<T, Alloc>, typename std::enable_if<msgpack::has_as<T>::value>::type> {
33 std::vector<T, Alloc> v;
39 v.push_back(p->
as<T>());
49 template <
typename T,
typename Alloc>
57 typename std::vector<T, Alloc>::iterator it = v.begin();
68 template <
typename T,
typename Alloc>
69 struct pack<std::vector<T, Alloc> > {
70 template <
typename Stream>
74 for (
typename std::vector<T, Alloc>::const_iterator it(v.begin()), it_end(v.end());
82 template <
typename T,
typename Alloc>
96 typename std::vector<T, Alloc>::const_iterator it(v.begin());
98 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
99 #pragma GCC diagnostic push
100 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
103 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
104 #pragma GCC diagnostic pop
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::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::vector< T, Alloc > operator()(const msgpack::object &o) const
Definition: vector.hpp:31
Definition: object_fwd_decl.hpp:61
msgpack::object const & operator()(msgpack::object const &o, std::vector< T, Alloc > &v) const
Definition: vector.hpp:51
Definition: adaptor_base.hpp:27
void operator()(msgpack::object::with_zone &o, const std::vector< T, Alloc > &v) const
Definition: vector.hpp:84
Definition: adaptor_base.hpp:43
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::vector< T, Alloc > &v) const
Definition: vector.hpp:71
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