comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <mheaney@on2.com>
Subject: Re: Dynamically reallocated buffer
Date: Fri, 01 Jun 2007 07:49:09 -0700
Date: 2007-06-01T07:49:09-07:00	[thread overview]
Message-ID: <1180709349.464436.287820@g4g2000hsf.googlegroups.com> (raw)
In-Reply-To: <1180679626.254857.59070@w5g2000hsg.googlegroups.com>

On Jun 1, 2:33 am, Maciej Sobczak <see.my.homep...@gmail.com> wrote:
>
> The problem is that Ada.Containers.Vectors does not provide the
> necessary guarantees to be any useful in this context.

Right, that container does not guarantee that the underlying structure
is a contiguous array (as is the case in C++).  Think of it not as an
unbounded array (which would a physical view), but rather as a
container that provides random access (which is the logical view).

In your case you'll probably have to use an unbounded array directly.
If you want a vector-like thing then you can just grab the vector
source code and modify it as you see fit.




  parent reply	other threads:[~2007-06-01 14:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-01  6:33 Dynamically reallocated buffer Maciej Sobczak
2007-06-01  7:15 ` anon
2007-06-01 13:04   ` Maciej Sobczak
2007-06-01  7:30 ` Dmitry A. Kazakov
2007-06-01 13:08   ` Maciej Sobczak
2007-06-01 11:32 ` Georg Bauhaus
2007-06-01 14:49 ` Matthew Heaney [this message]
2007-06-02 12:38   ` Stephen Leake
2007-06-03  9:52     ` Georg Bauhaus
2007-06-05  0:25       ` Stephen Leake
replies disabled

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