Ticket #2569: boost_serialization.patch

File boost_serialization.patch, 2.1 KB (added by kfriddile@…, 14 years ago)
  • export.hpp

     
    150150} // namespace archive
    151151} // namespace boost
    152152
    153 #define BOOST_CLASS_EXPORT_GUID(T, K)                                               \
    154 namespace                                                                           \
    155 {                                                                                   \
    156     ::boost::archive::detail::guid_initializer< T > const &                         \
    157         BOOST_PP_CAT(boost_serialization_guid_initializer_, __LINE__)               \
    158         = ::boost::serialization::singleton<                                        \
    159             ::boost::archive::detail::guid_initializer< T >                         \
    160           >::get_mutable_instance().export_guid(K);                                 \
     153#define BOOST_CLASS_EXPORT_GUID(T, K)                               \
     154namespace                                                           \
     155{                                                                   \
     156   template< typename U >                                           \
     157   class init_guid;                                                 \
     158   template<>                                                       \
     159   class init_guid<T>                                               \
     160   {                                                                \
     161       static ::boost::archive::detail::guid_initializer<T> const & \
     162       guid_initializer_;                                           \
     163   };                                                               \
     164   ::boost::archive::detail::guid_initializer<T> const &            \
     165       init_guid<T>::guid_initializer_ =                            \
     166           ::boost::serialization::singleton<                       \
     167               ::boost::archive::detail::guid_initializer<T>        \
     168           >::get_mutable_instance().export_guid(K);                \
    161169}
    162170
    163171// the following is solely to support de-serialization of pointers serialized