Typed variadic template syntax?

Stanislav Blinov stanislav.blinov at gmail.com
Wed Jan 29 01:53:14 PST 2014


On Wednesday, 29 January 2014 at 09:50:13 UTC, Timon Gehr wrote:

> import std.range, std.algorithm;
> int value(int xs[]...) {
>     return reduce!((a,b)=>10*a+b)(0,xs.retro);
> }

Sadly, you can't build a struct (with N int fields) or an enum 
this way.


More information about the Digitalmars-d mailing list