Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63779 - branches/release/boost/serialization
From: ramey_at_[hidden]
Date: 2010-07-09 12:50:06


Author: ramey
Date: 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
New Revision: 63779
URL: http://svn.boost.org/trac/boost/changeset/63779

Log:
Merge to release
Added:
   branches/release/boost/serialization/item_version_type.hpp
      - copied unchanged from r63777, /trunk/boost/serialization/item_version_type.hpp
Properties modified:
   branches/release/boost/serialization/ (props changed)
   branches/release/boost/serialization/factory.hpp (props changed)
Text files modified:
   branches/release/boost/serialization/collection_size_type.hpp | 46 ++++++++++++++++++++++++++++++++++++--
   branches/release/boost/serialization/collections_load_imp.hpp | 19 +++++++++------
   branches/release/boost/serialization/collections_save_imp.hpp | 42 +++++++++++++++++++----------------
   branches/release/boost/serialization/config.hpp | 5 +++
   branches/release/boost/serialization/extended_type_info.hpp | 6 ++--
   branches/release/boost/serialization/extended_type_info_no_rtti.hpp | 1
   branches/release/boost/serialization/extended_type_info_typeid.hpp | 1
   branches/release/boost/serialization/force_include.hpp | 2 +
   branches/release/boost/serialization/hash_collections_load_imp.hpp | 35 ++++++++++++++++++++++------
   branches/release/boost/serialization/hash_collections_save_imp.hpp | 47 +++++++++++++++++++++++++++++++++------
   branches/release/boost/serialization/optional.hpp | 28 +++++++++++++++++-----
   branches/release/boost/serialization/serialization.hpp | 6 ----
   branches/release/boost/serialization/shared_ptr.hpp | 4 +-
   branches/release/boost/serialization/slist.hpp | 16 +++++++-----
   branches/release/boost/serialization/vector.hpp | 2
   branches/release/boost/serialization/version.hpp | 18 +++++++-------
   branches/release/boost/serialization/void_cast.hpp | 10 +++++++
   17 files changed, 206 insertions(+), 82 deletions(-)

Modified: branches/release/boost/serialization/collection_size_type.hpp
==============================================================================
--- branches/release/boost/serialization/collection_size_type.hpp (original)
+++ branches/release/boost/serialization/collection_size_type.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -6,15 +6,55 @@
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
+#include <cstddef> // size_t
 #include <boost/serialization/strong_typedef.hpp>
 #include <boost/serialization/level.hpp>
+#include <boost/serialization/split_free.hpp>
 
-namespace boost { namespace serialization {
+namespace boost {
+namespace serialization {
+
+//BOOST_STRONG_TYPEDEF(std::size_t, collection_size_type)
+
+class collection_size_type {
+private:
+ typedef std::size_t base_type;
+ base_type t;
+public:
+ collection_size_type(): t(0) {};
+ explicit collection_size_type(const std::size_t & t_) :
+ t(t_)
+ {}
+ collection_size_type(const collection_size_type & t_) :
+ t(t_.t)
+ {}
+ collection_size_type & operator=(const collection_size_type & rhs){
+ t = rhs.t;
+ return *this;
+ }
+ collection_size_type & operator=(const unsigned int & rhs){
+ t = rhs;
+ return *this;
+ }
+ // used for text output
+ operator const base_type () const {
+ return t;
+ }
+ // used for text input
+ operator base_type & () {
+ return t;
+ }
+ bool operator==(const collection_size_type & rhs) const {
+ return t == rhs.t;
+ }
+ bool operator<(const collection_size_type & rhs) const {
+ return t < rhs.t;
+ }
+};
 
-BOOST_STRONG_TYPEDEF(std::size_t, collection_size_type)
 
 } } // end namespace boost::serialization
 
-BOOST_CLASS_IMPLEMENTATION(boost::serialization::collection_size_type, primitive_type)
+BOOST_CLASS_IMPLEMENTATION(collection_size_type, primitive_type)
 
 #endif //BOOST_SERIALIZATION_COLLECTION_SIZE_TYPE_HPP

Modified: branches/release/boost/serialization/collections_load_imp.hpp
==============================================================================
--- branches/release/boost/serialization/collections_load_imp.hpp (original)
+++ branches/release/boost/serialization/collections_load_imp.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -32,11 +32,12 @@
 #endif
 #include <boost/detail/workaround.hpp>
 
+#include <boost/archive/detail/basic_iarchive.hpp>
 #include <boost/serialization/access.hpp>
 #include <boost/serialization/nvp.hpp>
 #include <boost/serialization/detail/stack_constructor.hpp>
 #include <boost/serialization/collection_size_type.hpp>
-
+#include <boost/serialization/item_version_type.hpp>
 
 namespace boost{
 namespace serialization {
@@ -137,21 +138,23 @@
 inline void load_collection(Archive & ar, Container &s)
 {
     s.clear();
- // retrieve number of elements
     collection_size_type count;
- unsigned int item_version;
+ const boost::archive::library_version_type library_version(
+ ar.get_library_version()
+ );
+ // retrieve number of elements
+ item_version_type item_version(0);
     ar >> BOOST_SERIALIZATION_NVP(count);
- if(3 < ar.get_library_version())
+ if(boost::archive::library_version_type(3) < library_version){
         ar >> BOOST_SERIALIZATION_NVP(item_version);
- else
- item_version = 0;
+ }
+
     R rx;
     rx(s, count);
- std::size_t c = count;
     InputFunction ifunc;
     BOOST_DEDUCED_TYPENAME Container::iterator hint;
     hint = s.begin();
- while(c-- > 0){
+ while(count-- > 0){
         hint = ifunc(ar, s, item_version, hint);
     }
 }

Modified: branches/release/boost/serialization/collections_save_imp.hpp
==============================================================================
--- branches/release/boost/serialization/collections_save_imp.hpp (original)
+++ branches/release/boost/serialization/collections_save_imp.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -23,6 +23,7 @@
 #include <boost/serialization/serialization.hpp>
 #include <boost/serialization/version.hpp>
 #include <boost/serialization/collection_size_type.hpp>
+#include <boost/serialization/item_version_type.hpp>
 
 namespace boost{
 namespace serialization {
@@ -36,27 +37,30 @@
 inline void save_collection(Archive & ar, const Container &s)
 {
     // record number of elements
- collection_size_type const count(s.size());
- ar << BOOST_SERIALIZATION_NVP(count);
- // make sure the target type is registered so we can retrieve
- // the version when we load
- if(3 < ar.get_library_version()){
- const unsigned int item_version = version<
- BOOST_DEDUCED_TYPENAME Container::value_type
- >::value;
+ collection_size_type count(s.size());
+ const item_version_type item_version(
+ version<BOOST_DEDUCED_TYPENAME Container::value_type>::value
+ );
+ ar << BOOST_SERIALIZATION_NVP(count);
+ #if 0
+ boost::archive::library_version_type library_version(
+ ar.get_library_version()
+ );
+ if(boost::archive::library_version_type(3) < library_version){
+ ar << BOOST_SERIALIZATION_NVP(item_version);
+ }
+ #else
         ar << BOOST_SERIALIZATION_NVP(item_version);
- }
+ #endif
+
     BOOST_DEDUCED_TYPENAME Container::const_iterator it = s.begin();
- collection_size_type c=count;
- while(c-- > 0){
- // note borland emits a no-op without the explicit namespace
- boost::serialization::save_construct_data_adl(
- ar,
- &(*it),
- boost::serialization::version<
- BOOST_DEDUCED_TYPENAME Container::value_type
- >::value
- );
+ while(count-- > 0){
+ // note borland emits a no-op without the explicit namespace
+ boost::serialization::save_construct_data_adl(
+ ar,
+ &(*it),
+ item_version
+ );
         ar << boost::serialization::make_nvp("item", *it++);
     }
 }

Modified: branches/release/boost/serialization/config.hpp
==============================================================================
--- branches/release/boost/serialization/config.hpp (original)
+++ branches/release/boost/serialization/config.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -1,4 +1,5 @@
-// note lack of include guards. This is intentional
+#ifndef BOOST_SERIALIZATION_CONFIG_HPP
+#define BOOST_SERIALIZATION_CONFIG_HPP
 
 // config.hpp ---------------------------------------------//
 
@@ -80,3 +81,5 @@
     #include <boost/config/auto_link.hpp>
 
 #endif
+
+#endif // BOOST_SERIALIZATION_CONFIG_HPP

Modified: branches/release/boost/serialization/extended_type_info.hpp
==============================================================================
--- branches/release/boost/serialization/extended_type_info.hpp (original)
+++ branches/release/boost/serialization/extended_type_info.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -23,9 +23,9 @@
 #include <cstddef> // NULL
 #include <boost/config.hpp>
 #include <boost/noncopyable.hpp>
-#include <boost/serialization/config.hpp>
 #include <boost/mpl/bool.hpp>
 
+#include <boost/serialization/config.hpp>
 #include <boost/config/abi_prefix.hpp> // must be the last header
 #ifdef BOOST_MSVC
 # pragma warning(push)
@@ -62,8 +62,8 @@
     // common functionality for all type_info replacement
     // systems. Hence, make these protected
     extended_type_info(
- const unsigned int type_info_key,
- const char * key
+ const unsigned int type_info_key,
+ const char * key
     );
     // account for bogus gcc warning
     #if defined(__GNUC__)

Modified: branches/release/boost/serialization/extended_type_info_no_rtti.hpp
==============================================================================
--- branches/release/boost/serialization/extended_type_info_no_rtti.hpp (original)
+++ branches/release/boost/serialization/extended_type_info_no_rtti.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -32,6 +32,7 @@
 #include <boost/serialization/factory.hpp>
 #include <boost/serialization/throw_exception.hpp>
 
+#include <boost/serialization/config.hpp>
 // hijack serialization access
 #include <boost/serialization/access.hpp>
 

Modified: branches/release/boost/serialization/extended_type_info_typeid.hpp
==============================================================================
--- branches/release/boost/serialization/extended_type_info_typeid.hpp (original)
+++ branches/release/boost/serialization/extended_type_info_typeid.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -28,6 +28,7 @@
 #include <boost/type_traits/is_polymorphic.hpp>
 #include <boost/type_traits/remove_const.hpp>
 
+#include <boost/serialization/config.hpp>
 #include <boost/serialization/singleton.hpp>
 #include <boost/serialization/extended_type_info.hpp>
 #include <boost/serialization/factory.hpp>

Modified: branches/release/boost/serialization/force_include.hpp
==============================================================================
--- branches/release/boost/serialization/force_include.hpp (original)
+++ branches/release/boost/serialization/force_include.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -41,6 +41,8 @@
 # define BOOST_DLLEXPORT __declspec(dllexport)
 # elif defined(__GNUC__) && (__GNUC__ >= 3)
 # define BOOST_USED __attribute__ ((used))
+# elif defined(__IBMCPP__) && (__IBMCPP__ >= 1110)
+# define BOOST_USED __attribute__ ((used))
 # elif defined(__INTEL_COMPILER) && (BOOST_INTEL_CXX_VERSION >= 800)
 # define BOOST_USED __attribute__ ((used))
 # endif

Modified: branches/release/boost/serialization/hash_collections_load_imp.hpp
==============================================================================
--- branches/release/boost/serialization/hash_collections_load_imp.hpp (original)
+++ branches/release/boost/serialization/hash_collections_load_imp.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -19,8 +19,10 @@
 
 // helper function templates for serialization of hashed collections
 #include <boost/config.hpp>
+#include <boost/archive/detail/basic_iarchive.hpp>
 #include <boost/serialization/nvp.hpp>
-//#include <boost/serialization/collections_load_imp.hpp>
+#include <boost/serialization/collection_size_type.hpp>
+#include <boost/serialization/item_version_type.hpp>
 
 namespace boost{
 namespace serialization {
@@ -33,14 +35,31 @@
 inline void load_hash_collection(Archive & ar, Container &s)
 {
     s.clear();
+ collection_size_type count;
+ collection_size_type bucket_count;
+ boost::serialization::item_version_type item_version(0);
+ boost::archive::library_version_type library_version(
+ ar.get_library_version()
+ );
     // retrieve number of elements
- unsigned int count;
- unsigned int item_version(0);
- unsigned int bucket_count;;
- ar >> BOOST_SERIALIZATION_NVP(count);
- if(3 < ar.get_library_version()){
- ar >> BOOST_SERIALIZATION_NVP(bucket_count);
- ar >> BOOST_SERIALIZATION_NVP(item_version);
+ if(boost::archive::library_version_type(6) != library_version){
+ ar >> BOOST_SERIALIZATION_NVP(count);
+ ar >> BOOST_SERIALIZATION_NVP(bucket_count);
+ }
+ else{
+ // note: fixup for error in version 6. collection size was
+ // changed to size_t BUT for hashed collections it was implemented
+ // as an unsigned int. This should be a problem only on win64 machines
+ // but I'll leave it for everyone just in case.
+ unsigned int c;
+ unsigned int bc;
+ ar >> BOOST_SERIALIZATION_NVP(c);
+ count = c;
+ ar >> BOOST_SERIALIZATION_NVP(bc);
+ bucket_count = bc;
+ }
+ if(boost::archive::library_version_type(3) < library_version){
+ ar >> BOOST_SERIALIZATION_NVP(item_version);
     }
     #if ! defined(__MWERKS__)
     s.resize(bucket_count);

Modified: branches/release/boost/serialization/hash_collections_save_imp.hpp
==============================================================================
--- branches/release/boost/serialization/hash_collections_save_imp.hpp (original)
+++ branches/release/boost/serialization/hash_collections_save_imp.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -22,6 +22,8 @@
 #include <boost/serialization/nvp.hpp>
 #include <boost/serialization/serialization.hpp>
 #include <boost/serialization/version.hpp>
+#include <boost/serialization/collection_size_type.hpp>
+#include <boost/serialization/item_version_type.hpp>
 
 namespace boost{
 namespace serialization {
@@ -34,17 +36,46 @@
 template<class Archive, class Container>
 inline void save_hash_collection(Archive & ar, const Container &s)
 {
- // record number of elements
- unsigned int count = s.size();
- ar << BOOST_SERIALIZATION_NVP(count);
- // make sure the target type is registered so we can retrieve
- // the version when we load
- if(3 < ar.get_library_version()){
- const unsigned int bucket_count = s.bucket_count();
+ collection_size_type count(s.size());
+ const collection_size_type bucket_count(s.bucket_count());
+ const item_version_type item_version(
+ version<BOOST_DEDUCED_TYPENAME Container::value_type>::value
+ );
+
+ #if 0
+ /* should only be necessary to create archives of previous versions
+ * which is not currently supported. So for now comment this out
+ */
+ boost::archive::library_version_type library_version(
+ ar.get_library_version()
+ );
+ // retrieve number of elements
+ if(boost::archive::library_version_type(6) != library_version){
+ ar << BOOST_SERIALIZATION_NVP(count);
         ar << BOOST_SERIALIZATION_NVP(bucket_count);
- const unsigned int item_version = version<BOOST_DEDUCED_TYPENAME Container::value_type>::value;
+ }
+ else{
+ // note: fixup for error in version 6. collection size was
+ // changed to size_t BUT for hashed collections it was implemented
+ // as an unsigned int. This should be a problem only on win64 machines
+ // but I'll leave it for everyone just in case.
+ const unsigned int c = count;
+ const unsigned int bc = bucket_count;
+ ar << BOOST_SERIALIZATION_NVP(c);
+ ar << BOOST_SERIALIZATION_NVP(bc);
+ }
+ if(boost::archive::library_version_type(3) < library_version){
+ // record number of elements
+ // make sure the target type is registered so we can retrieve
+ // the version when we load
         ar << BOOST_SERIALIZATION_NVP(item_version);
     }
+ #else
+ ar << BOOST_SERIALIZATION_NVP(count);
+ ar << BOOST_SERIALIZATION_NVP(bucket_count);
+ ar << BOOST_SERIALIZATION_NVP(item_version);
+ #endif
+
     BOOST_DEDUCED_TYPENAME Container::const_iterator it = s.begin();
     while(count-- > 0){
         // note borland emits a no-op without the explicit namespace

Modified: branches/release/boost/serialization/optional.hpp
==============================================================================
--- branches/release/boost/serialization/optional.hpp (original)
+++ branches/release/boost/serialization/optional.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -16,7 +16,10 @@
 
 #include <boost/config.hpp>
 
+#include <boost/archive/detail/basic_iarchive.hpp>
+
 #include <boost/optional.hpp>
+#include <boost/serialization/item_version_type.hpp>
 #include <boost/serialization/split_free.hpp>
 #include <boost/serialization/level.hpp>
 #include <boost/serialization/nvp.hpp>
@@ -37,10 +40,17 @@
     const bool tflag = t.is_initialized();
     ar << boost::serialization::make_nvp("initialized", tflag);
     if (tflag){
- if(3 < ar.get_library_version()){
- const int v = version<T>::value;
- ar << boost::serialization::make_nvp("item_version", v);
+ const boost::serialization::item_version_type item_version(version<T>::value);
+ #if 0
+ const boost::archive::library_version_type library_version(
+ ar.get_library_version()
+ };
+ if(boost::archive::library_version_type(3) < library_version){
+ ar << BOOST_SERIALIZATION_NVP(item_version);
         }
+ #else
+ ar << BOOST_SERIALIZATION_NVP(item_version);
+ #endif
         ar << boost::serialization::make_nvp("value", *t);
     }
 }
@@ -54,11 +64,15 @@
     bool tflag;
     ar >> boost::serialization::make_nvp("initialized", tflag);
     if (tflag){
- unsigned int v = 0;
- if(3 < ar.get_library_version()){
- ar >> boost::serialization::make_nvp("item_version", v);
+ boost::serialization::item_version_type item_version(0);
+ boost::archive::library_version_type library_version(
+ ar.get_library_version()
+ );
+ if(boost::archive::library_version_type(3) < library_version){
+ // item_version is handled as an attribute so it doesnt need an NVP
+ ar >> BOOST_SERIALIZATION_NVP(item_version);
         }
- detail::stack_construct<Archive, T> aux(ar, v);
+ detail::stack_construct<Archive, T> aux(ar, item_version);
         ar >> boost::serialization::make_nvp("value", aux.reference());
         t.reset(aux.reference());
     }

Modified: branches/release/boost/serialization/serialization.hpp
==============================================================================
--- branches/release/boost/serialization/serialization.hpp (original)
+++ branches/release/boost/serialization/serialization.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -11,13 +11,9 @@
 #endif
 
 #include <boost/config.hpp>
+#include <boost/archive/basic_archive.hpp>
 #include <boost/serialization/strong_typedef.hpp>
 #include <boost/serialization/pfto.hpp>
-#include <boost/serialization/throw_exception.hpp>
-#include <boost/serialization/nvp.hpp>
-
-// incremented for each "release"
-#define BOOST_SERIALIZATION_LIBRARY_VERSION 19
 
 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
 // serialization.hpp: interface for serialization system.

Modified: branches/release/boost/serialization/shared_ptr.hpp
==============================================================================
--- branches/release/boost/serialization/shared_ptr.hpp (original)
+++ branches/release/boost/serialization/shared_ptr.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -47,9 +47,9 @@
             typedef mpl::int_<1> type;
             #endif
             #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570))
- BOOST_STATIC_CONSTANT(unsigned int, value = 1);
+ BOOST_STATIC_CONSTANT(int, value = 1);
             #else
- BOOST_STATIC_CONSTANT(unsigned int, value = type::value);
+ BOOST_STATIC_CONSTANT(int, value = type::value);
             #endif
         };
         // don't track shared pointers

Modified: branches/release/boost/serialization/slist.hpp
==============================================================================
--- branches/release/boost/serialization/slist.hpp (original)
+++ branches/release/boost/serialization/slist.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -58,19 +58,21 @@
     // retrieve number of elements
     collection_size_type count;
     ar >> BOOST_SERIALIZATION_NVP(count);
- if(std::size_t(0) == count)
+ if(collection_size_type(0) == count)
         return;
- unsigned int v;
- if(3 < ar.get_library_version()){
- ar >> boost::serialization::make_nvp("item_version", v);
+ item_version_type item_version(0);
+ const boost::archive::library_version_type library_version(
+ ar.get_library_version()
+ );
+ if(boost::archive::library_version_type(3) < library_version){
+ ar >> BOOST_SERIALIZATION_NVP(item_version);
     }
- boost::serialization::detail::stack_construct<Archive, U> u(ar, v);
+ boost::serialization::detail::stack_construct<Archive, U> u(ar, item_version);
     ar >> boost::serialization::make_nvp("item", u.reference());
     t.push_front(u.reference());
     BOOST_DEDUCED_TYPENAME BOOST_STD_EXTENSION_NAMESPACE::slist<U, Allocator>::iterator last;
     last = t.begin();
- collection_size_type c = count;
- while(--c > 0){
+ while(--count > 0){
         boost::serialization::detail::stack_construct<Archive, U>
             u(ar, file_version);
         ar >> boost::serialization::make_nvp("item", u.reference());

Modified: branches/release/boost/serialization/vector.hpp
==============================================================================
--- branches/release/boost/serialization/vector.hpp (original)
+++ branches/release/boost/serialization/vector.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -127,7 +127,7 @@
     const unsigned int file_version
 ){
 #ifdef BOOST_SERIALIZATION_VECTOR_135_HPP
- if (ar.get_library_version()==5)
+ if (ar.get_library_version()==boost::archive::library_version_type(5))
     {
       load(ar,t,file_version, boost::is_arithmetic<U>());
       return;

Modified: branches/release/boost/serialization/version.hpp
==============================================================================
--- branches/release/boost/serialization/version.hpp (original)
+++ branches/release/boost/serialization/version.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -17,6 +17,7 @@
 // See http://www.boost.org for updates, documentation, and revision history.
 
 #include <boost/config.hpp>
+#include <boost/mpl/assert.hpp>
 #include <boost/mpl/int.hpp>
 #include <boost/mpl/eval_if.hpp>
 #include <boost/mpl/identity.hpp>
@@ -66,19 +67,12 @@
 //#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<> \
@@ -86,9 +80,15 @@
 { \
     typedef mpl::int_<N> type; \
     typedef mpl::integral_c_tag tag; \
- BOOST_STATIC_CONSTANT(unsigned int, value = version::type::value); \
+ BOOST_STATIC_CONSTANT(int, value = version::type::value); \
+ BOOST_MPL_ASSERT(( \
+ boost::mpl::less< \
+ boost::mpl::int_<N>, \
+ boost::mpl::int_<256> \
+ > \
+ )); \
     /* \
- BOOST_STATIC_ASSERT(( \
+ BOOST_MPL_ASSERT(( \
         mpl::equal_to< \
             :implementation_level<T >, \
             mpl::int_<object_class_info> \

Modified: branches/release/boost/serialization/void_cast.hpp
==============================================================================
--- branches/release/boost/serialization/void_cast.hpp (original)
+++ branches/release/boost/serialization/void_cast.hpp 2010-07-09 12:50:03 EDT (Fri, 09 Jul 2010)
@@ -18,9 +18,9 @@
 // See http://www.boost.org for updates, documentation, and revision history.
 
 #include <cstddef> // for ptrdiff_t
+#include <boost/config.hpp>
 #include <boost/noncopyable.hpp>
 
-#include <boost/serialization/config.hpp>
 #include <boost/serialization/smart_cast.hpp>
 #include <boost/serialization/singleton.hpp>
 #include <boost/serialization/force_include.hpp>
@@ -29,6 +29,7 @@
 #include <boost/type_traits/is_virtual_base_of.hpp>
 #include <boost/serialization/void_cast_fwd.hpp>
 
+#include <boost/serialization/config.hpp>
 #include <boost/config/abi_prefix.hpp> // must be the last header
 
 #ifdef BOOST_MSVC
@@ -108,6 +109,7 @@
 protected:
     void recursive_register(bool includes_virtual_base = false) const;
     void recursive_unregister() const;
+ virtual bool has_virtual_base() const = 0;
 public:
     // Data members
     const extended_type_info * m_derived;
@@ -166,6 +168,9 @@
             );
         return b;
     }
+ virtual bool has_virtual_base() const {
+ return false;
+ }
 public:
     void_caster_primitive();
     virtual ~void_caster_primitive();
@@ -197,6 +202,9 @@
 class void_caster_virtual_base :
     public void_caster
 {
+ virtual bool has_virtual_base() const {
+ return true;
+ }
 public:
     virtual void const * downcast(void const * const t) const {
         const Derived * d =


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