comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Convert between different container types
Date: Mon, 2 Oct 2017 18:29:34 -0500
Date: 2017-10-02T18:29:34-05:00	[thread overview]
Message-ID: <oqui4u$j8r$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: op6uo0$suu$1@gioia.aioe.org

You can use stream operations Read and Write to convert between two similar 
containers, including between an unbounded and bounded container of the same 
kind (vector, list, map, etc.). Other containers are too different 
internally to be convertable; you'll have to write your own conversion 
routine as suggested by someone else.

                                Randy.

"Victor Porton" <porton@narod.ru> wrote in message 
news:op6uo0$suu$1@gioia.aioe.org...
> Victor Porton wrote:
>
>> What is the easiest way to convert between different container types, for
>> example between Ada.Containers.Doubly_Linked_Lists and
>> Ada.Containers.Indefinite_Vectors as well as between these types and 
>> plain
>> old Ada arrays?
>
> Sorry, typo: I would instead consider the case when both containers are
> indefinite or both are not indefinite.
>
> -- 
> Victor Porton - http://portonvictor.org 



  reply	other threads:[~2017-10-02 23:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-11 21:19 Convert between different container types Victor Porton
2017-09-11 21:20 ` Victor Porton
2017-10-02 23:29   ` Randy Brukardt [this message]
2017-09-11 21:36 ` Simon Wright
replies disabled

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