1 #ifndef BOOST_SERIALIZATION_UNORDERED_COLLECTIONS_LOAD_IMP_HPP 2 #define BOOST_SERIALIZATION_UNORDERED_COLLECTIONS_LOAD_IMP_HPP 5 #if defined(_MSC_VER) && (_MSC_VER >= 1020) 7 # pragma warning (disable : 4786) // too long name, harmless warning 21 #include <boost/config.hpp> 22 #include <boost/archive/detail/basic_iarchive.hpp> 23 #include <boost/serialization/nvp.hpp> 24 #include <boost/serialization/collection_size_type.hpp> 25 #include <boost/serialization/item_version_type.hpp> 28 namespace serialization {
34 template<
class Archive,
class Container,
class InputFunction>
38 collection_size_type count;
39 collection_size_type bucket_count;
40 boost::serialization::item_version_type item_version(0);
41 boost::archive::library_version_type library_version(
42 ar.get_library_version()
45 ar >> BOOST_SERIALIZATION_NVP(count);
46 ar >> BOOST_SERIALIZATION_NVP(bucket_count);
47 if(boost::archive::library_version_type(3) < library_version){
48 ar >> BOOST_SERIALIZATION_NVP(item_version);
50 s.rehash(bucket_count);
53 ifunc(ar, s, item_version);
61 #endif //BOOST_SERIALIZATION_UNORDERED_COLLECTIONS_LOAD_IMP_HPP
void load_unordered_collection(Archive &ar, Container &s)