Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-06-27 14:03:37

David Abrahams wrote:
> "Peter Dimov" <pdimov_at_[hidden]> writes:
>> David Abrahams wrote:
>>> "Peter Dimov" <pdimov_at_[hidden]> writes:
>>>> 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.
>>> An assertion can always be set up to throw in release mode. I was
>>> thinking of BOOST_ASSERT or something like it, not plain old assert.
>> No, no. :-)
>> An assertion looks like this:
>> Requires: Cond.
> Yes. Why wouldn't you want this function to require that condition?
> Anything else is a coding error.

I am reluctant to label it a coding error ("should never happen in a correct
program"), because in general it can be very hard to ensure that the
condition isn't violated. It's a bit like:

Requires: a particular state of the library that you have no way of

Boost list run by bdawes at, gregod at, cpdaniel at, john at