Index: export.hpp =================================================================== --- export.hpp (revision 48575) +++ export.hpp (working copy) @@ -150,14 +150,22 @@ } // 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); \ +#define BOOST_CLASS_EXPORT_GUID(T, K) \ +namespace \ +{ \ + template< typename U > \ + class init_guid; \ + template<> \ + class init_guid \ + { \ + static ::boost::archive::detail::guid_initializer const & \ + guid_initializer_; \ + }; \ + ::boost::archive::detail::guid_initializer const & \ + init_guid::guid_initializer_ = \ + ::boost::serialization::singleton< \ + ::boost::archive::detail::guid_initializer \ + >::get_mutable_instance().export_guid(K); \ } // the following is solely to support de-serialization of pointers serialized