Intermediate arrays
Jonathan M Davis
jmdavisProg at gmx.com
Sat Jul 7 12:19:49 PDT 2012
On Saturday, July 07, 2012 21:14:58 bearophile wrote:
> So my first suggestion is to add to std.array one simple array
> data structure, to be used to replace some usages of dynamic
> arrays (this suggestion requires no changes in the D language).
>
> Its memory is allocated in-place, so internally it uses a
> fixed-size array. But it also keeps inside a length, that denotes
> how many array items you are actually using. So it's like a
> dynamic array allocated in-place with a maximum length. In this
> array you can't insert more than 200 ints:
It sounds to me like you want std.container.Array with a custom allocator
which uses the stack.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list