
That is excellent! We indeed use version 1.33.0 now, so I'll download the newest version and follow you advice. Thank you very much! Mikhail "Robert Ramey" <ramey@rrsd.com> wrote in message news:dncbas$ehq$1@sea.gmane.org...
I'm not sure which version of boost you're using. 1.33.0 did have restriction regarding header order which has been removed except for a couple of special cases.
The following code compiles without error with 1.33.1
#include <boost/serialization/version.hpp> #include <boost/serialization/export.hpp> namespace boost { namespace serialization { class access; } } class A { }; BOOST_CLASS_VERSION(A, 1) BOOST_CLASS_EXPORT(A)
Implementation of BOOST_CLASS_EXPORT is such that this must follow any boost/archive/... headers. So in your application program I would expect to see the following:
#include <boost/archive/polymorphic_archive.hpp> // and/or anyother archives
#include "A.h" // any other imported classes
... ar & a ...
And I would expect everything to work as expected. If A.h is included on other code which does not invoke serialization, compile time should be unaffected by inclusion of the serialization macros.
Robert Ramey