static foreach considered

Daniel N via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 17 00:39:23 PDT 2015


On Tuesday, 16 June 2015 at 21:21:26 UTC, Daniel N wrote:
> On Tuesday, 16 June 2015 at 20:39:44 UTC, Daniel N wrote:
>> Or is there a better way to accomplish the above?
>>
>

Yet another snippet.

static foreach(param; ParameterTypeTuple!((ref int _1) {}))
{
   // in my dream it remains 'ref int', doesn't decay into 'int'.
   void fun(param p) {}
}



More information about the Digitalmars-d mailing list