alias with lambda syntax: alias fun2=a=>fun(a);

Artur Skawina via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 5 03:54:04 PDT 2014


> On 06/05/14 08:58, Timothee Cour via Digitalmars-d-learn wrote:

>>   //none of those work:
>>   //alias fun2=a=>fun(a);

  alias fun2=ALIAS!(a=>fun(a));

That 'ALIAS' template will need to be in module scope.
  
  alias ALIAS(alias A) = A;

artur


More information about the Digitalmars-d-learn mailing list