"Robert Ramey"
This is explained in the docmentation under
Reference/Special Considerations/Exporting Class Serialization
Robert Ramey
I have analyzed your issue and I believe there is a better way; one
that avoids the header ordering requirement. I have put together a
small demonstration, which is enclosed. This shows that we can
instantiate a class template (instantiator) for the exported class and
each archive that's been seen.
Then the only challenge is causing that class template instantiation
to actually instantiate executable code. Fortunately, I've recently
addressed that problem in changes to the serialization library. The
basics are in CVS at:
boost/boost/concept/detail/general.hpp
boost/boost/concept/detail/msvc.hpp
boost/boost/concept/detail/borland.hpp
(Ignore the part that says BOOST_OLD_CONCEPT_SUPPORT), so we have the
technology. And if you use the function pointer technique of
BOOST_CONCEPT_ASSERT(( ... )) in boost/boost/concept/assert.hpp you'll
be able to use BOOST_CLASS_EXPORT on class template instances with
multiple arguments.
BOOST_CLASS_EXPORT(foo