6 #ifndef TURI_SERIALIZE_UNORDERED_SET_HPP 7 #define TURI_SERIALIZE_UNORDERED_SET_HPP 9 #include <boost/unordered_set.hpp> 10 #include <core/storage/serialization/iarchive.hpp> 11 #include <core/storage/serialization/oarchive.hpp> 12 #include <core/storage/serialization/iterator.hpp> 15 namespace archive_detail {
17 template <
typename OutArcType,
typename T>
18 struct serialize_impl<OutArcType,
boost::unordered_set<T>, false > {
19 static void exec(OutArcType& oarc,
const boost::unordered_set<T>& vec){
21 vec.begin(), vec.end(), vec.size());
26 template <
typename InArcType,
typename T>
27 struct deserialize_impl<InArcType,
boost::unordered_set<T>, false > {
28 static void exec(InArcType& iarc, boost::unordered_set<T>& vec){
34 for (
size_t x = 0; x < length ; ++x){
49 #if defined(__cplusplus) && __cplusplus >= 201103L 50 #include <unordered_set> 53 namespace archive_detail {
55 template <
typename OutArcType,
typename T>
56 struct serialize_impl<OutArcType,
std::unordered_set<T>, false > {
57 static void exec(OutArcType& oarc,
const std::unordered_set<T>& vec){
59 vec.begin(), vec.end(), vec.size());
64 template <
typename InArcType,
typename T>
65 struct deserialize_impl<InArcType,
std::unordered_set<T>, false > {
66 static void exec(InArcType& iarc, std::unordered_set<T>& vec){
72 for (
size_t x = 0; x < length ; ++x){
void serialize_iterator(OutArcType &oarc, RandomAccessIterator begin, RandomAccessIterator end)
Serializes the contents between the iterators begin and end.