1 #ifndef BOOST_SERIALIZATION_UNORDERED_MAP_HPP 2 #define BOOST_SERIALIZATION_UNORDERED_MAP_HPP 5 #if defined(_MSC_VER) && (_MSC_VER >= 1020) 21 #include <boost/config.hpp> 23 #include <unordered_map> 25 #include <boost/serialization/utility.hpp> 28 #include <boost/serialization/split_free.hpp> 31 namespace serialization {
36 template<
class Archive,
class Container>
44 typedef typename Container::value_type type;
45 detail::stack_construct<Archive, type> t(ar, v);
47 ar >> boost::serialization::make_nvp(
"item", t.reference());
48 std::pair<typename Container::const_iterator, bool> result =
49 s.insert(t.reference());
54 ar.reset_object_address(
55 & (result.first->second),
56 & t.reference().second
63 template<
class Archive,
class Container>
71 typedef typename Container::value_type type;
72 detail::stack_construct<Archive, type> t(ar, v);
74 ar >> boost::serialization::make_nvp(
"item", t.reference());
75 typename Container::const_iterator result
76 = s.insert(t.reference());
80 ar.reset_object_address(
98 const std::unordered_map<
99 Key, HashFcn, EqualKey, Allocator
106 Key, HashFcn, EqualKey, Allocator
121 Key, HashFcn, EqualKey, Allocator
128 Key, HashFcn, EqualKey, Allocator
133 Key, HashFcn, EqualKey, Allocator
151 Key, HashFcn, EqualKey, Allocator
153 const unsigned int file_version
155 boost::serialization::split_free(ar, t, file_version);
168 const std::unordered_multimap<
169 Key, HashFcn, EqualKey, Allocator
175 std::unordered_multimap<
176 Key, HashFcn, EqualKey, Allocator
190 std::unordered_multimap<
191 Key, HashFcn, EqualKey, Allocator
197 std::unordered_multimap<
198 Key, HashFcn, EqualKey, Allocator
202 std::unordered_multimap<
203 Key, HashFcn, EqualKey, Allocator
220 std::unordered_multimap<
221 Key, HashFcn, EqualKey, Allocator
223 const unsigned int file_version
225 boost::serialization::split_free(ar, t, file_version);
231 #endif // BOOST_SERIALIZATION_UNORDERED_MAP_HPP
void save(Archive &ar, const std::unordered_map< Key, HashFcn, EqualKey, Allocator > &t, const unsigned int)
void load(Archive &ar, std::unordered_map< Key, HashFcn, EqualKey, Allocator > &t, const unsigned int)
void serialize(Archive &ar, std::unordered_map< Key, HashFcn, EqualKey, Allocator > &t, const unsigned int file_version)
void save_unordered_collection(Archive &ar, const Container &s)
void load_unordered_collection(Archive &ar, Container &s)