DIP42 - Add enum E(T) = expression; eponymous template support

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Jun 25 14:33:59 PDT 2013


On Tuesday, 25 June 2013 at 21:31:15 UTC, Walter Bright wrote:
> http://wiki.dlang.org/DIP42

I suppose the alias version will work too? IOW:

alias Select(size_t idx, T...) = T[idx];

static assert(is(Select!(0, int, float) == int));
static assert(is(Select!(1, int, float) == float));


More information about the Digitalmars-d mailing list