Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60270 - trunk/boost/serialization
From: ramey_at_[hidden]
Date: 2010-03-06 21:38:53


Author: ramey
Date: 2010-03-06 21:38:52 EST (Sat, 06 Mar 2010)
New Revision: 60270
URL: http://svn.boost.org/trac/boost/changeset/60270

Log:
Limit class versions to 8 bits
Text files modified:
   trunk/boost/serialization/version.hpp | 12 +++++++++++-
   1 files changed, 11 insertions(+), 1 deletions(-)

Modified: trunk/boost/serialization/version.hpp
==============================================================================
--- trunk/boost/serialization/version.hpp (original)
+++ trunk/boost/serialization/version.hpp 2010-03-06 21:38:52 EST (Sat, 06 Mar 2010)
@@ -23,7 +23,6 @@
 #include <boost/mpl/integral_c_tag.hpp>
 
 #include <boost/type_traits/is_base_and_derived.hpp>
-//#include <boost/serialization/traits.hpp>
 
 namespace boost {
 namespace serialization {
@@ -67,8 +66,19 @@
 //#include <boost/serialization/level.hpp>
 //#include <boost/mpl/equal_to.hpp>
 
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/comparison.hpp>
+
 // specify the current version number for the class
+// version numbers limited to 8 bits !!!
 #define BOOST_CLASS_VERSION(T, N) \
+BOOST_MPL_ASSERT(( \
+ boost::mpl::less< \
+ boost::mpl::int_<N>, \
+ boost::mpl::int_<256> \
+ > \
+)); \
 namespace boost { \
 namespace serialization { \
 template<> \


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk