7 Jul
2010
7 Jul
'10
1:42 p.m.
Quoting Nguyen Kim Son
Hello,
Do you know how to serialize class boost::gregorian::date? More generally, is it possible to serialize a class in whose we can't change the code source ?
Thanks in advance, Son.
It is already serializable - include boost/date_time/gregorian/greg_serialize.hpp In fact it is an example of non-intrusive serialization (uses only public interface) so you could've done this yourself, so yes it is possible. However it _also_ serves as a warning.. the serialization is slow... much slower than would be possible with intrusive serialization which knows about the internal representation. So to conclude, you picked a good example! Pete