On Friday, 16 August 2013 at 21:41:10 UTC, Ali Çehreli wrote:
import std.typetuple;

void main()
{
    alias TT = TypeTuple!(int, string);
    TT twoVars;
    static assert(is(typeof(twoVars[0]) == int));
    static assert(is(typeof(twoVars[1]) == string));
}

I am speechless. :)

Ali

Seeing as TypeTuple aliases itself away on instantiation (There is no such thing as a TypeTuple, only a builtin tuple created with TypeTuple), this is the same principle as

void foo(T ...)()
{
    T t = T.init;
    foreach(el; t)
        write(el,",");
}

foo!(int, double)(); //prints: "0,nan"

Reply via email to