10#ifndef MSGPACK_TYPE_TR1_UNORDERED_SET_HPP
11#define MSGPACK_TYPE_TR1_UNORDERED_SET_HPP
18#if defined(_LIBCPP_VERSION) || (_MSC_VER >= 1700)
20#define MSGPACK_HAS_STD_UNORDERED_SET
21#include <unordered_set>
22#define MSGPACK_STD_TR1 std
28#define MSGPACK_HAS_STD_TR1_UNORDERED_SET
30#include <tr1/unordered_set>
31#define MSGPACK_STD_TR1 std::tr1
37#if defined(MSGPACK_STD_TR1)
47template <
typename T,
typename Hash,
typename Compare,
typename Alloc>
48struct convert<MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc> > {
53 MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc> tmp;
56 tmp.insert(p->
as<T>());
63template <
typename T,
typename Hash,
typename Compare,
typename Alloc>
64struct pack<MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc> > {
65 template <
typename Stream>
69 for(
typename MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc>::const_iterator it(v.begin()), it_end(v.end());
77template <
typename T,
typename Hash,
typename Compare,
typename Alloc>
78struct object_with_zone<MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc> > {
90 typename MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc>::const_iterator it(v.begin());
101template <
typename T,
typename Hash,
typename Compare,
typename Alloc>
102struct convert<MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc> > {
107 MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc> tmp;
110 tmp.insert(p->
as<T>());
117template <
typename T,
typename Hash,
typename Compare,
typename Alloc>
118struct pack<MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc> > {
119 template <
typename Stream>
123 for(
typename MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc>::const_iterator it(v.begin()), it_end(v.end());
124 it != it_end; ++it) {
131template <
typename T,
typename Hash,
typename Compare,
typename Alloc>
132struct object_with_zone<MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc> > {
144 typename MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc>::const_iterator it(v.begin());
162#undef MSGPACK_STD_TR1
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:255
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
void pack(msgpack::packer< Stream > &o, const T &v)
Definition object.hpp:1185
uint32_t checked_get_container_size(T size)
Definition check_container_size.hpp:55
void convert(T &v, msgpack::object const &o)
Definition object.hpp:1178
msgpack::object const & operator()(msgpack::object const &o, T &v) const
Definition object.hpp:646
void operator()(msgpack::object::with_zone &o, T const &v) const
Definition object.hpp:662
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, T const &v) const
Definition object.hpp:655
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:1126
union_type via
Definition object_fwd.hpp:93
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