https://d.puremagic.com/issues/show_bug.cgi?id=12103
Summary: TypeTuple loop variable as template alias argument
doesn't work
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Peter Alexander <[email protected]> 2014-02-07
14:41:32 PST ---
See this:
template id(alias a) { alias id = a; }
void main() {
import std.typetuple;
alias TypeTuple!(() => 0, () => 1) fs;
foreach (i, f; fs)
assert(id!f() == i, i.stringof);
}
In both iterations, id!f aliases ()=>0, so the assertion fails on the second
iteration.
Expected behaviour: id!f aliases ()=>1 on the second iteration, and passes the
assertion.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------