Question about @nogc
anonymous via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue May 20 15:07:25 PDT 2014
On Tuesday, 20 May 2014 at 21:48:08 UTC, Timon Gehr wrote:
> Wtf. Is this really the point you are trying to make? :o)
>
> This achieves the same:
>
> template lookupTable(alias fn,uint max=255){
> static assert(max<uint.max);
> enum ReturnType!fn[max+1]
> lookupTable=iota(0,max+1).map!fn.array;
> }
Ha! That's ... much better. I wasn't trying to make any point,
though.
More information about the Digitalmars-d-learn
mailing list