Index: boost/serialization/export.hpp =================================================================== --- boost/serialization/export.hpp (revision 43844) +++ boost/serialization/export.hpp (working copy) @@ -49,6 +49,7 @@ namespace archive { namespace detail { +#ifdef BEFORE class basic_pointer_iserializer; class basic_pointer_oserializer; @@ -115,13 +116,8 @@ template struct guid_initializer { - const guid_initializer & export_guid(char const* key, mpl::false_){ - // generates the statically-initialized objects whose constructors - // register the information allowing serialization of T objects - // through pointers to their base classes. - instantiate_ptr_serialization((T*)0, 0); - return *this; - } + const guid_initializer & export_guid(char const* key, mpl::false_); + const guid_initializer & export_guid(char const* key, mpl::true_){ return *this; } @@ -140,6 +136,20 @@ } }; +#else + +// WORKS IF THIS DEFINITION IS AFTER INCLUDING THE ARCHIVE HEADERS +// HUH? +template +const guid_initializer & +guid_initializer::export_guid(char const * key, mpl::false_) +{ + instantiate_ptr_serialization((T*)0,0); + return *this; +} + +#endif + } // namespace detail } // namespace archive } // namespace boost Index: libs/serialization/test/test_exported.cpp =================================================================== --- libs/serialization/test/test_exported.cpp (revision 43844) +++ libs/serialization/test/test_exported.cpp (working copy) @@ -18,11 +18,20 @@ } #endif +#define BEFORE +#include +#undef BEFORE + +#include "text_archive.hpp" + +#undef BOOST_SERIALIZATION_EXPORT_HPP +#include + + #include #include #include #include "test_tools.hpp" -#include #include "base.hpp"