10#ifndef MSGPACK_V1_TYPE_SET_HPP
11#define MSGPACK_V1_TYPE_SET_HPP
28#if !defined(MSGPACK_USE_CPP03)
30template <
typename T,
typename Compare,
typename Alloc>
31struct as<std::set<T, Compare, Alloc>,
typename std::enable_if<msgpack::has_as<T>::value>::type> {
36 std::set<T, Compare, Alloc>
v;
47template <
typename T,
typename Compare,
typename Alloc>
48struct convert<std::set<T, Compare, Alloc> > {
53 std::set<T, Compare, Alloc>
tmp;
56 tmp.insert(
p->as<
T>());
58#if MSGPACK_CPP_VERSION >= 201103L
67template <
typename T,
typename Compare,
typename Alloc>
68struct pack<std::set<T, Compare, Alloc> > {
69 template <
typename Stream>
73 for (
typename std::set<T, Compare, Alloc>::const_iterator
it(
v.begin()),
it_end(
v.end());
81template <
typename T,
typename Compare,
typename Alloc>
84 o.type = msgpack::type::ARRAY;
94 o.via.array.size = size;
95 typename std::set<T, Compare, Alloc>::const_iterator
it(
v.begin());
105#if !defined(MSGPACK_USE_CPP03)
107template <
typename T,
typename Compare,
typename Alloc>
108struct as<std::
multiset<T, Compare, Alloc>,
typename std::enable_if<msgpack::has_as<T>::value>::type> {
113 std::multiset<T, Compare, Alloc>
v;
116 v.insert(
p->as<
T>());
124template <
typename T,
typename Compare,
typename Alloc>
130 std::multiset<T, Compare, Alloc>
tmp;
133 tmp.insert(
p->as<
T>());
135#if MSGPACK_CPP_VERSION >= 201103L
144template <
typename T,
typename Compare,
typename Alloc>
146 template <
typename Stream>
150 for (
typename std::multiset<T, Compare, Alloc>::const_iterator
it(
v.begin()),
it_end(
v.end());
158template <
typename T,
typename Compare,
typename Alloc>
161 o.type = msgpack::type::ARRAY;
164 o.via.array.size = 0;
170 o.via.array.size = size;
171 typename std::multiset<T, Compare, 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
uint32_t checked_get_container_size(T size)
Definition check_container_size.hpp:55
std::multiset< T, Compare, Alloc > operator()(msgpack::object const &o) const
Definition set.hpp:109
std::set< T, Compare, Alloc > operator()(msgpack::object const &o) const
Definition set.hpp:32
Definition object_fwd_decl.hpp:61
msgpack::object const & operator()(msgpack::object const &o, std::multiset< T, Compare, Alloc > &v) const
Definition set.hpp:126
msgpack::object const & operator()(msgpack::object const &o, std::set< T, Compare, Alloc > &v) const
Definition set.hpp:49
Definition adaptor_base.hpp:27
void operator()(msgpack::object::with_zone &o, const std::multiset< T, Compare, Alloc > &v) const
Definition set.hpp:160
void operator()(msgpack::object::with_zone &o, const std::set< T, Compare, Alloc > &v) const
Definition set.hpp:83
Definition adaptor_base.hpp:43
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::multiset< T, Compare, Alloc > &v) const
Definition set.hpp:147
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::set< T, Compare, Alloc > &v) const
Definition set.hpp:70
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