Fixing const arrays
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Dec 11 00:57:35 PST 2011
On 12/11/11 2:36 AM, Mehrdad wrote:
> On 12/11/2011 12:14 AM, Andrei Alexandrescu wrote:
>> What do you do inside that method? It's reasonable to not expect to
>> change it.
>>
>> Andrei
>
> Not sure right now, but something along the lines of
>
> auto copy = this;
> foreach (v; copy)
> ....;
>
> sounds like code I've definitely seen before.
I think you should write:
auto copy = this.save;
Andrei
More information about the Digitalmars-d
mailing list