Access template parameters at runtime
Andrej Mitrovic
andrej.mitrovich at gmail.com
Fri Aug 10 13:58:48 PDT 2012
On 8/10/12, jerro <a at a.com> wrote:
> This would be one way to do it:
On 8/10/12, Christophe Travert <travert at phare.normalesup.org> wrote:
> For example:
Guys I think you're overcomplecating it, you can just do:
struct SomeStruct(integers...)
{
enum ints = [integers];
int opIndex(size_t idx) /* ... */
{
return ints[idx];
}
}
enum or static both work.
More information about the Digitalmars-d
mailing list