Aside: With 2.068, std.typetuple and TypeTuple are renamed as std.meta and AliasSeq, respectively.

On 08/17/2015 02:23 PM, Meta wrote:> For functions, we have std.traits.ParameterTypeTuple. Is there any
> equivalent functionality for templates?

There is TemplateArgsOf for instances of templates but I don't know anything more meta :) than that:

import std.traits;

void foo(int i, alias f, T)()
{}

void main()
{
    int bar(int) { return 0; }

    alias f = foo!(42, bar, int);
    pragma(msg, TemplateArgsOf!(f));
}

Prints

tuple(42, bar, (int))

Ali

Reply via email to