Boost logo

Boost-Commit :

From: ramey_at_[hidden]
Date: 2007-08-15 14:49:45


Author: ramey
Date: 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
New Revision: 38696
URL: http://svn.boost.org/trac/boost/changeset/38696

Log:
Changes made over the course of the year while 1.34 was being worked on

Text files modified:
   branches/serialization_next_release/boost/boost/serialization/base_object.hpp | 143 ++++-------------
   branches/serialization_next_release/boost/boost/serialization/binary_object.hpp | 10 +
   branches/serialization_next_release/boost/boost/serialization/collections_load_imp.hpp | 17 +
   branches/serialization_next_release/boost/boost/serialization/collections_save_imp.hpp | 6
   branches/serialization_next_release/boost/boost/serialization/export.hpp | 325 +++++++++++++++------------------------
   branches/serialization_next_release/boost/boost/serialization/force_include.hpp | 2
   branches/serialization_next_release/boost/boost/serialization/is_abstract.hpp | 25 +-
   branches/serialization_next_release/boost/boost/serialization/nvp.hpp | 3
   branches/serialization_next_release/boost/boost/serialization/shared_ptr.hpp | 119 ++------------
   branches/serialization_next_release/boost/boost/serialization/shared_ptr_132.hpp | 24 --
   branches/serialization_next_release/boost/boost/serialization/slist.hpp | 7
   branches/serialization_next_release/boost/boost/serialization/tracking.hpp | 3
   branches/serialization_next_release/boost/boost/serialization/tracking_enum.hpp | 2
   branches/serialization_next_release/boost/boost/serialization/traits.hpp | 5
   branches/serialization_next_release/boost/boost/serialization/vector.hpp | 73 ++++++++
   branches/serialization_next_release/boost/boost/serialization/void_cast.hpp | 54 ++++-
   branches/serialization_next_release/boost/boost/serialization/void_cast_fwd.hpp | 11 -
   branches/serialization_next_release/boost/boost/serialization/weak_ptr.hpp | 2
   18 files changed, 338 insertions(+), 493 deletions(-)

Modified: branches/serialization_next_release/boost/boost/serialization/base_object.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/base_object.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/base_object.hpp 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -37,114 +37,45 @@
 namespace boost {
 namespace serialization {
 
-namespace detail {
- // metrowerks CodeWarrior
- #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206))
- // only register void casts if the types are polymorphic
- template<class Base, class Derived>
- struct base_register{
- struct nothing {
- static const void_cast_detail::void_caster & invoke(){
- return static_cast<const void_cast_detail::void_caster &>(
- * static_cast<const void_cast_detail::void_caster *>(NULL)
- );
- }
- };
-
- // hold a reference to the void_cast_register and void_caster in the hope of
- // ensuring code instantiation for some compilers with over-zealous link time
- // optimiser. The compiler that demanded this was CW
- struct reg{
- typedef const void_cast_detail::void_caster & (* t_vcr)(
- const Derived *,
- const Base *
- );
- t_vcr m_vcr;
- static const void_cast_detail::void_caster & invoke(){
- return void_cast_register<const Derived, const Base>(
- static_cast<const Derived *>(NULL),
- static_cast<const Base *>(NULL)
- );
- }
- reg() :
- m_vcr(static_cast<t_vcr>(void_cast_register))
- {
- }
- } m_reg;
-
- static const void_cast_detail::void_caster & invoke(){
- typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
- BOOST_DEDUCED_TYPENAME type_info_implementation<Base>::type::is_polymorphic,
- mpl::identity<reg>,
- mpl::identity<nothing>
- >::type typex;
- return typex::invoke();
- }
-
- const void_cast_detail::void_caster & m_vc;
- Derived & m_d;
-
- base_register(Derived & d) :
- m_vc(invoke()),
- m_d(d)
- {}
- Base & get_base() const {
- return m_d;
- }
- };
- #else
- // only register void casts if the types are polymorphic
- template<class Base, class Derived>
- struct base_register{
- struct nothing {
- static void invoke(){}
- };
- struct reg{
- static void invoke(){
- void_cast_register<const Derived, const Base>(
- static_cast<const Derived *>(NULL),
- static_cast<const Base *>(NULL)
- );
- }
- };
- static void invoke(){
- typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
- BOOST_DEDUCED_TYPENAME type_info_implementation<Base>::type::is_polymorphic,
- mpl::identity<reg>,
- mpl::identity<nothing>
- >::type typex;
- typex::invoke();
- }
- };
- #endif
- // get the base type for a given derived type
- // preserving the const-ness
- template<class B, class D>
- struct base_cast
- {
- typedef BOOST_DEDUCED_TYPENAME
- mpl::if_<
- is_const<D>,
- const B,
- B
- >::type type;
- BOOST_STATIC_ASSERT(is_const<type>::value == is_const<D>::value);
- };
+namespace detail
+{
+// only register void casts if the types are polymorphic
+ template<class Base, class Derived>
+ struct base_register
+ {
+ static void const* execute(mpl::false_) { return 0; }
+
+ static void const* execute(mpl::true_)
+ {
+ return &void_cast_register((Derived const*)0, (Base const*)0);
+ }
+
+ static void const* invoke()
+ {
+ typedef mpl::bool_<
+ type_info_implementation<Base>::type::is_polymorphic::value
+ > is_polymorphic;
+
+ return execute(is_polymorphic());
+ }
+ };
+
+ // get the base type for a given derived type
+ // preserving the const-ness
+ template<class B, class D>
+ struct base_cast
+ {
+ typedef BOOST_DEDUCED_TYPENAME
+ mpl::if_<
+ is_const<D>,
+ const B,
+ B
+ >::type type;
+ BOOST_STATIC_ASSERT(is_const<type>::value == is_const<D>::value);
+ };
 } // namespace detail
 
-// metrowerks CodeWarrior
-#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206))
-template<class Base, class Derived>
-BOOST_DEDUCED_TYPENAME detail::base_cast<Base, Derived>::type &
-base_object(Derived &d)
-{
- BOOST_STATIC_ASSERT(( is_base_and_derived<Base,Derived>::value));
- BOOST_STATIC_ASSERT(! is_pointer<Derived>::value);
- typedef BOOST_DEDUCED_TYPENAME detail::base_cast<Base, Derived>::type type;
- return detail::base_register<type, Derived>(d).get_base();
-}
-// BORLAND
-#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560))
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560))
 template<class Base, class Derived>
 const Base &
 base_object(const Derived & d)

Modified: branches/serialization_next_release/boost/boost/serialization/binary_object.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/binary_object.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/binary_object.hpp 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -31,6 +31,7 @@
 #include <boost/serialization/level.hpp>
 #include <boost/serialization/split_member.hpp>
 #include <boost/serialization/nvp.hpp>
+#include <boost/serialization/wrapper.hpp>
 
 namespace boost {
 namespace serialization {
@@ -68,6 +69,15 @@
     return binary_object(t, size);
 }
 
+// this is a wrapper
+
+template <>
+struct is_wrapper<binary_object>
+ : public mpl::true_
+{};
+
+
+
 } // namespace serialization
 } // boost
 

Modified: branches/serialization_next_release/boost/boost/serialization/collections_load_imp.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/collections_load_imp.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/collections_load_imp.hpp 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -31,6 +31,7 @@
 #include <boost/serialization/access.hpp>
 #include <boost/serialization/nvp.hpp>
 #include <boost/serialization/detail/stack_constructor.hpp>
+#include <boost/serialization/collection_size_type.hpp>
 
 namespace boost{
 namespace serialization {
@@ -101,7 +102,7 @@
 class reserve_imp
 {
 public:
- void operator()(Container &s, unsigned int count) const {
+ void operator()(Container &s, std::size_t count) const {
         s.reserve(count);
     }
 };
@@ -110,7 +111,7 @@
 class no_reserve_imp
 {
 public:
- void operator()(Container & /* s */, unsigned int /* count */) const{}
+ void operator()(Container & /* s */, std::size_t /* count */) const{}
 };
 
 template<class Archive, class Container, class InputFunction, class R>
@@ -118,16 +119,18 @@
 {
     s.clear();
     // retrieve number of elements
- unsigned int count;
- unsigned int item_version(0);
+ collection_size_type count;
+ unsigned int item_version;
     ar >> BOOST_SERIALIZATION_NVP(count);
- if(3 < ar.get_library_version()){
+ if(3 < ar.get_library_version())
         ar >> BOOST_SERIALIZATION_NVP(item_version);
- }
+ else
+ item_version = 0;
     R rx;
     rx(s, count);
+ std::size_t c = count;
     InputFunction ifunc;
- while(count-- > 0){
+ while(c-- > 0){
         ifunc(ar, s, item_version);
     }
 }

Modified: branches/serialization_next_release/boost/boost/serialization/collections_save_imp.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/collections_save_imp.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/collections_save_imp.hpp 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -22,6 +22,7 @@
 #include <boost/serialization/nvp.hpp>
 #include <boost/serialization/serialization.hpp>
 #include <boost/serialization/version.hpp>
+#include <boost/serialization/collection_size_type.hpp>
 
 namespace boost{
 namespace serialization {
@@ -35,7 +36,7 @@
 inline void save_collection(Archive & ar, const Container &s)
 {
     // record number of elements
- unsigned int count = s.size();
+ 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
@@ -46,7 +47,8 @@
         ar << BOOST_SERIALIZATION_NVP(item_version);
     }
     BOOST_DEDUCED_TYPENAME Container::const_iterator it = s.begin();
- while(count-- > 0){
+ std::size_t c=count;
+ while(c-- > 0){
             // note borland emits a no-op without the explicit namespace
             boost::serialization::save_construct_data_adl(
                 ar,

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-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -16,6 +16,7 @@
 
 // See http://www.boost.org for updates, documentation, and revision history.
 
+// (C) Copyright 2006 David Abrahams - http://www.boost.org.
 // implementation of class export functionality. This is an alternative to
 // "forward declaration" method to provoke instantiation of derived classes
 // that are to be serialized through pointers.
@@ -23,226 +24,165 @@
 #include <utility>
 
 #include <boost/config.hpp>
-
-// if no archive headers have been included this is a no op
-// this is to permit BOOST_EXPORT etc to be included in a
-// file declaration header
-#if ! defined(BOOST_ARCHIVE_BASIC_ARCHIVE_HPP)
-#define BOOST_CLASS_EXPORT_GUID_ARCHIVE_LIST(T, K, ASEQ)
-
-#else
 #include <boost/static_assert.hpp>
 #include <boost/preprocessor/stringize.hpp>
-#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/or.hpp>
-#include <boost/mpl/empty.hpp>
-#include <boost/mpl/front.hpp>
-#include <boost/mpl/pop_front.hpp>
-#include <boost/mpl/void.hpp>
-#include <boost/mpl/identity.hpp>
 
-#include <boost/archive/detail/known_archive_types.hpp>
-#include <boost/serialization/force_include.hpp>
+#include <boost/archive/detail/dynamically_initialized.hpp>
 #include <boost/serialization/type_info_implementation.hpp>
 #include <boost/serialization/is_abstract.hpp>
+#include <boost/serialization/force_include.hpp>
+
+#include <boost/archive/detail/register_archive.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+
+#include <iostream>
 
 namespace boost {
 namespace archive {
 namespace detail {
 
-// forward template declarations
 class basic_pointer_iserializer;
-template<class Archive, class T>
-BOOST_DLLEXPORT const basic_pointer_iserializer &
-instantiate_pointer_iserializer(Archive * ar, T *) BOOST_USED;
-
 class basic_pointer_oserializer;
+
+template<class Archive, class T>
+class pointer_iserializer;
 template<class Archive, class T>
-BOOST_DLLEXPORT const basic_pointer_oserializer &
-instantiate_pointer_oserializer(Archive * ar, T *) BOOST_USED;
+class pointer_oserializer;
 
-namespace export_impl
+template <class Archive, class Serializable>
+struct export_impl
 {
- struct nothing{
- static void instantiate(){}
- };
-
- template<class Archive, class T>
- struct archive {
- struct i {
- static void invoke(){
- instantiate_pointer_iserializer(
- static_cast<Archive *>(NULL),
- static_cast<T *>(NULL)
- );
- }
- };
- struct o {
- static void invoke(){
- instantiate_pointer_oserializer(
- static_cast<Archive *>(NULL),
- static_cast<T *>(NULL)
- );
- }
- };
- static void instantiate(){
- #if defined(__GNUC__) && (__GNUC__ >= 3)
- BOOST_STATIC_ASSERT(
- Archive::is_loading::value || Archive::is_saving::value
- );
- #endif
- typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
- BOOST_DEDUCED_TYPENAME Archive::is_saving,
- mpl::identity<o>,
- // else
- BOOST_DEDUCED_TYPENAME mpl::eval_if<
- BOOST_DEDUCED_TYPENAME Archive::is_loading,
- mpl::identity<i>,
- // else
- mpl::identity<nothing>
- > >::type typex;
- typex::invoke();
- }
- };
-
- template<class ASeq, class T>
- struct for_each_archive {
- private:
- typedef BOOST_DEDUCED_TYPENAME mpl::pop_front<ASeq>::type tail;
- typedef BOOST_DEDUCED_TYPENAME mpl::front<ASeq>::type head;
- public:
- static void instantiate(){
- archive<head, T>::instantiate();
- typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
- mpl::empty<tail>,
- mpl::identity<nothing>,
- mpl::identity<for_each_archive<tail, T> >
- >::type typex;
- typex::instantiate();
- }
- };
-
-} // namespace export_impl
-
-// strictly conforming
-template<class T, class ASeq>
-struct export_generator {
- export_generator(){
- export_impl::for_each_archive<ASeq, T>::instantiate();
+ static const basic_pointer_iserializer &
+ enable_load(mpl::true_){
+ return pointer_iserializer<Archive, Serializable>::get_instance();
     }
- static const export_generator instance;
-};
 
-template<class T, class ASeq>
-const export_generator<T, ASeq>
- export_generator<T, ASeq>::instance;
+ static const basic_pointer_oserializer &
+ enable_save(mpl::true_){
+ return pointer_oserializer<Archive, Serializable>::get_instance();
+ }
+
+ inline static void enable_load(mpl::false_) {}
+ inline static void enable_save(mpl::false_) {}
+};
 
-// instantiation of this template creates a static object.
 template<class T>
-struct guid_initializer {
- typedef BOOST_DEDUCED_TYPENAME boost::serialization::type_info_implementation<T>::type eti_type;
- static void export_register(const char *key){
+struct guid_initializer
+{
+ typedef typename
+ boost::serialization::type_info_implementation<T>::type eti_type;
+
+ static void export_register(const char *key)
+ {
         eti_type::export_register(key);
     }
- static const guid_initializer instance;
- guid_initializer(const char *key = 0) BOOST_USED ;
+
+ static const guid_initializer& get_instance(char const* key)
+ {
+ static guid_initializer const instance(key);
+ return instance;
+ }
+
+ BOOST_DLLEXPORT guid_initializer(const char *key = 0) BOOST_USED ;
 };
 
+
 template<class T>
-guid_initializer<T>::guid_initializer(const char *key){
+BOOST_DLLEXPORT guid_initializer<T>::guid_initializer(const char *key)
+{
     if(0 != key)
         export_register(key);
+
+ // generates the statically-initialized objects whose constructors
+ // register the information allowing serialization of T objects
+ // through pointers to their base classes.
+ instantiate_ptr_serialization((T*)0, 0);
 }
 
-template<class T>
-const guid_initializer<T> guid_initializer<T>::instance;
+// On many platforms, naming a specialization of this template is
+// enough to cause its argument to be instantiated.
+template <void(*)()>
+struct instantiate_function {};
 
-// only gcc seems to be able to explicitly instantiate a static instance.
-// but all can instantiate a function that refers to a static instance
+template <class Archive, class Serializable>
+struct ptr_serialization_support
+{
+# ifdef BOOST_MSVC
+ virtual BOOST_DLLEXPORT void instantiate() BOOST_USED;
+
+# elif defined(__BORLANDC__)
+
+ static void instantiate();
+ enum { x = sizeof(instantiate(),3) };
+
+# else
+
+ static void instantiate();
+ typedef instantiate_function<
+ &ptr_serialization_support::instantiate
+ > x;
 
-// the following optimization - inhibiting explicit instantiation for abstract
-// classes breaks msvc compliles
-template<class T, class ASeq>
-struct export_instance {
- struct abstract {
- static const export_generator<T, ASeq> *
- invoke(){
- return 0;
- }
- };
- struct not_abstract {
- static const export_generator<T, ASeq> *
- invoke(){
- return & export_generator<T, ASeq>::instance;
- }
- };
+# endif
 };
 
-template<class T, class ASeq>
-BOOST_DLLEXPORT
-std::pair<const export_generator<T, ASeq> *, const guid_initializer<T> *>
-export_instance_invoke() {
- typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
- serialization::is_abstract<T>,
- mpl::identity<BOOST_DEDUCED_TYPENAME export_instance<T, ASeq>::abstract>,
- mpl::identity<BOOST_DEDUCED_TYPENAME export_instance<T, ASeq>::not_abstract>
- >::type typex;
- return std::pair<const export_generator<T, ASeq> *, const guid_initializer<T> *>(
- typex::invoke(),
- & guid_initializer<T>::instance
- );
-}
-
-template<class T, class ASeq>
-struct export_archives {
- struct empty_archive_list {
- static BOOST_DLLEXPORT
- std::pair<const export_generator<T, ASeq> *, const guid_initializer<T> *>
- invoke(){
- return std::pair<const export_generator<T, ASeq> *,
- const guid_initializer<T> *>(0, 0);
- }
- };
- struct non_empty_archive_list {
- static BOOST_DLLEXPORT
- std::pair<const export_generator<T, ASeq> *, const guid_initializer<T> *>
- invoke(){
- return export_instance_invoke<T, ASeq>();
- }
- };
-};
+template <class Archive, class Serializable>
+BOOST_DLLEXPORT void ptr_serialization_support<Archive,Serializable>::instantiate()
+{
+ typedef mpl::not_<serialization::is_abstract<Serializable> > concrete;
+
+ export_impl<Archive,Serializable>::enable_save(
+ mpl::and_<concrete, BOOST_DEDUCED_TYPENAME Archive::is_saving>());
 
-template<class T, class ASeq>
-BOOST_DLLEXPORT
-std::pair<const export_generator<T, ASeq> *, const guid_initializer<T> *>
-export_archives_invoke(T &, ASeq &){
- typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
- mpl::empty<ASeq>,
- mpl::identity<BOOST_DEDUCED_TYPENAME export_archives<T, ASeq>::empty_archive_list>,
- mpl::identity<BOOST_DEDUCED_TYPENAME export_archives<T, ASeq>::non_empty_archive_list>
- >::type typex;
- return typex::invoke();
+ export_impl<Archive,Serializable>::enable_load(
+ mpl::and_<concrete, BOOST_DEDUCED_TYPENAME Archive::is_loading>());
 }
 
 } // namespace detail
 } // namespace archive
 } // namespace boost
 
-#define BOOST_CLASS_EXPORT_GUID_ARCHIVE_LIST(T, K, ASEQ) \
- namespace boost { \
- namespace archive { \
- namespace detail { \
- template<> \
- const guid_initializer< T > \
- guid_initializer< T >::instance(K); \
- template \
- BOOST_DLLEXPORT \
- std::pair<const export_generator<T, ASEQ> *, const guid_initializer< T > *> \
- export_archives_invoke<T, ASEQ>(T &, ASEQ &); \
- } } } \
- /**/
+#define BOOST_CLASS_EXPORT_GUID(T, K) \
+namespace \
+{ \
+ ::boost::archive::detail::guid_initializer< T > const& \
+ BOOST_PP_CAT(boost_serialization_guid_initializer_, __LINE__) \
+ = ::boost::archive::detail::guid_initializer< T >::get_instance(K); \
+}
+
+// the following is solely to support de-serialization of pointers serialized
+// under 1.32
+#define BOOST_CLASS_EXPORT_GUID_1(T, K) \
+namespace \
+{ \
+ ::boost::archive::detail::guid_initializer< T > const& \
+ BOOST_PP_CAT(boost_serialization_guid_initializer_, __LINE__ ## _1) \
+ = ::boost::archive::detail::guid_initializer< T >::get_instance(K); \
+}
 
-#endif
+#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205))
+
+// CodeWarrior fails to construct static members of class templates
+// when they are instantiated from within templates, so on that
+// compiler we ask users to specifically register base/derived class
+// relationships for exported classes. On all other compilers, use of
+// this macro is entirely optional.
+# define BOOST_SERIALIZATION_MWERKS_BASE_AND_DERIVED(Base,Derived) \
+namespace \
+{ \
+ int BOOST_PP_CAT(boost_serialization_mwerks_init_, __LINE__) = \
+ (::boost::archive::detail::instantiate_ptr_serialization((Derived*)0,0), 3); \
+ int BOOST_PP_CAT(boost_serialization_mwerks_init2_, __LINE__) = ( \
+ ::boost::serialization::void_cast_register((Derived*)0,(Base*)0) \
+ , 3); \
+}
+
+#else
+
+# define BOOST_SERIALIZATION_MWERKS_BASE_AND_DERIVED(Base,Derived)
+
+#endif
 
 // check for unnecessary export. T isn't polymorphic so there is no
 // need to export it.
@@ -253,28 +193,15 @@
     ); \
     /**/
 
-// the default list of archives types for which code id generated
-#define BOOST_CLASS_EXPORT_GUID(T, K) \
- BOOST_CLASS_EXPORT_GUID_ARCHIVE_LIST( \
- T, \
- K, \
- boost::archive::detail::known_archive_types::type \
- ) \
- /**/
-
-// the default exportable class identifier is the class name
-#define BOOST_CLASS_EXPORT_ARCHIVE_LIST(T, ASEQ) \
- BOOST_CLASS_EXPORT_GUID_ARCHIVE_LIST(T, BOOST_PP_STRINGIZE(T), A)
-
 // the default exportable class identifier is the class name
 // the default list of archives types for which code id generated
 // are the originally included with this serialization system
-#define BOOST_CLASS_EXPORT(T) \
- BOOST_CLASS_EXPORT_GUID_ARCHIVE_LIST( \
- T, \
- BOOST_PP_STRINGIZE(T), \
- boost::archive::detail::known_archive_types::type \
- ) \
+#define BOOST_CLASS_EXPORT(T) \
+ BOOST_CLASS_EXPORT_GUID( \
+ T, \
+ BOOST_PP_STRINGIZE(T) \
+ ) \
     /**/
 
 #endif // BOOST_SERIALIZATION_EXPORT_HPP
+

Modified: branches/serialization_next_release/boost/boost/serialization/force_include.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/force_include.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/force_include.hpp 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -42,7 +42,7 @@
 # endif
 #elif ! defined(_WIN32) && ! defined(_WIN64)
 # if defined(__MWERKS__)
-# // define BOOST_USED __attribute__ ((used))
+# define BOOST_DLLEXPORT __declspec(dllexport)
 # elif defined(__GNUC__) && (__GNUC__ >= 3)
 # define BOOST_USED __attribute__ ((used))
 # elif defined(__INTEL_COMPILER) && (BOOST_INTEL_CXX_VERSION >= 800)

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-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -23,16 +23,13 @@
 namespace boost {
 namespace serialization {
     template<class T>
- struct is_abstract {
- // default to false if not supported
- #ifdef BOOST_NO_IS_ABSTRACT
- typedef BOOST_DEDUCED_TYPENAME mpl::bool_<false> type;
- BOOST_STATIC_CONSTANT(bool, value = false);
- #else
- typedef BOOST_DEDUCED_TYPENAME boost::is_abstract<T>::type type;
- BOOST_STATIC_CONSTANT(bool, value = type::value);
- #endif
- };
+ struct is_abstract
+#ifdef BOOST_NO_IS_ABSTRACT
+ : mpl::false_
+#else
+ : boost::is_abstract<T>
+#endif
+ {};
 } // namespace serialization
 } // namespace boost
 
@@ -41,12 +38,8 @@
 namespace boost { \
 namespace serialization { \
 template<> \
-struct is_abstract< T > { \
- typedef mpl::bool_<true> type; \
- BOOST_STATIC_CONSTANT(bool, value = true); \
-}; \
-} \
-} \
+struct is_abstract< T > : mpl::true_ {}; \
+}} \
 /**/
 
 #endif //BOOST_SERIALIZATION_IS_ABSTRACT_CLASS_HPP

Modified: branches/serialization_next_release/boost/boost/serialization/nvp.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/nvp.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/nvp.hpp 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -33,6 +33,7 @@
 #include <boost/serialization/split_member.hpp>
 #include <boost/serialization/base_object.hpp>
 #include <boost/serialization/traits.hpp>
+#include <boost/serialization/wrapper.hpp>
 
 namespace boost {
 namespace serialization {
@@ -40,7 +41,7 @@
 template<class T>
 struct nvp :
     public std::pair<const char *, T *>,
- public traits<nvp<T>, object_serializable, track_never>
+ public wrapper_traits<nvp<T> >
 {
     explicit nvp(const char * name, T & t) :
         // note: redundant cast works around borland issue

Modified: branches/serialization_next_release/boost/boost/serialization/shared_ptr.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/shared_ptr.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/shared_ptr.hpp 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -24,18 +24,11 @@
 
 #include <boost/detail/workaround.hpp>
 #include <boost/shared_ptr.hpp>
-#include <boost/throw_exception.hpp>
 
-#include <boost/archive/archive_exception.hpp>
-
-#include <boost/serialization/type_info_implementation.hpp>
 #include <boost/serialization/split_free.hpp>
 #include <boost/serialization/nvp.hpp>
 #include <boost/serialization/version.hpp>
 #include <boost/serialization/tracking.hpp>
-#include <boost/static_assert.hpp>
-
-#include <boost/serialization/void_cast_fwd.hpp>
 
 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
 // shared_ptr serialization traits
@@ -48,31 +41,31 @@
         template<class T>
         struct version< ::boost::shared_ptr<T> > {
             typedef mpl::integral_c_tag tag;
-#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206))
+ #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206))
             typedef BOOST_DEDUCED_TYPENAME mpl::int_<1> type;
-#else
+ #else
             typedef mpl::int_<1> type;
-#endif
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570))
+ #endif
+ #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570))
             BOOST_STATIC_CONSTANT(unsigned int, value = 1);
-#else
+ #else
             BOOST_STATIC_CONSTANT(unsigned int, value = type::value);
-#endif
+ #endif
         };
         // don't track shared pointers
         template<class T>
         struct tracking_level< ::boost::shared_ptr<T> > {
             typedef mpl::integral_c_tag tag;
-#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206))
+ #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206))
             typedef BOOST_DEDUCED_TYPENAME mpl::int_< ::boost::serialization::track_never> type;
-#else
+ #else
             typedef mpl::int_< ::boost::serialization::track_never> type;
-#endif
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570))
+ #endif
+ #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570))
             BOOST_STATIC_CONSTANT(int, value = ::boost::serialization::track_never);
-#else
+ #else
             BOOST_STATIC_CONSTANT(int, value = type::value);
-#endif
+ #endif
         };
     }}
     #define BOOST_SERIALIZATION_SHARED_PTR(T)
@@ -93,85 +86,6 @@
 namespace boost {
 namespace serialization{
 
-class extended_type_info;
-
-namespace detail {
-
-struct null_deleter {
- void operator()(void const *) const {}
-};
-
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// a common class for holding various types of shared pointers
-
-class shared_ptr_helper {
- typedef std::map<void*, shared_ptr<void> > collection_type;
- typedef collection_type::const_iterator iterator_type;
- // list of shared_pointers create accessable by raw pointer. This
- // is used to "match up" shared pointers loaded at diferent
- // points in the archive
- collection_type m_pointers;
- // return a void pointer to the most derived type
- template<class T>
- void * object_identifier(T * t) const {
- const extended_type_info * true_type
- = type_info_implementation<T>::type::get_derived_extended_type_info(*t);
- // note:if this exception is thrown, be sure that derived pointer
- // is either regsitered or exported.
- if(NULL == true_type)
- boost::throw_exception(
- boost::archive::archive_exception(
- boost::archive::archive_exception::unregistered_class
- )
- );
- const boost::serialization::extended_type_info * this_type
- = boost::serialization::type_info_implementation<T>::type::get_instance();
- void * vp = void_downcast(*true_type, *this_type, t);
- return vp;
- }
-public:
- template<class T>
- void reset(shared_ptr<T> & s, T * r){
- if(NULL == r){
- s.reset();
- return;
- }
- // get pointer to the most derived object. This is effectively
- // the object identifer
- void * od = object_identifier(r);
-
- iterator_type it = m_pointers.find(od);
-
- if(it == m_pointers.end()){
- s.reset(r);
- m_pointers.insert(collection_type::value_type(od,s));
- }
- else{
- s = static_pointer_cast<T>((*it).second);
- }
- }
- virtual ~shared_ptr_helper(){}
-};
-
-} // namespace detail
-
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// utility function for creating/getting a helper - could be useful in general
-// but shared_ptr is the only class (so far that needs it) and I don't have a
-// convenient header to place it into.
-template<class Archive, class H>
-H &
-get_helper(Archive & ar){
- extended_type_info * eti = type_info_implementation<H>::type::get_instance();
- shared_ptr<void> sph;
- ar.lookup_helper(eti, sph);
- if(NULL == sph.get()){
- sph = shared_ptr<H>(new H);
- ar.insert_helper(eti, sph);
- }
- return * static_cast<H *>(sph.get());
-}
-
 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
 // serialization for shared_ptr
 
@@ -202,14 +116,17 @@
     T* r;
     #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP
     if(file_version < 1){
+ //ar.register_type(static_cast<
+ // boost_132::detail::sp_counted_base_impl<T *, boost::checked_deleter<T> > *
+ //>(NULL));
         ar.register_type(static_cast<
- boost_132::detail::sp_counted_base_impl<T *, boost::checked_deleter<T> > *
+ boost_132::detail::sp_counted_base_impl<T *, boost::archive::detail::null_deleter > *
>(NULL));
         boost_132::shared_ptr<T> sp;
         ar >> boost::serialization::make_nvp("px", sp.px);
         ar >> boost::serialization::make_nvp("pn", sp.pn);
         // got to keep the sps around so the sp.pns don't disappear
- get_helper<Archive, boost_132::serialization::detail::shared_ptr_helper>(ar).append(sp);
+ ar.append(sp);
         r = sp.get();
     }
     else
@@ -217,7 +134,7 @@
     {
         ar >> boost::serialization::make_nvp("px", r);
     }
- get_helper<Archive, detail::shared_ptr_helper >(ar).reset(t,r);
+ ar.reset(t,r);
 }
 
 template<class Archive, class T>

Modified: branches/serialization_next_release/boost/boost/serialization/shared_ptr_132.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/shared_ptr_132.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/shared_ptr_132.hpp 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -47,25 +47,6 @@
     void operator()(void const *) const {}
 };
 
-class shared_ptr_helper{
- typedef std::list<shared_ptr<void> > collection_type;
- typedef collection_type::iterator iterator_type;
- // list of loaded pointers. This is used to be sure that the pointers
- // stay around long enough to be "matched" with other pointers loaded
- // by the same archive. These are created with a "null_deleter" so that
- // when this list is destroyed - the underlaying raw pointers are not
- // destroyed. This has to be done because the pointers are also held by
- // new system which is disjoint from this set. This is implemented
- // by a change in load_construct_data below. It makes this file suitable
- // only for loading pointers into a 1.33 or later boost system.
- collection_type m_pointers;
-public:
- void append(const boost_132::shared_ptr<void> & t){
- m_pointers.push_back(t);
- }
- virtual ~shared_ptr_helper(){}
-};
-
 } // namespace detail
 } // namespace serialization
 } // namespace boost_132
@@ -111,7 +92,8 @@
 ){
     P ptr_;
     ar >> boost::serialization::make_nvp("ptr", ptr_);
-// ::new(t)boost_132::detail::sp_counted_base_impl<P, D>(ptr_, D()); // placement
+ // ::new(t)boost_132::detail::sp_counted_base_impl<P, D>(ptr_, D());
+ // placement
     // note: the original ::new... above is replaced by the one here. This one
     // creates all new objects with a null_deleter so that after the archive
     // is finished loading and the shared_ptrs are destroyed - the underlying
@@ -227,7 +209,7 @@
         boost::checked_deleter< T > \
> __shared_ptr_ ## T; \
     BOOST_CLASS_EXPORT_GUID(__shared_ptr_ ## T, "__shared_ptr_" K) \
- BOOST_CLASS_EXPORT_GUID(T, K) \
+ BOOST_CLASS_EXPORT_GUID_1(T, K) \
     /**/
 
 #define BOOST_SHARED_POINTER_EXPORT(T) \

Modified: branches/serialization_next_release/boost/boost/serialization/slist.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/slist.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/slist.hpp 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -49,9 +49,9 @@
     // retrieve number of elements
     t.clear();
     // retrieve number of elements
- unsigned int count;
+ collection_size_type count;
     ar >> BOOST_SERIALIZATION_NVP(count);
- if(0 == count)
+ if(std::size_t(0) == count)
         return;
     unsigned int v;
     if(3 < ar.get_library_version()){
@@ -62,7 +62,8 @@
     t.push_front(u.reference());
     BOOST_DEDUCED_TYPENAME BOOST_STD_EXTENSION_NAMESPACE::slist<U, Allocator>::iterator last;
     last = t.begin();
- while(--count > 0){
+ std::size_t c = count;
+ while(--c > 0){
         boost::serialization::detail::stack_construct<Archive, U>
             u(ar, file_version);
         ar >> boost::serialization::make_nvp("item", u.reference());

Modified: branches/serialization_next_release/boost/boost/serialization/tracking.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/tracking.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/tracking.hpp 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -29,7 +29,6 @@
 #include <boost/type_traits/is_pointer.hpp>
 #include <boost/serialization/level.hpp>
 #include <boost/serialization/tracking_enum.hpp>
-//#include <boost/serialization/traits.hpp>
 
 namespace boost {
 namespace serialization {
@@ -65,7 +64,7 @@
             // is never
             mpl::int_<track_never>,
             // otherwise its selective
- mpl::int_<track_selectivly>
+ mpl::int_<track_selectively>
> > >::type type;
     BOOST_STATIC_CONSTANT(int, value = tracking_level::type::value);
 };

Modified: branches/serialization_next_release/boost/boost/serialization/tracking_enum.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/tracking_enum.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/tracking_enum.hpp 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -30,7 +30,7 @@
     track_never = 0,
     // track objects of this type if the object is serialized through a
     // pointer.
- track_selectivly = 1,
+ track_selectively = 1,
     // always track this type
     track_always = 2
 };

Modified: branches/serialization_next_release/boost/boost/serialization/traits.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/traits.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/traits.hpp 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -28,6 +28,7 @@
 #include <boost/static_assert.hpp>
 
 #include <boost/mpl/int.hpp>
+#include <boost/mpl/bool.hpp>
 #include <boost/serialization/level_enum.hpp>
 #include <boost/serialization/tracking_enum.hpp>
 
@@ -45,7 +46,8 @@
     int Level,
     int Tracking,
     unsigned int Version = 0,
- class ETII = extended_type_info_impl< T >
+ class ETII = extended_type_info_impl< T >,
+ class Wrapper = mpl::false_
>
 struct traits : public basic_traits {
     BOOST_STATIC_ASSERT(Version == 0 || Level >= object_class_info);
@@ -54,6 +56,7 @@
     typedef BOOST_DEDUCED_TYPENAME mpl::int_<Tracking> tracking;
     typedef BOOST_DEDUCED_TYPENAME mpl::int_<Version> version;
     typedef ETII type_info_implementation;
+ typedef Wrapper is_wrapper;
 };
 
 } // namespace serialization

Modified: branches/serialization_next_release/boost/boost/serialization/vector.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/vector.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/vector.hpp 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -10,6 +10,7 @@
 // vector.hpp: serialization for stl vector templates
 
 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// fast array serialization (C) Copyright 2005 Matthias Troyer
 // Use, modification and distribution is subject to the Boost Software
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
@@ -24,19 +25,27 @@
 #include <boost/serialization/collections_save_imp.hpp>
 #include <boost/serialization/collections_load_imp.hpp>
 #include <boost/serialization/split_free.hpp>
+#include <boost/serialization/array.hpp>
+#include <boost/serialization/detail/get_data.hpp>
+#include <boost/detail/has_default_constructor.hpp>
+#include <boost/mpl/bool.hpp>
 
 namespace boost {
 namespace serialization {
 
 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
 // vector<T>
+
+// the default versions
+
 template<class Archive, class U, class Allocator>
 inline void save(
     Archive & ar,
     const std::vector<U, Allocator> &t,
- const unsigned int /* file_version */
+ const unsigned int /* file_version */,
+ mpl::false_
 ){
- boost::serialization::stl::save_collection<Archive, std::vector<U, Allocator> >(
+ boost::serialization::stl::save_collection<Archive, STD::vector<U, Allocator> >(
         ar, t
     );
 }
@@ -45,18 +54,68 @@
 inline void load(
     Archive & ar,
     std::vector<U, Allocator> &t,
- const unsigned int /* file_version */
+ const unsigned int /* file_version */,
+ mpl::false_
 ){
     boost::serialization::stl::load_collection<
         Archive,
         std::vector<U, Allocator>,
         boost::serialization::stl::archive_input_seq<
- Archive, std::vector<U, Allocator>
+ Archive, STD::vector<U, Allocator>
>,
- boost::serialization::stl::reserve_imp<std::vector<U, Allocator> >
+ boost::serialization::stl::reserve_imp<STD::vector<U, Allocator> >
>(ar, t);
 }
 
+// the optimized versions
+
+template<class Archive, class U, class Allocator>
+inline void save(
+ Archive & ar,
+ const std::vector<U, Allocator> &t,
+ const unsigned int /* file_version */,
+ mpl::true_
+){
+ const collection_size_type count(t.size());
+ ar << BOOST_SERIALIZATION_NVP(count);
+ if (!t.empty())
+ ar << make_array(detail::get_data(t),t.size());
+}
+
+template<class Archive, class U, class Allocator>
+inline void load(
+ Archive & ar,
+ std::vector<U, Allocator> &t,
+ const unsigned int /* file_version */,
+ mpl::true_
+){
+ collection_size_type count(t.size());
+ ar >> BOOST_SERIALIZATION_NVP(count);
+ t.resize(count);
+ if (!t.empty())
+ ar >> make_array(detail::get_data(t),t.size());
+ }
+
+// dispatch to either default or optimized versions
+
+template<class Archive, class U, class Allocator>
+inline void save(
+ Archive & ar,
+ const std::vector<U, Allocator> &t,
+ const unsigned int file_version
+){
+ save(ar,t,file_version, boost::detail::has_default_constructor<U>());
+}
+
+template<class Archive, class U, class Allocator>
+inline void load(
+ Archive & ar,
+ std::vector<U, Allocator> &t,
+ const unsigned int file_version
+){
+ load(ar,t,file_version, boost::detail::has_default_constructor<U>());
+}
+
 // split non-intrusive serialization function member into separate
 // non intrusive save/load member functions
 template<class Archive, class U, class Allocator>
@@ -79,7 +138,7 @@
     const unsigned int /* file_version */
 ){
     // record number of elements
- unsigned int count = t.size();
+ collection_size_type count (t.size());
     ar << BOOST_SERIALIZATION_NVP(count);
     std::vector<bool>::const_iterator it = t.begin();
     while(count-- > 0){
@@ -95,7 +154,7 @@
     const unsigned int /* file_version */
 ){
     // retrieve number of elements
- unsigned int count;
+ collection_size_type count;
     ar >> BOOST_SERIALIZATION_NVP(count);
     t.clear();
     while(count-- > 0){

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-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -146,27 +146,54 @@
         return b;
     }
 
-public:
- static const void_caster_primitive instance;
- void_caster_primitive() BOOST_USED;
+ BOOST_DLLEXPORT void_caster_primitive() BOOST_USED;
+
+ static BOOST_DLLEXPORT void_caster_primitive const& instance;
+
+ // Something we can use to force instantiation without generating
+ // warnings.
+ static void use(void_caster_primitive const&) {}
+
+ public:
+ // CodeWarrior fails to construct static members of class
+ // templates when they are instantiated from within templates, so
+ // we do everything with void_caster_primitive in terms of
+ // get_instance. On CodeWarrior, the user must invoke
+ // BOOST_SERIALIZATION_MWERKS_BASE_AND_DERIVED to make this work
+ // (see boost/serialization/export.hpp). On other compilers (and
+ // if the bug is fixed in a future version of CodeWarriror), the
+ // initialization of instance (above) obviates the need for
+ // BOOST_SERIALIZATION_MWERKS_BASE_AND_DERIVED.
+ static BOOST_DLLEXPORT void_caster_primitive const& get_instance()
+ {
+ static void_caster_primitive instance_;
+
+ // refer to instance, causing it to be instantiated (and
+ // initialized at startup on working compilers)
+ use(instance);
+
+ return instance_;
+ }
 };
 
 template <class Derived, class Base>
-void_caster_primitive<Derived, Base>::void_caster_primitive() :
+BOOST_DLLEXPORT void_caster_primitive<Derived, Base>::void_caster_primitive() :
     void_caster(
         * type_info_implementation<Derived>::type::get_instance(),
         * type_info_implementation<Base>::type::get_instance()
     )
 {
- this->static_register(& instance);
+ // calling get_instance() causes infinite recursion, and the
+ // instance reference isn't initialized yet, so we must pass this
+ // to static_register. It *is* the same object as instance, but
+ // there's no way even to assert that here.
+ this->static_register(this);
 }
 
-// the purpose of this class is to create to->from and from->to instances
-// of void_caster_primitive for each related pair of types. This has to be
-// done a pre-execution time - hence the usage of static variable.
-template<class Derived, class Base>
-const void_caster_primitive<Derived, Base>
- void_caster_primitive<Derived, Base>::instance;
+template <class Derived, class Base>
+BOOST_DLLEXPORT void_caster_primitive<Derived,Base> const&
+void_caster_primitive<Derived,Base>::instance
+= void_caster_primitive<Derived,Base>::get_instance();
 
 } // void_cast_detail
 
@@ -187,9 +214,8 @@
     const Base * /* bnull = NULL */
 ){
     return void_cast_detail::void_caster_primitive<
- const Derived,
- const Base
- >::instance;
+ const Derived, const Base
+ >::get_instance();
 }
 
 } // namespace serialization

Modified: branches/serialization_next_release/boost/boost/serialization/void_cast_fwd.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/serialization/void_cast_fwd.hpp (original)
+++ branches/serialization_next_release/boost/boost/serialization/void_cast_fwd.hpp 2007-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -17,23 +17,14 @@
 
 // See http://www.boost.org for updates, documentation, and revision history.
 
-#include <boost/serialization/force_include.hpp>
-#include <boost/detail/workaround.hpp>
-
 namespace boost {
 namespace serialization {
 namespace void_cast_detail{
 class void_caster;
 } // namespace void_cast_detail
-
 template<class Derived, class Base>
 BOOST_DLLEXPORT
-// DMC doesn't allow export and inline, so supress the inline
-#if BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x849))
-#else
-inline
-#endif
-const void_cast_detail::void_caster & void_cast_register(
+inline const void_cast_detail::void_caster & void_cast_register(
     const Derived * dnull = NULL,
     const Base * bnull = NULL
 ) BOOST_USED;

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-08-15 14:49:43 EDT (Wed, 15 Aug 2007)
@@ -28,7 +28,7 @@
     const boost::weak_ptr<T> &t,
     const unsigned int /* file_version */
 ){
- const boost::shared_ptr<T> sp(t);
+ const boost::shared_ptr<T> sp = t.lock();
         ar << boost::serialization::make_nvp(NULL, 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