Beginner: How does an object delete itself?
Simen Kjaeraas
simen.kjaras at gmail.com
Mon Sep 22 08:11:17 PDT 2008
On Sun, 21 Sep 2008 18:31:07 +0200, bearophile <bearophileHUGS at lycos.com>
wrote:
> Simen Kjaeraas:
>> // If order is important, iterate through rest of array, moving
>> elements one step forward
>
> I'd like to use the normal D slice syntax for this copying, but you
> can't, because that syntax can be used only when arrays don't overlap.
>
> Bye,
> bearophile
I guess one could use memmove, if one wanted. But as you say, slices would
be neater.
--
Simen
More information about the Digitalmars-d-learn
mailing list