foreach on const(V[K])

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Nov 27 08:08:53 PST 2012


On 11/27/12 10:32 AM, Dan wrote:
> At the risk of being too persistent ... are there any opinions on this?
> It seems a small tweak to the meaning of foreach with associative arrays
> would fix some issues requiring unnecessary casts. It should also be
> more efficient as there would be no need for extra copying of keys.

As far as I understand you reveal it's impossible to iterate a 
const(V[K]), which is an implementation bug. Please file it with bugzilla.

Thanks,

Andrie


More information about the Digitalmars-d mailing list