UFCS assignment syntax for templated function

rcorre via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jan 1 04:02:08 PST 2016


On Friday, 1 January 2016 at 11:59:39 UTC, rcorre wrote:
> auto val(T)(ref Bar!T bar, float val) { return bar.x = val; }

Uh, never mind. That `float` should have been `T`. Seems to work 
now.



More information about the Digitalmars-d-learn mailing list