Boost logo

Boost-Commit :

From: ramey_at_[hidden]
Date: 2007-12-22 20:59:05


Author: ramey
Date: 2007-12-22 20:59:04 EST (Sat, 22 Dec 2007)
New Revision: 42254
URL: http://svn.boost.org/trac/boost/changeset/42254

Log:
Corrections to address TRAK tickets
Text files modified:
   branches/serialization_next_release/boost/boost/serialization/export.hpp | 4 +++-
   branches/serialization_next_release/boost/boost/serialization/extended_type_info.hpp | 2 ++
   branches/serialization_next_release/boost/boost/serialization/extended_type_info_no_rtti.hpp | 2 +-
   branches/serialization_next_release/boost/boost/serialization/extended_type_info_typeid.hpp | 11 ++++++-----
   branches/serialization_next_release/boost/boost/serialization/is_abstract.hpp | 2 +-
   branches/serialization_next_release/boost/boost/serialization/optional.hpp | 1 +
   branches/serialization_next_release/boost/boost/serialization/void_cast.hpp | 12 ++++++++----
   branches/serialization_next_release/boost/boost/serialization/weak_ptr.hpp | 4 ++--
   8 files changed, 24 insertions(+), 14 deletions(-)

Modified: branches/serialization_next_release/boost/boost/serialization/export.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/export.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/export.hpp 2007-12-22 20:59:04 EST (Sat, 22 Dec 2007)
@@ -29,6 +29,9 @@
 #include <boost/preprocessor/stringize.hpp>
 #include <boost/type_traits/is_polymorphic.hpp>
 
+#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
+ #include <boost/serialization/extended_type_info_typeid.hpp>
+#endif
 #include <boost/serialization/type_info_implementation.hpp>
 #include <boost/serialization/is_abstract.hpp>
 #include <boost/serialization/force_include.hpp>
@@ -103,7 +106,6 @@
 template <class Archive, class Serializable>
 BOOST_DLLEXPORT void ptr_serialization_support<Archive,Serializable>::instantiate()
 {
-
     export_impl<Archive,Serializable>::enable_save(
         BOOST_DEDUCED_TYPENAME Archive::is_saving()
     );

Modified: branches/serialization_next_release/boost/boost/serialization/extended_type_info.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/extended_type_info.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/extended_type_info.hpp 2007-12-22 20:59:04 EST (Sat, 22 Dec 2007)
@@ -19,6 +19,7 @@
 // for now, extended type info is part of the serialization libraries
 // this could change in the future.
 #include <cstdarg>
+#include <cassert>
 #include <boost/config.hpp>
 #include <boost/serialization/config.hpp>
 
@@ -89,6 +90,7 @@
 #ifdef BOOST_MSVC
 #pragma warning(pop)
 #endif
+
 #include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_SERIALIZATION_EXTENDED_TYPE_INFO_HPP

Modified: branches/serialization_next_release/boost/boost/serialization/extended_type_info_no_rtti.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/extended_type_info_no_rtti.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/extended_type_info_no_rtti.hpp 2007-12-22 20:59:04 EST (Sat, 22 Dec 2007)
@@ -122,7 +122,7 @@
 #endif
 
 #ifdef BOOST_MSVC
-#pragma warning(pop)
+# pragma warning(pop)
 #endif
 #include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 

Modified: branches/serialization_next_release/boost/boost/serialization/extended_type_info_typeid.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/extended_type_info_typeid.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/extended_type_info_typeid.hpp 2007-12-22 20:59:04 EST (Sat, 22 Dec 2007)
@@ -26,6 +26,7 @@
 #include <boost/static_assert.hpp>
 #include <boost/static_warning.hpp>
 #include <boost/type_traits/is_polymorphic.hpp>
+#include <boost/type_traits/remove_const.hpp>
 
 #include <boost/serialization/singleton.hpp>
 #include <boost/serialization/extended_type_info.hpp>
@@ -98,15 +99,15 @@
         va_start(ap, count);
         switch(count){
         case 0:
- return factory<T, 0>(ap);
+ return factory<boost::remove_const<T>, 0>(ap);
         case 1:
- return factory<T, 1>(ap);
+ return factory<boost::remove_const<T>, 1>(ap);
         case 2:
- return factory<T, 2>(ap);
+ return factory<boost::remove_const<T>, 2>(ap);
         case 3:
- return factory<T, 3>(ap);
+ return factory<boost::remove_const<T>, 3>(ap);
         case 4:
- return factory<T, 4>(ap);
+ return factory<boost::remove_const<T>, 4>(ap);
         default:
             assert(false); // too many arguments
             // throw exception here?

Modified: branches/serialization_next_release/boost/boost/serialization/is_abstract.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/is_abstract.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/is_abstract.hpp 2007-12-22 20:59:04 EST (Sat, 22 Dec 2007)
@@ -38,7 +38,7 @@
 namespace boost { \
 namespace serialization { \
 template<> \
-struct is_abstract< T > : mpl::true_ {}; \
+struct is_abstract<const T > : mpl::true_ {}; \
 }} \
 /**/
 

Modified: branches/serialization_next_release/boost/boost/serialization/optional.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/optional.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/optional.hpp 2007-12-22 20:59:04 EST (Sat, 22 Dec 2007)
@@ -20,6 +20,7 @@
 #include <boost/serialization/split_free.hpp>
 #include <boost/serialization/level.hpp>
 #include <boost/serialization/nvp.hpp>
+#include <boost/serialization/version.hpp>
 #include <boost/serialization/detail/stack_constructor.hpp>
 
 // function specializations must be defined in the appropriate

Modified: branches/serialization_next_release/boost/boost/serialization/void_cast.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/void_cast.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/void_cast.hpp 2007-12-22 20:59:04 EST (Sat, 22 Dec 2007)
@@ -32,7 +32,7 @@
 namespace boost {
 namespace serialization {
 
-//class BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) extended_type_info;
+class extended_type_info;
 
 // Given a void *, assume that it really points to an instance of one type
 // and alter it so that it would point to an instance of a related type.
@@ -104,6 +104,8 @@
     // each derived class must re-implement these;
     virtual void const * upcast(void const * const t) const = 0;
     virtual void const * downcast(void const * const t) const = 0;
+ // cw 8.3 requires this!!
+ void_caster& operator=(void_caster const &);
 protected:
     void
     static_register() const;
@@ -116,9 +118,7 @@
         extended_type_info const & base
     );
     virtual ~void_caster(){};
-private:
- // cw 8.3 requires this!!
- void_caster& operator=(void_caster const &);
+ bool operator==(const void_caster & rhs) const;
 };
 
 template <class Derived, class Base>
@@ -184,6 +184,10 @@
 } // namespace serialization
 } // namespace boost
 
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
 #include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_SERIALIZATION_VOID_CAST_HPP

Modified: branches/serialization_next_release/boost/boost/serialization/weak_ptr.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/weak_ptr.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/weak_ptr.hpp 2007-12-22 20:59:04 EST (Sat, 22 Dec 2007)
@@ -29,7 +29,7 @@
     const unsigned int /* file_version */
 ){
     const boost::shared_ptr<T> sp = t.lock();
- ar << boost::serialization::make_nvp(NULL, sp);
+ ar << boost::serialization::make_nvp("shared_ptr", sp);
 }
 
 template<class Archive, class T>
@@ -39,7 +39,7 @@
     const unsigned int /* file_version */
 ){
     boost::shared_ptr<T> sp;
- ar >> boost::serialization::make_nvp(NULL, sp);
+ ar >> boost::serialization::make_nvp("shared_ptr", sp);
     t = sp;
 }
 


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