
5 May
2007
5 May
'07
10:16 a.m.
Sohail Somani wrote:
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Peter Dimov
If your serialization methods
- allow creation of objects whose invariants do not hold, or - expose implementation details in the external representation,
What do you mean by the second line?
Consider for example a set<int>. The proper way to serialize it is as a sequence of values. This is what the user sees, and this external format is robust against changes in the implementation. If you serialize it as a tree of Node classes, this would make it quite hard to switch to a skip list representation later.