Best nogc method to insert element into the middle of an std.container Array?
Red Frog via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Aug 21 08:51:48 PDT 2015
I know inserting into the middle of arrays isn't the most
efficient thing to do, but I have my reasons... I could increase
the length by 1 and then shuffle all the values back one at a
time... but I assume it'd be better to rewrite the back half as a
single chunk?
I don't really know how to get ranges to play nice with container
arrays, and even if I can I don't know if they allocate in GC
memory...
Can anyone help me out with a good way to do this?
More information about the Digitalmars-d-learn
mailing list