From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-06-28 06:04:24
David Abrahams wrote:
> "Peter Dimov" <pdimov_at_[hidden]> writes:
>> David Abrahams wrote:
>>> "Peter Dimov" <pdimov_at_[hidden]> writes:
>>>> If you are given an archive you don't know whether you are allowed
>>>> to save by value, or whether you can safely save by pointer.
>>>> (In general.)
>>> Yeah, but what's the use case for this? Someone you don't know
>>> hands you an archive and tells you to save something in it without
>>> telling you how it's safe to do so?
>> Yep, that's pretty much what happens every time your 'save' function
>> is invoked.
> Then it's almost impossible to write a reliable save function.
It's impossible to write a reliable save function regardless of that.
> How is the exception going to help?
By detecting that this particular sequence of saves (which in general
depends on the structure being saved and is a runtime property) would have
produced an unreadable archive.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk