http://d.puremagic.com/issues/show_bug.cgi?id=4508
Summary: tuples should be indexable with foreach over range
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from David Simcha <[email protected]> 2010-07-26 09:53:12 PDT ---
The following should really work, as long as the bounds of the foreach loop are
known at compile time:
import std.typecons;
void main() {
auto tup = tuple(1, "foo", 3.0).expand;
foreach(i; 0..tup.length) {
auto val = tup[i];
}
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------