DIP42 - Add enum E(T) = expression; eponymous template support
Walter Bright
newshound2 at digitalmars.com
Tue Jun 25 14:41:44 PDT 2013
On 6/25/2013 2:33 PM, Andrej Mitrovic wrote:
> 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));
That's something separate.
More information about the Digitalmars-d
mailing list