Are templates with variadic value parameters possible?

Basile B. via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jul 14 21:38:03 PDT 2016


On Friday, 15 July 2016 at 04:31:08 UTC, Devin Hill wrote:
> Thanks, that way of doing it does work. I guess that means 
> there's no easy way to make sure all T are the same type 
> without a template constraint?

Yes, immediatly, now, I think that a contraint has to be used. 
But you have several choices for the constraint, two obvious:

- recursive template.
- staticIota in a foreach. (aliasSeqOf!(iota(1, T.length))




More information about the Digitalmars-d-learn mailing list