Any way to use static foreach on multiple types?
Andrej Mitrovic
andrej.mitrovich at gmail.com
Sun Oct 2 21:13:08 PDT 2011
On 10/3/11, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
> import std.typetuple;
> alias TypeTuple!(int, double) Types;
>
> void main()
> {
> foreach (T1, T2; Types, Reverse!Types)
> {
> }
> }
Oh I just figured out I'll have better coverage with nested foreach
loops. I can just use this:
foreach (T1; Types)
foreach (T2; Reverse!Types)
{
}
That pretty much solves my problem.
More information about the Digitalmars-d-learn
mailing list