Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50564 - trunk/boost/serialization
From: ramey_at_[hidden]
Date: 2009-01-13 12:06:47


Author: ramey
Date: 2009-01-13 12:06:46 EST (Tue, 13 Jan 2009)
New Revision: 50564
URL: http://svn.boost.org/trac/boost/changeset/50564

Log:
merged from release branch
Text files modified:
   trunk/boost/serialization/export.hpp | 35 ++++++++++++-----------------------
   1 files changed, 12 insertions(+), 23 deletions(-)

Modified: trunk/boost/serialization/export.hpp
==============================================================================
--- trunk/boost/serialization/export.hpp (original)
+++ trunk/boost/serialization/export.hpp 2009-01-13 12:06:46 EST (Tue, 13 Jan 2009)
@@ -146,33 +146,22 @@
     }
 };
 
+template<typename T>
+class init_guid {
+ static ::boost::archive::detail::guid_initializer<T> const
+ & guid_initializer;
+};
+
 } // namespace detail
 } // namespace archive
 } // namespace boost
 
 #define BOOST_CLASS_EXPORT_GUID(T, K) \
-namespace \
-{ \
- ::boost::archive::detail::guid_initializer< T > const & \
- BOOST_PP_CAT(boost_serialization_guid_initializer_, __LINE__) \
- = ::boost::serialization::singleton< \
- ::boost::archive::detail::guid_initializer< T > \
- >::get_mutable_instance().export_guid(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_, \
- BOOST_PP_CAT(__LINE__,_1) \
- ) = ::boost::serialization::singleton< \
- ::boost::archive::detail::guid_initializer< T > \
- >::get_mutable_instance().export_guid(K); \
-}
+ ::boost::archive::detail::init_guid<T>::guid_initializer = \
+ ::boost::serialization::singleton< \
+ ::boost::archive::detail::guid_initializer< T > \
+ >::get_mutable_instance().export_guid(K); \
 
 #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205))
 
@@ -184,9 +173,9 @@
 # define BOOST_SERIALIZATION_MWERKS_BASE_AND_DERIVED(Base,Derived) \
 namespace \
 { \
- int BOOST_PP_CAT(boost_serialization_mwerks_init_, __LINE__) = \
+ static 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__) = ( \
+ static int BOOST_PP_CAT(boost_serialization_mwerks_init2_, __LINE__) = ( \
       ::boost::serialization::void_cast_register((Derived*)0,(Base*)0) \
     , 3); \
 }


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