
Peter Dimov wrote:
Joel de Guzman wrote:
Hi,
Here's a use case that I can't seem to find a way to do using boost.serialization.
Say with version 1, I want to serialize X Y and Z. These are hierarchical and expensive data structures. Now, with version 2, I do not need to create Y objects anymore. Yet, I still have to open version 1 files for backward compatibility. So, when loading version 1 files, I want to skip reading Y objects. How do I do that without having to create a temporary Y object that will be discarded later?
You need to define a proxy Y object that can deserialize itself into thin air.
I thought about that. But that would mean that blank_proxy<Y> knows all about Y -- its composition down to the leaves -- and wrap them all as blank_proxy<T>s. A hairy proposition, IMO. Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net