|
Boost Users : |
From: RIVASSEAU Jean Noel (JN.RIVASSEAU_at_[hidden])
Date: 2006-03-01 03:55:46
// my_class_serialization.cpp or my_class.cpp or .. *.cpp
#include <boost/archive/xml_iarchive.hpp>
.... // all archives you might whant to use here.
template<class Archive>
serialize(Archive &ar, my_class &t....){
... serialization for class my_class
}
#include "my_class.hpp"
// explict instantiation here for all the archives which interest me
template
void serialize<boost::archive::xml_iarchive, my_class>;
... // explicit instantiation for all other archives you might use here.
I notice you still include the archive headers in my_class_serialization.cpp. In that case, you do not have in fact to manually instantiate templates, since my_class_serialization.cpp includes "my_class.hpp" which includes export.hpp and maybe BOOST_CLASS_EXPORT after the archive headers included in class_serialization.cpp, so template instantiation will occure anyway.
Anyway let's close this topic. I understood what the point was.
Jean-Noël
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