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!news3.google.com!out01b.usenetserver.com!news.usenetserver.com!in01.usenetserver.com!news.usenetserver.com!in03.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Dynamically reallocated buffer References: <1180679626.254857.59070@w5g2000hsg.googlegroups.com> <1180709349.464436.287820@g4g2000hsf.googlegroups.com> <46628ed5$0$23149$9b4e6d93@newsspool1.arcor-online.net> From: Stephen Leake Date: Mon, 04 Jun 2007 20:25:59 -0400 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:lUpivgJrQM2D7r71IQXGn/LRvz8= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 8400a4664ad97759e00d407517 Xref: g2news1.google.com comp.lang.ada:16066 Date: 2007-06-04T20:25:59-04:00 List-Id: Georg Bauhaus writes: > Stephen Leake wrote: >> Matthew Heaney writes: >> >>> 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). >> SAL.Poly.Unbounded_Arrays. http://stephe-leake.org/ada/sal.html > > How would I pass the array storage of an Array_Type object > to a byte copying function? (As in write_to_device(&buffer[0], > buffer.size());) That operation is not provided. You need to derive from Array_Type and provide an access function that returns the address of the current actual storage. -- -- Stephe