
26 Aug
2005
26 Aug
'05
3:14 p.m.
Neal Becker wrote:
template<typename Archive, typename T> inline void save (Archive &ar, const std::complex<T>& z, const unsigned int) { ar << real (z); ar << imag (z); }
template<typename Archive, typename T> inline void load (Archive &ar, std::complex<T>& z, const unsigned int) { T i, r; ar >> r; ar >> i; z = std::complex<T> (r, i); }
Shouldn't these use BOOST_SERIALIZATION_NVP so that they can be used with xml archives as well as text and binary? Cheers Russell