manually call opUnary

Algo via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Nov 3 23:48:48 PST 2014


On Tuesday, 4 November 2014 at 07:19:05 UTC, Algo wrote:
> Is it possible?
> As in
> {
>      int a;
>      a.opUnary!"++"();
> }
> no property 'opUnary' for type 'int'

((ref typeof(a) x) => ++x)(a);
works


More information about the Digitalmars-d-learn mailing list