------- Comment #9 from ronan dot lehy at probayes dot com 2009-01-15 16:12 ------- Following the twisted maze that is BOOST_CLASS_EXPORT() leads me to think that it is (very) roughly equivalent to this:
void dummy(boost::archive::xml_iarchive & ar, A & a, B & b) { boost::serialization::serialize(ar, a, 0); boost::serialization::serialize(ar, b, 0); } Indeed, replacing my BOOST_CLASS_EXPORT() calls with this, I get the same effect ("disappearing" symbols with -O2). At this point, my question is: is triggering template instantiations in this way supposed to be equivalent to explicit instantiations (as in comment #8) with respect to symbols exposed to the outside? If the answer is no, thank you very much for your help and sorry for the trouble. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38828