n.torrey.pines@gmail.com wrote:
I'm too lazy to pore over the sources, but I'm guessing this might be happening because the implementation of vector serialization calls its constructor (and assignment?)
Good guess - probably correct
where a resize could probably be better.
Hmm - maybe or maybe not. That would raise the issue of what to do about std::map and others that can't be "fixed" this way. Fixing vector would leave a situation where behavior varied according to what kind of collection the instance was an element of. Still an interesting question. I suspect it hasn't come up until now as the "un serialized members" are usually not important enough to serialize not important enough to save the values. If this behavior is important to you, I think the best would be to implement your own variation of serialization for std::vector. I'm sure you would find this very easy using the current implementation as a basis. Robert Ramey