|
Boost Users : |
Subject: Re: [Boost-users] [Serialization] getting version of items stored inSTL collection
From: cc caprani (cc.caprani_at_[hidden])
Date: 2011-07-21 12:01:25
On Thu, Jul 21, 2011 at 4:41 AM, Robert Ramey <ramey_at_[hidden]> 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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net