TemplateOf

Determines the template T is an instance of.

alias TemplateOf(alias T : Base!Args, alias Base, Args...) = Base

Parameters

T

Template instance.

Return Value

Template T is an instance of.

Examples

static struct S(T)
{
}
static assert(__traits(isSame, TemplateOf!(S!int), S));

static void func(T)()
{
}
static assert(__traits(isSame, TemplateOf!(func!int), func));

template T(U)
{
}
static assert(__traits(isSame, TemplateOf!(T!int), T));

Meta