[Issue 4707] auto ref for foreach loops
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 29 21:33:16 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4707
--- Comment #3 from David Simcha <dsimcha at yahoo.com> 2010-08-29 21:33:04 PDT ---
Another use case for this is if you are iterating over something that may be
expensive to copy. In these cases, doing foreach(elem; stuff) is inefficient
because it produces an unnecessary copy, but foreach(ref elem; stuff) isn't
generic enough because it won't work on ranges w/o lvalue elements.
--
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