File indexing completed on 2025-01-18 09:53:21
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_UNORDERED_DETAIL_SERIALIZATION_VERSION_HPP
0010 #define BOOST_UNORDERED_DETAIL_SERIALIZATION_VERSION_HPP
0011
0012 #include <boost/config.hpp>
0013 #include <boost/core/serialization.hpp>
0014
0015 namespace boost{
0016 namespace unordered{
0017 namespace detail{
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 template<typename T>
0029 struct serialization_version
0030 {
0031 serialization_version():
0032 value(boost::serialization::version<serialization_version>::value){}
0033
0034 serialization_version& operator=(unsigned int x){value=x;return *this;};
0035
0036 operator unsigned int()const{return value;}
0037
0038 private:
0039 friend class boost::serialization::access;
0040
0041 template<class Archive>
0042 void serialize(Archive& ar,unsigned int version)
0043 {
0044 core::split_member(ar,*this,version);
0045 }
0046
0047 template<class Archive>
0048 void save(Archive&,unsigned int)const{}
0049
0050 template<class Archive>
0051 void load(Archive&,unsigned int version)
0052 {
0053 this->value=version;
0054 }
0055
0056 unsigned int value;
0057 };
0058
0059 }
0060 }
0061
0062 namespace serialization{
0063
0064 template<typename T>
0065 struct version<boost::unordered::detail::serialization_version<T> >
0066 {
0067 BOOST_STATIC_CONSTANT(int,value=version<T>::value);
0068 };
0069
0070 }
0071
0072 }
0073
0074 #endif