1 #ifndef BOOST_SERIALIZATION_UNORDERED_MAP_HPP
2 #define BOOST_SERIALIZATION_UNORDERED_MAP_HPP
4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // serialization/unordered_map.hpp:
11 // serialization for stl unordered_map templates
13 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
14 // (C) Copyright 2014 Jim Bell
15 // Use, modification and distribution is subject to the Boost Software
16 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
17 // http://www.boost.org/LICENSE_1_0.txt)
19 // See http://www.boost.org for updates, documentation, and revision history.
21 #include <boost/config.hpp>
23 #include <unordered_map>
25 #include <boost/serialization/utility.hpp>
26 #include <boost/serialization/unordered_collections_save_imp.hpp>
27 #include <boost/serialization/unordered_collections_load_imp.hpp>
28 #include <boost/serialization/archive_input_unordered_map.hpp>
29 #include <boost/serialization/split_free.hpp>
32 namespace serialization {
43 const std::unordered_map<Key, HashFcn, EqualKey, Allocator> &t,
44 const unsigned int /*file_version*/
46 boost::serialization::stl::save_unordered_collection<
48 std::unordered_map<Key, HashFcn, EqualKey, Allocator>
61 std::unordered_map<Key, HashFcn, EqualKey, Allocator> &t,
62 const unsigned int /*file_version*/
64 boost::serialization::stl::load_unordered_collection<
66 std::unordered_map<Key, HashFcn, EqualKey, Allocator>,
67 boost::serialization::stl::archive_input_unordered_map<
69 std::unordered_map<Key, HashFcn, EqualKey, Allocator>
74 // split non-intrusive serialization function member into separate
75 // non intrusive save/load member functions
83 inline void serialize(
85 std::unordered_map<Key, HashFcn, EqualKey, Allocator> &t,
86 const unsigned int file_version
88 boost::serialization::split_free(ar, t, file_version);
101 const std::unordered_multimap<
102 Key, HashFcn, EqualKey, Allocator
104 const unsigned int /*file_version*/
106 boost::serialization::stl::save_unordered_collection<
108 std::unordered_multimap<Key, HashFcn, EqualKey, Allocator>
121 std::unordered_multimap<
122 Key, HashFcn, EqualKey, Allocator
124 const unsigned int /*file_version*/
126 boost::serialization::stl::load_unordered_collection<
128 std::unordered_multimap<
129 Key, HashFcn, EqualKey, Allocator
131 boost::serialization::stl::archive_input_unordered_multimap<
133 std::unordered_multimap<Key, HashFcn, EqualKey, Allocator>
138 // split non-intrusive serialization function member into separate
139 // non intrusive save/load member functions
147 inline void serialize(
149 std::unordered_multimap<
150 Key, HashFcn, EqualKey, Allocator
152 const unsigned int file_version
154 boost::serialization::split_free(ar, t, file_version);
157 } // namespace serialization
160 #endif // BOOST_SERIALIZATION_UNORDERED_MAP_HPP