I know of three places a TypeTuple can be used at:

1) Function parameter list

2) Template parameter list

3) Array literal element list

Are there more?

import std.typetuple;

void foo(int, string, double)
{}

struct S(T, float f)
{}

void main()
{
    // 1) Function parameter list: May not contain types
    foo(TypeTuple!(42, "hello", 1.5));

    // 2) Template parameter list: May contain types
    auto s = S!(TypeTuple!(char, 2.5))();

    // 3) Array elements: Elements must be the same type
    auto a = [ TypeTuple!(1, 2, 3, 4) ];

    // Are there other places that a TypeTuple can be used?
}

Ali

Reply via email to