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