Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-06-27 07:00:29


David Abrahams wrote:
> "Peter Dimov" <pdimov_at_[hidden]> writes:
>
>> I think that the default behavior on a sequence of two saves with
>> the same address should be to write the two objects, as if address
>> tracking isn't on. If later a pointer to that address is saved, an
>> exception should occur. Or more generally,
>>
>> - one value save, then N pointer saves sharing the same address
>> should be OK;
>>
>> - M pointer saves sharing the same address should be OK; (*)
>>
>> - K value saves sharing the same address should be OK and result in
>> K copies in the archive;
>>
>> - all other sequences raise an exception at first opportunity.
>
> I'm sure you mean trigger an assertion, right? ;-)

No, I really mean an exception. Asserting while saving isn't a good thing;
the program goes down, taking the user's document with it. Saving into a
different format may be successful and the opportunity shouldn't be denied.

A release build with assertions disabled that silently produces unreadable
files isn't a good thing, either.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk