July 27, 2018 [Issue 19120] New: Cannot slice a struct with a tuple alias this | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19120 Issue ID: 19120 Summary: Cannot slice a struct with a tuple alias this Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: yshuiv7@gmail.com Right now if a struct has a tuple as its alias this, we could index it at compile time, but not slicing it. struct A(T...) { alias S = T; alias S this; } alias X = A!(int, double); alias Y = X[0]; // Fine alias Z = X[0..$]; // Not fine? https://godbolt.org/g/phwQFo -- |
Copyright © 1999-2021 by the D Language Foundation