Robert Ramey wrote:
BOOST_CLASS_VERSION should be in the header. This might be overkill, but its a natural place for it, it's bonehead proof and doesn't have any side effects. BOOST_CLASS_EXPORT has the side effect of instantiatine code so it's "special"
My original intention was that all these "serialization traits" be part of the class header description. BOOST_CLASS_EXPORT sort of broke this idea but it still holds for the other ones.
Right, the version macro just creates a version trait
specialization-majig. Here's our case... maybe there's no good
solution, if so, no big deal. To keep compile times down we try to keep
all the serialization stuff out of our headers except for the
(dependencyless, happily) declaration of the serialize function
struct C : Base {
template <class Archive>
void
serialize(Archive&, const unsigned);
};
and we instantiate the serialize function for several different archive
types in the .cpp, via macro
#include