Map one tuple to another Tuple of different type

TheFlyingFiddle via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jul 21 08:08:33 PDT 2014


On Monday, 21 July 2014 at 15:04:14 UTC, TheFlyingFiddle wrote:
> template staticIota(size_t s, size_t e, size_t step = 1)
> {
>     import std.typetuple : TypeTuple;
>     static if(s < e)
> 	alias staticIota = TypeTuple!(s, staticIota!(s + step, e, 
> step));
>     else
> 	alias staticIota = TypeTuple!();
> }

Edit: Missed the second step.



More information about the Digitalmars-d-learn mailing list