serialization doc buglet?

Serialization18 reference suggests this should work (this is almost verbatim from the section on seperate load/store free function): #include <boost/archive/text_oarchive.hpp> #include <boost/archive/text_iarchive.hpp> #include <boost/serialization/vector.hpp> template<class Archive> void load (Archive& ar, std::complex<double>& z, const unsigned int version) { double r, i; ar >> r; ar >> i; z = Complex (r, i); } namespace boost { namespace serialization { template<class Archive> inline void serialize(Archive & ar, std::complex<double>& z, const unsigned int file_version) { split_free(ar, z, file_version); } }} Claims "load" is not declared. But adding boost::serialization namespace will fix it: namespace boost { namespace serialization { template<class Archive> void load (Archive& ar, std::complex<double>& z, const unsigned int version) { double r, i; ar >> r; ar >> i; z = Complex (r, i); } }} This was tested with gcc-3.3.2. Is this a doc bug?
participants (1)
-
Neal D. Becker