On Friday, 10 August 2012 at 14:02:08 UTC, Andrei Alexandrescu wrote:
On 8/10/12 9:55 AM, Henning Pohl wrote:
A struct is meant to take only integers as parameters:

struct SomeStruct(intergers...) {
int opIndex(size_t idx) /* ... */ {
return integers[idx]; // Error ...
}
}

alias SomeStruct!(1, 2, 3) ss;


But it results in:
Error: undefined identifier integers, did you mean tuple intergers?


How can this problem be solved?

By fixing the typo?

Andrei

Oups, sorry, imagine there isn't one.

So the error is: variable idx cannot be read at compile time.

Reply via email to