Access template parameters at runtime
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Aug 10 07:02:13 PDT 2012
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
More information about the Digitalmars-d
mailing list