[Issue 9085] New: allow for iteration of const(V[K]) without casts
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 27 12:09:07 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9085
Summary: allow for iteration of const(V[K]) without casts
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: dbdavidson at yahoo.com
--- Comment #0 from Daniel Davidson <dbdavidson at yahoo.com> 2012-11-27 12:09:05 PST ---
As described in this thread
http://forum.dlang.org/post/qqouzioewrakuhpoeysy@forum.dlang.org
iteration on associative arrays and certain features that use iteration, like
getting the length, require a deep cast away of const. Part of the reason is
the keys are copied. This is probably unnecessary and a better approach would
be to have foreach(k,v;aa) assume that k is a ref const(K).
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list