On Thu, Jul 21, 2011 at 4:41 AM, Robert Ramey <ramey@rrsd.com> wrote:
I have to say it's very hard for me to follow all this.

For most standard collections such as std::vector<T> the serialization
library takes care of the version of T.  There are only a few exceptions to
shis - such as vector<std::string> etc.  So everything should "just work"


Robert,

Thanks for replying and apologies the explanation wasn't good. I think the solution is to introduce into the MFC Doc class a member variable m_Version and load either std::vector<T*> or std::vector< shared_ptr<T> > as appropriate. Trying to read one line and determine the item_version is probably silly.

This issue is closely related to my other post today ([Boost-users][serialization] Memory leaks even with shared_ptrs) and I'd be grateful if you were able to give that a look. And a million thanks for the library - it really is an incredibly useful tool.

Colin