Arrays are sufficient for ArrayLists? Really??

Mehrdad wfunction at hotmail.com
Mon May 16 13:04:07 PDT 2011


On 5/16/2011 12:59 PM, Andrei Alexandrescu wrote:
> On 5/16/11 2:56 PM, Timon Gehr wrote:
> I think it would take less time to actually paste the function in a file
> and try it. A cute possibility:
>
> void removeAt(T)(ref T[] arr, size_t index)
> {
> copy(retro(arr[0 .. index]), retro(arr[1 .. index + 1]));
> arr = arr[1 .. $];
> }
>
>
> Andrei

Sorry guys, _none_ of these unfortunately works.
See CyberShadow's reply on my question on SO:
http://stackoverflow.com/q/6015008/541686


More information about the Digitalmars-d mailing list