From: David Abrahams (dave_at_[hidden])
Date: 2003-11-01 16:28:16
Brian McNamara <lorgon_at_[hidden]> writes:
> On Wed, Oct 29, 2003 at 11:53:28PM -0800, E. Gladyshev wrote:
>> For example if you know that that a type X gives
>> basic guarantees, how would you *typically* use this
>> knowledge when designing the rest of the program!?
> In the case of the basic exception safety guarantee, I believe it works
> like this:
> Do I have the basic guarantee?
> - case "no": either ensure that no exceptions will ever be thrown,
> ever, or else give up and go home
> - case "yes": continue on with your day
> (That is, you typically jusy "gotta have it".)
> In the case of the strong guarantee, you also know about the state an
> object is left in after an exception during an operation ("rollback").
>> So the question is are basic/strong guarantees of any help
>> in this hard job... and if so then how?
> I think yes, but only to the minor extent suggested above.
I don't consider the difference between "give up and go home" or
"continue with your day" minor!
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk