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,f8a440310f7f2e02 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Extended return question Date: Thu, 10 Jul 2008 18:20:11 -0500 Organization: Jacob's private Usenet server Message-ID: References: <4875b7e3$0$6618$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1215732153 24659 69.95.181.76 (10 Jul 2008 23:22:33 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 10 Jul 2008 23:22:33 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 Xref: g2news1.google.com comp.lang.ada:1098 Date: 2008-07-10T18:20:11-05:00 List-Id: "Dale Stanbrough" wrote in message news:MrNoSpam-BCD9C2.17322110072008@news-server.bigpond.net.au... > Georg Bauhaus wrote: > >> Dale Stanbrough wrote: >> > The purpose of an extended return is to create the values in-situ >> > without copying. >> >> _Limited_ objects can be initialized in situ by an aggregate >> or function call ... :-) > > > Ah, thanks. I had misread John Barnes comments on this. Why such a > restriction? Why not allow it for all extended returns on all types? Build-in-place is *allowed* for all objects; it is only *required* for types that always have to be limited (now known as "immutably limited types" (see AI05-0052-1). The reason it is not required is that the function could be used in an assignment statement, and in that case, it doesn't make sense to require build-in-place. And trying to have a function that works both ways could be expensive to implement (the calling conventions are very different). Randy.