1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #ifndef BOOST_UNORDERED_DETAIL_SERIALIZATION_VERSION_HPP
- #define BOOST_UNORDERED_DETAIL_SERIALIZATION_VERSION_HPP
- #include <boost/config.hpp>
- #include <boost/core/serialization.hpp>
- namespace boost{
- namespace unordered{
- namespace detail{
- template<typename T>
- struct serialization_version
- {
- serialization_version():
- value(boost::serialization::version<serialization_version>::value){}
- serialization_version& operator=(unsigned int x){value=x;return *this;};
- operator unsigned int()const{return value;}
- private:
- friend class boost::serialization::access;
- template<class Archive>
- void serialize(Archive& ar,unsigned int version)
- {
- core::split_member(ar,*this,version);
- }
- template<class Archive>
- void save(Archive&,unsigned int)const{}
- template<class Archive>
- void load(Archive&,unsigned int version)
- {
- this->value=version;
- }
- unsigned int value;
- };
- }
- }
- namespace serialization{
- template<typename T>
- struct version<boost::unordered::detail::serialization_version<T> >
- {
- BOOST_STATIC_CONSTANT(int,value=version<T>::value);
- };
- }
- }
- #endif
|