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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Is there a reason System.Storage_Pools isn't Pure? Date: Sat, 22 Apr 2017 00:02:51 -0500 Organization: JSA Research & Innovation Message-ID: References: <178b6fbc-229b-49fc-8ffb-a5797bfc335f@googlegroups.com> <61e151c1-9fe6-4d32-8f13-d425bc41a616@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: franka.jacob-sparre.dk 1492837372 2486 24.196.82.226 (22 Apr 2017 05:02:52 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 22 Apr 2017 05:02:52 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:46609 Date: 2017-04-22T00:02:51-05:00 List-Id: "Shark8" wrote in message news:a498c0f6-11ae-4050-ade0-bc35c686dc1c@googlegroups.com... > On Wednesday, April 19, 2017 at 2:36:28 PM UTC-6, Randy Brukardt wrote: >> >> Your spec here doesn't have any way to put an element into the holder. >> And >> that's where the trouble comes (especially for limited types!). Perhaps >> you >> can figure it out (I haven't been able to). As it stands, your holder >> objects would have to have Has_Element = False. Not very useful. ;-) > > I should have known better than to type it on-the-fly. > Here's a different spec that actually does compile under GNAT, even though > [AFACT] it shouldn't: Right; it contains an assignment of a limited private type, which is, ummm, surprising. :-) You probably could use a constructor allocator to do that in limited (pun not intended) cases, but that would be a new object which couldn't exist outside of the container. Might be useful in some cases... Randy.