Boost logo

Boost :

From: Jesse Jones (jejones_at_[hidden])
Date: 2001-03-19 23:28:49


>From: Jesse Jones <jejones_at_[hidden]>
>> >Yes, but how do you document a function's behavior?
>> >"may throw an exception due to low memory or insufficient resources, or if
>> >the user passes an invalid object. In the latter case there is no guarantee
>> >that the operand is left in a consistent or even destructible state"
>>
>> You don't. All that you can say is that these sort of violations result in
>> undefined behavior. If some client elects to throw an exception it should
>> be clear to him that objects may be left in a bad state. I would tend to
>> think aborting with an option for saving the user's data in a new file
>> would be a better option in release builds, but I'm not sure you can say
>> that no one should ever throw exceptions if an assert fails.
>
>Never say never, but I feel no obligation, or even motivation,
>to make it easy to do.

Right, but if boost has a customizeable assert that's flexible enough to
make me happy then this *will* be easy to do whether or not boost provides
it directly. Regardless it seems that the documentation should outline the
issues.

  -- Jesse


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