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,b553d2c02a2df59f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Sat, 25 Feb 2006 18:56:16 -0600 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: Subject: Re: limited types (Was: Records that could be arrays) Date: Sat, 25 Feb 2006 19:01:06 -0600 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-um2ZjYrgEFow8Jb+7RZDqSZzx5ui7rRJgD23ftziul/5IL3aWt1xuhWpcVFxMV9bnJgXoecs8FJ8+1b!tA+P6QQxCYxh89ZSaVBxkEXsotc0XJKQD51MLa/3NNUtibkiDI/T9aC/pJNp+l7JFmMZzASKWgBv!CtBfJtNV4CnWNw== X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:3163 Date: 2006-02-25T19:01:06-06:00 List-Id: "Matthew Heaney" wrote in message news:ufym7tr6w.fsf@earthlink.net... ... > You could pass in a copy constructor if this were an unbounded form (I thik), > something like: > > procedure Insert > (C : in out CT; > E : in ET; > Copy : not null access function (E : ET) return ET) > is > Node : Node_Access := > new Node_Type'(Element => Copy (E), others => <>); > begin > ... > end; > > Wouldn't that work? I don't have a compiler that can do that yet, but I know > this would be legal: Yes, that's legal (a limited function can be an aggregate element, and an aggregate can be used to initial an object). The compiler is required to build the object in place for such aggregates and functions; no temporaries are allowed. Randy.