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: a07f3367d7,b1a1671673a84c5e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!news.buerger.net!LF.net!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Allocators for anonymous access return types Date: Sun, 31 Oct 2010 15:28:49 +0100 Message-ID: <877hgyzba6.fsf@mid.deneb.enyo.de> References: <87ocaa1rph.fsf@mid.deneb.enyo.de> <87d3qq1ont.fsf@mid.deneb.enyo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: idssi.enyo.de 1288535329 2482 172.17.135.6 (31 Oct 2010 14:28:49 GMT) X-Complaints-To: news@enyo.de Cancel-Lock: sha1:uaiGGvd0g4V76d9+kRpurM527b8= Xref: g2news2.google.com comp.lang.ada:16015 Date: 2010-10-31T15:28:49+01:00 List-Id: * J-P. Rosen: >> type Variadic is tagged limited private; > My first reaction would be to define here: > type Variadic access is access Variadic; "type Variadic_Access is access Variadic;"? It's difficult to get exception-safe code that way. Deallocating the parameters in Print is not sufficient because you leak memory when constructing one of the arguments raises an exception. > But you mention: >> (My other example avoids copying, and seems to be safe according to >> the ARM rules, as long as you don't declare something involving the >> Unchecked_* types. A solution based on anonymous access types might >> make this violation impossible, hence my interest in them.) > I don't know what you mean by Unchecked_* types. I guess you mean no use > of Unchecked_Conversion? Better use a restriction then. Oops, I was referring to the Ref type in <87fwvn51mz.fsf@mid.deneb.enyo.de> (it's called Unchecked_Parameter_Reference in the actual code, and for good reason).