
Martin Bonner wrote:
From: Peter Dimov [mailto:pdimov@mmltd.net]
And of course in a situation where throw_exception is used to throw bad_alloc, an assertion makes even less sense, because there are no "logic errors" involved, and presenting the effects of a failed assertion to the end user would serve little purpose; the program could do nothing to defend itself from the out of memory situation.
But if a library is being used in an exception free environment, maybe presenting an assertion failure to the user is as good as you can do.
Possibly, but who is "you" in the above sentence? The whole point of using an exception is that you the library author do not take responsibility of handling the error, leaving it up to you the library user to do that instead.