10 #ifndef MSGPACK_TYPE_TR1_UNORDERED_SET_HPP 11 #define MSGPACK_TYPE_TR1_UNORDERED_SET_HPP 17 #if defined(_LIBCPP_VERSION) || (_MSC_VER >= 1700) 19 #define MSGPACK_HAS_STD_UNORDERED_SET 20 #include <unordered_set> 21 #define MSGPACK_STD_TR1 std 23 #else // defined(_LIBCPP_VERSION) || (_MSC_VER >= 1700) 27 #define MSGPACK_HAS_STD_TR1_UNORDERED_SET 29 #include <tr1/unordered_set> 30 #define MSGPACK_STD_TR1 std::tr1 32 #endif // __GNUC__ >= 4 34 #endif // defined(_LIBCPP_VERSION) || (_MSC_VER >= 1700) 36 #if defined(MSGPACK_STD_TR1) 46 template <
typename T,
typename Hash,
typename Compare,
typename Alloc>
47 struct convert<MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc> > {
52 MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc> tmp;
55 tmp.insert(p->
as<T>());
62 template <
typename T,
typename Hash,
typename Compare,
typename Alloc>
63 struct pack<MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc> > {
64 template <
typename Stream>
68 for(
typename MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc>::const_iterator it(v.begin()), it_end(v.end());
76 template <
typename T,
typename Hash,
typename Compare,
typename Alloc>
77 struct object_with_zone<MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc> > {
89 typename MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc>::const_iterator it(v.begin());
100 template <
typename T,
typename Hash,
typename Compare,
typename Alloc>
101 struct convert<MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc> > {
106 MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc> tmp;
109 tmp.insert(p->
as<T>());
116 template <
typename T,
typename Hash,
typename Compare,
typename Alloc>
117 struct pack<MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc> > {
118 template <
typename Stream>
122 for(
typename MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc>::const_iterator it(v.begin()), it_end(v.end());
123 it != it_end; ++it) {
130 template <
typename T,
typename Hash,
typename Compare,
typename Alloc>
131 struct object_with_zone<MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc> > {
143 typename MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc>::const_iterator it(v.begin());
161 #undef MSGPACK_STD_TR1 163 #endif // MSGPACK_STD_TR1 165 #endif // MSGPACK_TYPE_TR1_UNORDERED_SET_HPP 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
uint32_t checked_get_container_size(T size)
Definition: check_container_size.hpp:55
union_type via
Definition: object_fwd.hpp:93
std::enable_if< msgpack::has_as< T >::value, T >::type as() const
Get value as T.
Definition: object.hpp:588
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
Definition: adaptor_base.hpp:15
void convert(T &v, msgpack::object const &o)
Definition: object.hpp:661
Definition: object.hpp:34
packer< Stream > & pack(const T &v)
Packing function template.
Definition: object_fwd.hpp:236
std::size_t size(T const &t)
Definition: size_equal_only.hpp:24
msgpack::object_array array
Definition: object_fwd.hpp:85
void pack(msgpack::packer< Stream > &o, const T &v)
Definition: object.hpp:668
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
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
The class template that supports continuous packing.
Definition: adaptor_base_decl.hpp:24
#define MSGPACK_NULLPTR
Definition: cpp_config_decl.hpp:35
msgpack::object const & operator()(msgpack::object const &o, T &v) const
Definition: object.hpp:203