From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,15e41875b75969fc X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g4g2000hsf.googlegroups.com!not-for-mail From: Matthew Heaney Newsgroups: comp.lang.ada Subject: Re: Dynamically reallocated buffer Date: Fri, 01 Jun 2007 07:49:09 -0700 Organization: http://groups.google.com Message-ID: <1180709349.464436.287820@g4g2000hsf.googlegroups.com> References: <1180679626.254857.59070@w5g2000hsg.googlegroups.com> NNTP-Posting-Host: 66.162.65.129 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1180709349 25451 127.0.0.1 (1 Jun 2007 14:49:09 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 1 Jun 2007 14:49:09 +0000 (UTC) In-Reply-To: <1180679626.254857.59070@w5g2000hsg.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g4g2000hsf.googlegroups.com; posting-host=66.162.65.129; posting-account=Zl1UPAwAAADEsUSm1PMMiDjihtBlZUi_ Xref: g2news1.google.com comp.lang.ada:16028 Date: 2007-06-01T07:49:09-07:00 List-Id: On Jun 1, 2:33 am, Maciej Sobczak 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.