From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Is there a reason System.Storage_Pools isn't Pure?
Date: Sat, 22 Apr 2017 00:02:51 -0500
Date: 2017-04-22T00:02:51-05:00 [thread overview]
Message-ID: <odeo5r$2dm$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: a498c0f6-11ae-4050-ade0-bc35c686dc1c@googlegroups.com
"Shark8" <onewingedshark@gmail.com> 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.
next prev parent reply other threads:[~2017-04-22 5:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 6:31 Is there a reason System.Storage_Pools isn't Pure? Shark8
2017-04-18 18:32 ` Randy Brukardt
2017-04-18 23:42 ` Shark8
2017-04-19 7:37 ` Dmitry A. Kazakov
2017-04-19 18:50 ` Shark8
2017-04-19 19:48 ` Dmitry A. Kazakov
2017-04-19 20:42 ` Randy Brukardt
2017-04-19 20:36 ` Randy Brukardt
2017-04-20 0:12 ` Shark8
2017-04-22 5:02 ` Randy Brukardt [this message]
2017-04-22 17:18 ` Shark8
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox