import std.stdio;
import std.typetuple : TypeTuple;

alias cs = TypeTuple!(0, 1, 2, 3);

void main(string[] argv)
{
    switch(argv.length)
    {
        default: writeln("Uknown number of args"); break;
        foreach(c; cs)
        {
            case c: writefln("%s args", c);
            break;
        }
    }
}

This works, but I dont know why or how, is there some documentation about this feature?

Reply via email to