1 #ifndef BOOST_SERIALIZATION_LIBRARY_VERSION_TYPE_HPP
2 #define BOOST_SERIALIZATION_LIBRARY_VERSION_TYPE_HPP
4 // MS compatible compilers support #pragma once
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // library_version_type.hpp:
12 // (C) Copyright 2002-2020 Robert Ramey - http://www.rrsd.com .
13 // Use, modification and distribution is subject to the Boost Software
14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
17 // See http://www.boost.org for updates, documentation, and revision history.
18 #include <cstring> // count
19 #include <boost/cstdint.hpp> // uint_least16_t
20 #include <boost/assert.hpp>
21 #include <boost/config.hpp>
22 #include <boost/integer_traits.hpp>
25 namespace serialization {
28 #pragma warning( push )
29 #pragma warning( disable : 4244 4267 )
32 /* NOTE : Warning : Warning : Warning : Warning : Warning
33 * Don't ever changes this. If you do, they previously created
34 * binary archives won't be readable !!!
36 class library_version_type {
38 typedef uint_least16_t base_type;
41 library_version_type(): t(0) {}
42 explicit library_version_type(const unsigned int & t_) : t(t_){
43 BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max);
45 library_version_type(const library_version_type & t_) :
48 library_version_type & operator=(const library_version_type & rhs){
52 // used for text output
53 operator base_type () const {
56 // used for text input
57 operator base_type & (){
60 bool operator==(const library_version_type & rhs) const {
63 bool operator<(const library_version_type & rhs) const {
71 #endif // BOOST_SERIALIZATION_LIBRARY_VERSION_TYPE_HPP