10 #ifndef MSGPACK_V1_TYPE_ARRAY_REF_HPP
11 #define MSGPACK_V1_TYPE_ARRAY_REF_HPP
67 template <
typename T, std::
size_t N>
80 if (N != t.
size())
return false;
81 T
const* pself =
data;
82 U
const* pother = t.
data;
83 for (; pself != &
data[N]; ++pself, ++pother) {
84 if (*pself != *pother)
return false;
95 T
const* pself =
data;
96 U
const* pother = t.
data;
97 for (; pself != &
data[N] && pother != t.
data[t.
size()]; ++pself, ++pother) {
98 if (*pself < *pother)
return true;
100 if (N < t.
size())
return true;
103 template <
typename U>
108 template <
typename U>
113 template <
typename U>
120 template <
typename T>
122 typename msgpack::enable_if<
123 !msgpack::is_array<T const>::value,
130 template <
typename T>
132 typename msgpack::enable_if<
133 !msgpack::is_array<T>::value,
140 template <
typename T, std::
size_t N>
145 template <
typename T, std::
size_t N>
154 template <
typename T>
163 typename T::iterator it = v.
data->begin();
174 template <
typename T, std::
size_t N>
194 template <
typename T>
203 typename std::vector<T>::iterator it = v.data->begin();
214 template <
typename T>
216 template <
typename Stream>
221 for (
typename T::const_iterator it(v.
data->begin()), it_end(v.
data->end());
222 it != it_end; ++it) {
229 template <
typename T, std::
size_t N>
231 template <
typename Stream>
236 for (T
const* it = v.data;
237 it != &v.data[v.size()]; ++it) {
244 template <
typename T>
249 if (v.
data->empty()) {
259 typename T::const_iterator it(v.
data->begin());
261 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
262 #pragma GCC diagnostic push
263 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
267 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
268 #pragma GCC diagnostic pop
277 template <
typename T, std::
size_t N>
287 T
const* it = v.data;
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
msgpack::enable_if< !msgpack::is_array< T const >::value, array_ref< T const >>::type make_array_ref(const T &t)
Definition: array_ref.hpp:126
@ 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
msgpack::object const & operator()(msgpack::object const &o, msgpack::type::array_ref< T > &v) const
Definition: array_ref.hpp:156
msgpack::object const & operator()(msgpack::object const &o, msgpack::type::array_ref< T[N]> &v) const
Definition: array_ref.hpp:176
msgpack::object const & operator()(msgpack::object const &o, msgpack::type::array_ref< std::vector< T > > &v) const
Definition: array_ref.hpp:196
Definition: adaptor_base.hpp:27
void operator()(msgpack::object::with_zone &o, const msgpack::type::array_ref< T > &v) const
Definition: array_ref.hpp:246
void operator()(msgpack::object::with_zone &o, const msgpack::type::array_ref< T[N]> &v) const
Definition: array_ref.hpp:279
Definition: adaptor_base.hpp:43
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const msgpack::type::array_ref< T > &v) const
Definition: array_ref.hpp:217
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const msgpack::type::array_ref< T[N]> &v) const
Definition: array_ref.hpp:232
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
uint32_t size
Definition: object_fwd.hpp:38
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
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
Definition: array_ref.hpp:68
bool operator==(array_ref< U > const &t) const
Definition: array_ref.hpp:79
array_ref(T(&t)[N])
Definition: array_ref.hpp:70
T * data
Definition: array_ref.hpp:72
bool operator!=(array_ref< U > const &t) const
Definition: array_ref.hpp:89
array_ref()
Definition: array_ref.hpp:69
std::size_t size() const
Definition: array_ref.hpp:74
Definition: array_ref.hpp:27
std::size_t size() const
Definition: array_ref.hpp:33
bool operator<(array_ref< U > const &t) const
Definition: array_ref.hpp:46
array_ref()
Definition: array_ref.hpp:28
T * data
Definition: array_ref.hpp:31
bool operator>(array_ref< U > const &t) const
Definition: array_ref.hpp:51
array_ref(T &t)
Definition: array_ref.hpp:29
bool operator!=(array_ref< U > const &t) const
Definition: array_ref.hpp:42
bool operator==(array_ref< U > const &t) const
Definition: array_ref.hpp:38
bool operator>=(array_ref< U > const &t) const
Definition: array_ref.hpp:61
bool operator<=(array_ref< U > const &t) const
Definition: array_ref.hpp:56
msgpack::object_array array
Definition: object_fwd.hpp:85
msgpack::object_bin bin
Definition: object_fwd.hpp:88
#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