https://issues.dlang.org/show_bug.cgi?id=21187
Issue ID: 21187
Summary: `.tupleof` should be directly usable as alias
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
.tupleof solving generates a tuple for each use, so aliasing, without using an
AliasSeq, should work
---
struct F
{
alias thisTup = typeof(this).tupleof;
int a,b,c,d;
void test()
{
static foreach (i; 0 .. 4)
thisTup[i] = i + 1;
assert(a == 1);
assert(b == 2);
assert(c == 3);
assert(d == 4);
}
}
void main()
{
F().test();
}
---
--