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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1888e8caa20a2f2d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!nntp.abs.net!news.abs.net!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Controlled types and exception safety References: From: Stephen Leake Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:IovSfGVMiP/P9fd3Xc7vW+wtjdQ= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 30 Nov 2005 19:05:50 -0500 NNTP-Posting-Host: 66.159.65.1 X-Complaints-To: abuse@toad.net X-Trace: news.abs.net 1133395552 66.159.65.1 (Wed, 30 Nov 2005 19:05:52 EST) NNTP-Posting-Date: Wed, 30 Nov 2005 19:05:52 EST Xref: g2news1.google.com comp.lang.ada:6696 Date: 2005-11-30T19:05:50-05:00 List-Id: Maciej Sobczak writes: > When I said "copy" above (C++), I meant create a new object as a copy. > This involves copy constructor. The point is that this new object is > *separate* from the destination object (from what's on the left side > of assignment operator), so even if there are errors, they do not > influence any of the two objects which were originally involved. After > this new helper object is constructed (which means: *successfully* > constructed), it's "injected" in the destination object by means of > swapping the bowels. If you want this semantics in Ada, you can program it yourself; it's just not what is defined for Controlled types. -- -- Stephe