http://d.puremagic.com/issues/show_bug.cgi?id=10009
--- Comment #9 from [email protected] 2013-05-03 15:59:38 PDT --- (In reply to comment #8) > However, I don't think foreach_reverse is valid for this use case. An AA is > only forward-traversable. foreach_reverse is not possible, as buckets are > stored as singly-linked lists. If you want that, you need to first capture it > as an array. Yet this compiles: import std.stdio: writeln; void main() { auto aa = [1: 2, 2: 3]; foreach (k, v; aa) writeln(k, " ", v); foreach_reverse (k, v; aa) writeln(k, " ", v); } And outputs: 1 2 2 3 1 2 2 3 The foreach seems to give the same sequence as the foreach_reverse :-) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
