comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: limited types (Was: Records that could be arrays)
Date: Sat, 25 Feb 2006 19:01:06 -0600
Date: 2006-02-25T19:01:06-06:00	[thread overview]
Message-ID: <W_-dnfqke-ktYZ3ZnZ2dnUVZ_tKdnZ2d@megapath.net> (raw)
In-Reply-To: ufym7tr6w.fsf@earthlink.net

"Matthew Heaney" <matthewjheaney@earthlink.net> 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.





  reply	other threads:[~2006-02-26  1:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-24 16:51 limited types (Was: Records that could be arrays) Thierry Bernier
2006-02-24 21:57 ` Randy Brukardt
2006-02-25  2:21   ` Matthew Heaney
2006-02-25  3:38     ` Matthew Heaney
2006-02-25 11:06   ` Dmitry A. Kazakov
2006-02-25 15:05     ` Matthew Heaney
2006-02-26  1:01       ` Randy Brukardt [this message]
2006-02-26  9:00       ` Dmitry A. Kazakov
2006-02-26 18:20         ` Matthew Heaney
2006-02-26 20:52           ` Dmitry A. Kazakov
2006-02-26 22:07             ` Matthew Heaney
2006-02-27  9:11               ` Dmitry A. Kazakov
2006-02-27 14:34                 ` Georg Bauhaus
2006-02-27 16:05                   ` Dmitry A. Kazakov
2006-02-27 16:52                     ` Matthew Heaney
2006-02-27 20:21                       ` Dmitry A. Kazakov
2006-02-27 21:40                         ` Georg Bauhaus
2006-02-28  9:38                           ` Dmitry A. Kazakov
2006-02-27 23:00                         ` Matthew Heaney
2006-02-28  9:39                           ` Dmitry A. Kazakov
2006-02-28 17:24                             ` Matthew Heaney
2006-02-28 19:06                               ` Dmitry A. Kazakov
2006-02-28 19:58                                 ` Matthew Heaney
2006-02-28 21:03                                   ` Dmitry A. Kazakov
2006-02-28 21:51                                   ` limited types Simon Wright
2006-03-01  1:59                                     ` Matthew Heaney
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox