On Friday, 10 August 2012 at 14:05:16 UTC, Henning Pohl wrote:
Oups, sorry, imagine there isn't one.So the error is: variable idx cannot be read at compile time.
You can't index a tuple during compilation. You need to use an array:
struct SomeStruct(alias integers) {
int opIndex(size_t idx) {
return integers[idx];
}
}
alias SomeStruct!([1, 2, 3]) ss;
