import std.typecons;
enum s = tuple(new int[1]);
int[s[0].length] a;
void main() {
}
onlineapp.d(4): Error: Tuple([0]) must be an array or pointer type, not Tuple!(int[])
Workaround:
enum t = s[0];
int[t.length] a;
Comment #1 by maxsamukha — 2020-12-02T15:10:42Z
Independent test:
template alias_(a...) {
alias alias_ = a;
}
struct S {
int[] a;
alias fields = alias_!(S.tupleof);
alias fields this;
}
enum s = S(new int[1]);
int[s[0].length] a;
void main() {
}
Comment #2 by robert.schadek — 2024-12-13T19:13:07Z