The analogue of "fill-pointer" in D

John Colvin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon May 18 05:26:48 PDT 2015


On Monday, 18 May 2015 at 11:40:13 UTC, thedeemon wrote:
> On Monday, 18 May 2015 at 10:24:25 UTC, Dennis Ritchie wrote:
>
>> No, afraid not. Function capacity is not an analogue of 
>> fill-pointers!
>
> It's exactly the same.

But in D capacity is affected by other things.

auto a = new int[20];
auto b = arr[0..10];
//can't now append to b without re-allocating or using 
assumeSafeAppend.


More information about the Digitalmars-d-learn mailing list