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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,eca91508b02e7e97 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed.kamp.net!newsfeed.kamp.net!news.mediascape.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Amount of copying on returned constant objects Date: Mon, 18 Jun 2007 21:04:11 +0300 Message-ID: <5dnvosF345351U1@mid.individual.net> References: <5dfsfnF1qav8bU1@mid.individual.net> <46730bf5$0$23134$9b4e6d93@newsspool1.arcor-online.net> <5dntd6F35jc57U1@mid.individual.net> <4676C27D.2050608@obry.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit X-Trace: individual.net wzDaIJD/dhHA+uw1413F+AqETQH86t2bylh2GJ2FEytLunPa4= User-Agent: KNode/0.10.5 Xref: g2news1.google.com comp.lang.ada:16225 Date: 2007-06-18T21:04:11+03:00 List-Id: Pascal Obry wrote: > Alex R. Mosteo a écrit : >> type Constant_Access is access constant Element_Type; >> function Element (Key : Key_Type) return Constant_Access; > > Or in a more Ada 2005 way: > > function Element > (Key : Key_Type) return access constant Element_Type; > > Pascal. Certainly. I thought that constant wasn't appliable to anonymous accesses in function results (for no special reason on my part).