std.collection lets rename it into std,ridiculous.

a a at a.com
Mon Feb 20 08:22:32 PST 2012


> auto a = [1,2,3,4,5];
> auto b = a[0..3];
> assumeSafeAppend(b);
> b ~= 0;
> writeln(a);
>
> prints [1, 2, 3, 0, 5], so b is not reallocated in this case.

Just to clarify: this is not guaranteed to print [1, 2, 3, 0, 5], 
it only does
if there is still enough memory in a block allocated to b and it 
doesn't have
to be reallocated.


More information about the Digitalmars-d mailing list