Getting around the lack of foreach in CTFE

bearophile bearophileHUGS at lycos.com
Fri Mar 28 05:29:48 PDT 2014


Colin Grogan:

> Currently, I've been using a lot of recursive templates, but 
> its beginning to give me a headache and I'd like to see if 
> there's better ways around it.

That's a good strategy.

In some cases you can use Iota:
https://d.puremagic.com/issues/show_bug.cgi?id=4085


> On a related note, is there plans to add foreach support to 
> CTFE?

Yes, it's being worked on now by Timon. See the latest DIP.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list