
15 Jun
2006
15 Jun
'06
1:11 p.m.
Bill Lear wrote:
I think what you mean is: does boost serialization guard against forward incompatibility? It does not: that's your job. For any version of your code, if you want to guard against forward incompatibility, you simply need to do this:
Yes.
BOOST_CLASS_VERSION(test, TEST_CURRENT_VERSION);
Of course, you could make an argument that boost should do this automatically.:-)
I'm quite happy to do this if serialization doesn't. My question is that TEST_CURRENT_VERSION will then be declared in a header file as #define. I'd rather avoid that. So if I have BOOST_CLASS_VERSION(test, 0x01); How do I access the version of test? Cheers Russell