10 #ifndef MSGPACK_V1_TYPE_ARRAY_REF_HPP 11 #define MSGPACK_V1_TYPE_ARRAY_REF_HPP 40 return *data == *t.
data;
44 return !(*data == *t.
data);
47 bool operator< (array_ref<U>
const& t)
const 49 return *data < *t.data;
57 bool operator<= (array_ref<U>
const& t)
const 59 return !(*t.data < *
data);
64 return !(*data < *t.
data);
68 template <
typename T, std::
size_t N>
81 if (N != t.
size())
return false;
82 T
const* pself =
data;
83 U
const* pother = t.
data;
84 for (; pself != &data[N]; ++pself, ++pother) {
85 if (*pself != *pother)
return false;
94 bool operator< (array_ref<U>
const& t)
const 96 T
const* pself =
data;
97 U
const* pother = t.data;
98 for (; pself != &data[N] && pother != t.data[t.size()]; ++pself, ++pother) {
99 if (*pself < *pother)
return true;
101 if (N < t.size())
return true;
104 template <
typename U>
109 template <
typename U>
110 bool operator<= (array_ref<U>
const& t)
const 112 return !(t.data <
data);
114 template <
typename U>
117 return !(data < t.
data);
121 template <
typename T>
131 template <
typename T>
141 template <
typename T, std::
size_t N>
146 template <
typename T, std::
size_t N>
155 template <
typename T>
164 typename T::iterator it = v.
data->begin();
175 template <
typename T, std::
size_t N>
195 template <
typename T>
204 typename std::vector<T>::iterator it = v.data->begin();
215 template <
typename T>
217 template <
typename Stream>
222 for (
typename T::const_iterator it(v.
data->begin()), it_end(v.
data->end());
223 it != it_end; ++it) {
230 template <
typename T, std::
size_t N>
232 template <
typename Stream>
237 for (T
const* it = v.data;
238 it != &v.data[v.size()]; ++it) {
245 template <
typename T>
250 if (v.
data->empty()) {
260 typename T::const_iterator it(v.
data->begin());
262 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__) 263 #pragma GCC diagnostic push 264 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" 265 #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__) 267 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__) 268 #pragma GCC diagnostic pop 269 #endif // (__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 T * data
Definition: array_ref.hpp:73
Definition: cpp_config_decl.hpp:71
uint32_t size
Definition: object_fwd.hpp:23
void * allocate_align(size_t size, size_t align=MSGPACK_ZONE_ALIGN)
Definition: cpp03_zone.hpp:236
std::size_t size() const
Definition: array_ref.hpp:75
bool operator==(array_ref< U > const &t) const
Definition: array_ref.hpp:80
uint32_t checked_get_container_size(T size)
Definition: check_container_size.hpp:55
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const msgpack::type::array_ref< T > &v) const
Definition: array_ref.hpp:218
union_type via
Definition: object_fwd.hpp:93
T * data
Definition: array_ref.hpp:32
msgpack::object const & operator()(msgpack::object const &o, msgpack::type::array_ref< std::vector< T > > &v) const
Definition: array_ref.hpp:197
msgpack::zone & zone
Definition: object.hpp:36
msgpack::object * ptr
Definition: object_fwd.hpp:24
packer< Stream > & pack_array(uint32_t n)
Packing array header and size.
Definition: pack.hpp:1160
uint32_t size
Definition: object_fwd.hpp:38
Definition: adaptor_base.hpp:15
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const msgpack::type::array_ref< T[N]> &v) const
Definition: array_ref.hpp:233
bool operator!=(array_ref< U > const &t) const
Definition: array_ref.hpp:43
Definition: object.hpp:34
packer< Stream > & pack(const T &v)
Packing function template.
bool operator==(array_ref< U > const &t) const
Definition: array_ref.hpp:39
Definition: array_ref.hpp:28
void operator()(msgpack::object::with_zone &o, const msgpack::type::array_ref< T[N]> &v) const
Definition: array_ref.hpp:279
array_ref(T(&t)[N])
Definition: array_ref.hpp:71
Definition: adaptor_base.hpp:43
Definition: object_fwd.hpp:236
array_ref()
Definition: array_ref.hpp:29
array_ref()
Definition: array_ref.hpp:70
Definition: adaptor_base.hpp:32
msgpack::object_array array
Definition: object_fwd.hpp:85
Definition: array_ref.hpp:69
Definition: cpp_config_decl.hpp:56
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
msgpack::object const & operator()(msgpack::object const &o, msgpack::type::array_ref< T > &v) const
Definition: array_ref.hpp:157
void operator()(msgpack::object::with_zone &o, const msgpack::type::array_ref< T > &v) const
Definition: array_ref.hpp:247
msgpack::type::object_type type
Definition: object_fwd.hpp:92
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:58
Definition: object_fwd_decl.hpp:41
std::size_t size() const
Definition: array_ref.hpp:34
msgpack::enable_if< !msgpack::is_array< T const >::value, array_ref< T const >>::type make_array_ref(const T &t)
Definition: array_ref.hpp:127
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:538
The class template that supports continuous packing.
Definition: adaptor_base_decl.hpp:24
bool operator>(array_ref< U > const &t) const
Definition: array_ref.hpp:52
#define MSGPACK_NULLPTR
Definition: cpp_config_decl.hpp:35
bool operator!=(array_ref< U > const &t) const
Definition: array_ref.hpp:90
array_ref(T &t)
Definition: array_ref.hpp:30
msgpack::object const & operator()(msgpack::object const &o, msgpack::type::array_ref< T[N]> &v) const
Definition: array_ref.hpp:177
Definition: adaptor_base.hpp:27
bool operator>=(array_ref< U > const &t) const
Definition: array_ref.hpp:62
msgpack::object_bin bin
Definition: object_fwd.hpp:88