Another interesting hack: expand a static array into parameter arguments

Timon Gehr timon.gehr at gmx.ch
Wed Apr 2 13:01:52 PDT 2014


On 04/02/2014 09:46 PM, Andrej Mitrovic wrote:
> On Wednesday, 2 April 2014 at 19:40:41 UTC, Andrej Mitrovic wrote:
>> snip
>

Nice.

> Cleaned up version:
>...
> auto Delay(alias arg, size_t idx)() { return arg[idx]; }

I guess this would be more useful as a ref-returning @property function?


More information about the Digitalmars-d mailing list