Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost 1.39][Serialization] BOOST_CLASS_EXPORT_GUID macro failed to compile with C2888 error under MSVS.
From: Vitaly Dolya (vitaly_at_[hidden])
Date: 2009-05-19 20:19:27


Robert Ramey wrote:
> By design ? - lol - more like by default. The implemenation of
> BOOST_CLASS_EXPORT is relies on creating a single static singleton for each
> data type.
Thank for the notice, but I was well aware of that.
Actually my real question is what is it You were trying to solve with
the patch,
that broke my build:

Index: export.hpp
===================================================================
--- export.hpp (revision 51330)
+++ export.hpp (revision 51360)
@@ -160,6 +160,7 @@
     namespace boost { \
     namespace archive { \
     namespace detail { \
+ namespace { \
     template<> \
     struct init_guid< T > { \
         static ::boost::archive::detail::guid_initializer< T > const \
@@ -170,7 +171,7 @@
            ::boost::serialization::singleton< \
                ::boost::archive::detail::guid_initializer< T > \
>::get_mutable_instance().export_guid(K); \
- }}} \
+ }}}} \
 /**/
 
 #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205))

> Putting this in the header (inside an anonymous namespace?)
>
No, I'm not trying to put BOOST_CLASS_EXPORT macro into any of my header
files.
I was trying to put <boost/serialization/export.hpp> into precompiled
headers.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net