Go to the documentation of this file.
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>
130 template <
typename T>
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"
264 #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
267 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
268 #pragma GCC diagnostic pop
269 #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
277 template <
typename T, std::
size_t N>
287 T
const* it = v.data;
305 #endif // MSGPACK_V1_TYPE_ARRAY_REF_HPP
The class template that supports continuous packing.
Definition: adaptor_base_decl.hpp:24
void * allocate_align(size_t size, size_t align=MSGPACK_ZONE_ALIGN)
Definition: cpp03_zone.hpp:246
T * data
Definition: array_ref.hpp:72
Definition: adaptor_base.hpp:43
Definition: adaptor_base.hpp:15
#define MSGPACK_ZONE_ALIGNOF(type)
Definition: cpp03_zone_decl.hpp:30
Definition: cpp_config_decl.hpp:71
Definition: cpp_config_decl.hpp:56
Definition: adaptor_base.hpp:27
bool operator<=(array_ref< U > const &t) const
Definition: array_ref.hpp:56
void operator()(msgpack::object::with_zone &o, const msgpack::type::array_ref< T > &v) const
Definition: array_ref.hpp:246
uint32_t size
Definition: object_fwd.hpp:38
std::size_t size() const
Definition: array_ref.hpp:74
uint32_t checked_get_container_size(T size)
Definition: check_container_size.hpp:55
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
Definition: array_ref.hpp:27
bool operator==(array_ref< U > const &t) const
Definition: array_ref.hpp:79
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:58
union_type via
Definition: object_fwd.hpp:93
msgpack::object * ptr
Definition: object_fwd.hpp:24
array_ref()
Definition: array_ref.hpp:69
bool operator!=(array_ref< U > const &t) const
Definition: array_ref.hpp:89
std::size_t size() const
Definition: array_ref.hpp:33
std::size_t size(T const &t)
Definition: size_equal_only.hpp:24
#define MSGPACK_NULLPTR
Definition: cpp_config_decl.hpp:35
uint32_t size
Definition: object_fwd.hpp:23
bool operator>=(array_ref< U > const &t) const
Definition: array_ref.hpp:61
msgpack::object const & operator()(msgpack::object const &o, msgpack::type::array_ref< T > &v) const
Definition: array_ref.hpp:156
msgpack::object_array array
Definition: object_fwd.hpp:85
@ ARRAY
Definition: object_fwd_decl.hpp:41
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const msgpack::type::array_ref< T[N]> &v) const
Definition: array_ref.hpp:232
array_ref(T(&t)[N])
Definition: array_ref.hpp:70
packer< Stream > & pack(const T &v)
Packing function template.
msgpack::object_bin bin
Definition: object_fwd.hpp:88
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
Definition: object_fwd.hpp:236
Definition: adaptor_base.hpp:32
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const msgpack::type::array_ref< T > &v) const
Definition: array_ref.hpp:217
bool operator==(array_ref< U > const &t) const
Definition: array_ref.hpp:38
packer< Stream > & pack_array(uint32_t n)
Packing array header and size.
Definition: pack.hpp:1195
msgpack::object const & operator()(msgpack::object const &o, msgpack::type::array_ref< T[N]> &v) const
Definition: array_ref.hpp:176
Definition: array_ref.hpp:68
array_ref()
Definition: array_ref.hpp:28
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
bool operator>(array_ref< U > const &t) const
Definition: array_ref.hpp:51
T * data
Definition: array_ref.hpp:31
bool operator<(array_ref< U > const &t) const
Definition: array_ref.hpp:46
void operator()(msgpack::object::with_zone &o, const msgpack::type::array_ref< T[N]> &v) const
Definition: array_ref.hpp:279
msgpack::zone & zone
Definition: object.hpp:37
bool operator!=(array_ref< U > const &t) const
Definition: array_ref.hpp:42
Definition: object.hpp:35
msgpack::object const & operator()(msgpack::object const &o, msgpack::type::array_ref< std::vector< T > > &v) const
Definition: array_ref.hpp:196
msgpack::type::object_type type
Definition: object_fwd.hpp:92
array_ref(T &t)
Definition: array_ref.hpp:29