1 // Boost version.hpp configuration header file ------------------------------// |
1 #ifndef BOOST_SERIALIZATION_VERSION_HPP |
|
2 #define BOOST_SERIALIZATION_VERSION_HPP |
2 |
3 |
3 // (C) Copyright John maddock 1999. Distributed under the Boost |
4 // MS compatible compilers support #pragma once |
4 // Software License, Version 1.0. (See accompanying file |
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020) |
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
6 # pragma once |
6 |
|
7 // See http://www.boost.org/libs/config for documentation |
|
8 |
|
9 #ifndef BOOST_VERSION_HPP |
|
10 #define BOOST_VERSION_HPP |
|
11 |
|
12 // |
|
13 // Caution, this is the only boost header that is guarenteed |
|
14 // to change with every boost release, including this header |
|
15 // will cause a recompile every time a new boost version is |
|
16 // released. |
|
17 // |
|
18 // BOOST_VERSION % 100 is the sub-minor version |
|
19 // BOOST_VERSION / 100 % 1000 is the minor version |
|
20 // BOOST_VERSION / 100000 is the major version |
|
21 |
|
22 #define BOOST_VERSION 103400 |
|
23 |
|
24 // |
|
25 // BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION |
|
26 // but as a *string* in the form "x_y" where x is the major version |
|
27 // number and y is the minor version number. This is used by |
|
28 // <config/auto_link.hpp> to select which library version to link to. |
|
29 |
|
30 #define BOOST_LIB_VERSION "1_34" |
|
31 |
|
32 #endif |
7 #endif |
33 |
8 |
|
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 |
|
10 // version.hpp: |
34 |
11 |
|
12 // (C) Copyright 2002 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) |
35 |
16 |
|
17 // See http://www.boost.org for updates, documentation, and revision history. |
|
18 |
|
19 #include <boost/config.hpp> |
|
20 #include <boost/mpl/int.hpp> |
|
21 #include <boost/mpl/eval_if.hpp> |
|
22 #include <boost/mpl/identity.hpp> |
|
23 #include <boost/mpl/integral_c_tag.hpp> |
|
24 |
|
25 #include <boost/type_traits/is_base_and_derived.hpp> |
|
26 //#include <boost/serialization/traits.hpp> |
|
27 |
|
28 namespace boost { |
|
29 namespace serialization { |
|
30 |
|
31 struct basic_traits; |
|
32 |
|
33 // default version number is 0. Override with higher version |
|
34 // when class definition changes. |
|
35 template<class T> |
|
36 struct version |
|
37 { |
|
38 template<class U> |
|
39 struct traits_class_version { |
|
40 typedef BOOST_DEDUCED_TYPENAME U::version type; |
|
41 }; |
|
42 |
|
43 typedef mpl::integral_c_tag tag; |
|
44 // note: at least one compiler complained w/o the full qualification |
|
45 // on basic traits below |
|
46 typedef |
|
47 BOOST_DEDUCED_TYPENAME mpl::eval_if< |
|
48 is_base_and_derived<boost::serialization::basic_traits,T>, |
|
49 traits_class_version<T>, |
|
50 mpl::int_<0> |
|
51 >::type type; |
|
52 BOOST_STATIC_CONSTANT(unsigned int, value = version::type::value); |
|
53 }; |
|
54 |
|
55 } // namespace serialization |
|
56 } // namespace boost |
|
57 |
|
58 // specify the current version number for the class |
|
59 #define BOOST_CLASS_VERSION(T, N) \ |
|
60 namespace boost { \ |
|
61 namespace serialization { \ |
|
62 template<> \ |
|
63 struct version<T > \ |
|
64 { \ |
|
65 typedef mpl::int_<N> type; \ |
|
66 typedef mpl::integral_c_tag tag; \ |
|
67 BOOST_STATIC_CONSTANT(unsigned int, value = version::type::value); \ |
|
68 /* require that class info saved when versioning is used */ \ |
|
69 /* \ |
|
70 BOOST_STATIC_ASSERT(( \ |
|
71 mpl::or_< \ |
|
72 mpl::equal_to< \ |
|
73 mpl::int_<0>, \ |
|
74 mpl::int_<N> \ |
|
75 >, \ |
|
76 mpl::equal_to< \ |
|
77 implementation_level<T>, \ |
|
78 mpl::int_<object_class_info> \ |
|
79 > \ |
|
80 >::value \ |
|
81 )); \ |
|
82 */ \ |
|
83 }; \ |
|
84 } \ |
|
85 } |
|
86 |
|
87 #endif // BOOST_SERIALIZATION_VERSION_HPP |