From: Robert Ramey (ramey_at_[hidden])
Date: 2004-03-09 11:17:07
This has been reported before but I've been unable to track it down. My
personal guess is that it's a bug with VC 7.1 . Now that you've got a small
test which demonstrates the problem, it should be easy to verify by using
your test case under gcc. The attachement didn't show up on the list so
please send it to me directly.
David Tonge wrote:
>Now let me introduce a new problem. I seem to have uncovered another bug.
>Using the workaround above I can demonstrate expected behaviour with text
>archives. However, if I try to serialize a shared_ptr<A> containing a B*
>to a BINARY archive then I get an assertion failure (puzzlingly in
>basic_text_oarchive.hpp - line 133). I don't have any problems serializing
>shared_ptr<A>s containing A*s to binary archives, and I don't have any
>problems at all with text archives.
>The file I've attached is a heavily modified version of demo_shared_ptr.cpp
>which performs four tests:
> 1. Serialize shared_ptr<A>s containing A*s to and from text archives.
> 2. Serialize shared_ptr<A>s containing B*s to and from text archives.
> 3. Serialize shared_ptr<A>s containing A*s to and from binary archives.
> 4. Serialize shared_ptr<A>s containing B*s to and from binary archives.
>Tests 1-3 all work fine. Test 4 fails as described.
>I'd appreciate it if others with an interest in the serialization library
>could take a look. I can quite believe that it's an error on my part but I
>haven't been able to spot it yet.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk