From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada.Containers.Indefinite_Holders and limited types
Date: Wed, 15 Nov 2017 09:35:00 +0100
Date: 2017-11-15T09:35:00+01:00 [thread overview]
Message-ID: <ougu7j$1g1c$1@gioia.aioe.org> (raw)
In-Reply-To: oug039$c2g$1@gioia.aioe.org
On 15/11/2017 01:00, Victor Porton wrote:
> Why Ada.Containers.Indefinite_Holders (as of Ada2012) accepts "private"
> Element_Type? I would like it be "limited private" instead.
>
> The particular reason I want this is to hold Timing_Event inside an
> indefinite holder inside a record.
It is a design choice. Handles can use either external or internal
allocator. The latter option requires copying, so it cannot be limited,
the former option might be less comfortable.
I prefer design with an external allocator, so I pass a access type to
my generic handles package.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2017-11-15 8:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-15 0:00 Ada.Containers.Indefinite_Holders and limited types Victor Porton
2017-11-15 7:52 ` Simon Wright
2017-11-15 8:35 ` Dmitry A. Kazakov [this message]
2017-11-15 22:24 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox