From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8acd4291c317f897 X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,8acd4291c317f897 X-Google-Attributes: gid109fba,public From: Simon Wright Subject: Re: Safety of the Booch Ada 95 Components Date: 1999/12/12 Message-ID: #1/1 X-Deja-AN: 559711219 X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 References: <1e2lds4.7trgj21rgj9i0N%herwin@gmu.edu> <38512921_3@news1.prserv.net> <1e2lkpj.jfhkndlca1p6N%herwin@gmu.edu> X-Trace: news.demon.co.uk 945011443 nnrp-03:5815 NO-IDENT pogner.demon.co.uk:158.152.70.98 Organization: At Home Newsgroups: comp.lang.ada,comp.lang.c++ X-Complaints-To: abuse@demon.net Date: 1999-12-12T00:00:00+00:00 List-Id: herwin@gmu.edu (Harry Erwin) writes: > Matthew Heaney wrote: > > > procedure Copy > > (From : in Source_Type; > > To : in out Target_Type) is > > begin > > if From'Address = To'Address then > > return; -- do nothing, because From is same object as To > > end if; > > That's missing from the code I've been looking at. Yes, a clear defect, logged. > Strong exception-safety == supports commit/rollback semantics. Is that a standard definition? > Apparently in the Booch components, if the copy goes bad, the To > container has been cleared and is partially written. Basic exception > safety (== the container is still useable) is probably supported. Yes, this is the case for the Copy operation (which is *not* the standard assignment operation!). In a previous reply, I quoted the ALRM [7.6(17)] on controlled assignment. I must say I don't fully understand from that what is expected. At first (& nth) sight I don't see how one could achieve your idea of strong exception safety. I wonder what happens in C++ STL-based programming if operator new fails in the middle of things?