www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9085] New: allow for iteration of const(V[K]) without casts

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 puremagic.com
        ReportedBy: dbdavidson yahoo.com



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: -------
Nov 27 2012