comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
Date: Thu, 15 Sep 2022 18:03:16 +0300	[thread overview]
Message-ID: <jogt5kF4gf3U1@mid.individual.net> (raw)
In-Reply-To: <f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>

On 2022-09-15 17:26, Marius Amado-Alves wrote:
>> ... it seems best to have compilers for pre-202x at hand in case a
>> program needs Ada 2005 containers or Ada 2012 containers. (G.B.)
> 
> Sorry, but is all this new stuff not backward-compatible? (Except
> maybe a teeny thing or two, easy to fix.)


The incompatibility seems to arise only if one derives from the 
container types defined in the library. I don't think that is often 
needed in an application.


> BTW, do the new containers fix map iteration? I'm always stupefied at
> not being possible to iterate a map like you do a vector.


Maps supported iteration already in Ada 2005, when the standard 
containers were added to Ada. There are functions First and Next, to 
give the first map element and to advance from an element to the next 
element, and also a procedure Iterate that traverses the whole map and 
performs some action on each element. In current Ada, one can also 
iterate over a map with the "generalized loop iteration" syntax, as in 
"for X of M loop ... end loop".

  reply	other threads:[~2022-09-15 15:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14 12:36 Non-standard functions in GNAT's Ada.Containers packages? G.B.
2022-09-14 16:04 ` Egil H H
2022-09-15  7:13   ` G.B.
2022-09-15 14:26     ` Marius Amado-Alves
2022-09-15 15:03       ` Niklas Holsti [this message]
2022-09-15 17:11         ` Marius Amado-Alves
2022-09-15 17:22           ` Dmitry A. Kazakov
2022-09-16 16:03             ` Marius Amado-Alves
2022-09-16 16:30               ` Marius Amado-Alves
2022-09-16 17:08                 ` Jere
2022-09-16 11:33           ` Björn Lundin
2022-09-16 15:00             ` Marius Amado-Alves
2022-09-16 15:42               ` Egil H H
2022-09-16 18:53               ` Björn Lundin
2022-09-16 15:47           ` Jere
replies disabled

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