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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,68536605ede13a20 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.75.170 with SMTP id d10mr4673709pbw.6.1324465537026; Wed, 21 Dec 2011 03:05:37 -0800 (PST) Path: lh20ni47637pbb.0!nntp.google.com!news1.google.com!goblin3!goblin.stu.neva.ru!news.weisnix.org!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 21 Dec 2011 12:05:07 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GNAT - return by anonymous access References: <784c67eb-a542-41b0-b23d-fca1234e56b2@n10g2000vbg.googlegroups.com> <95f3b0fc-af24-4ace-afc9-227e8893ea99@n6g2000vbg.googlegroups.com> <91845790-2447-4b2c-a6b5-1a52557c8c17@d10g2000vbk.googlegroups.com> In-Reply-To: <91845790-2447-4b2c-a6b5-1a52557c8c17@d10g2000vbk.googlegroups.com> Message-ID: <4ef1bd63$0$6567$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 21 Dec 2011 12:05:07 CET NNTP-Posting-Host: 5e83fc3c.newsspool4.arcor-online.net X-Trace: DXC=e=hFidTa[Ia]l@YUW5NBkn4IUKejVhLTFfGUoDj\fFTN3g>4WIUi X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2011-12-21T12:05:07+01:00 List-Id: On 21.12.11 08:29, AdaMagica wrote: > On 21 Dez., 01:44, Simon Belmont wrote: >> It is my understanding that Ada05 has done away with 'return-by- >> reference' in favor of 'return-by-anonymous-access', which would lead >> me to believe that you would *have* to use them if you want to return >> an allocated limited type. > > Hm, no, return-by-reference has been replaced by build-in-place. GNAT recommends to use a pointer, though, in one of its error messages. Perhaps this should be changed so that it suggests a construct like X := new Limited_Type'(Build_in_Place_Function); ?