TemplateOf

Returns an alias to the template that T is an instance of. It will return void if a symbol without a template is given.

  1. template TemplateOf(alias T : Base!Args, alias Base, Args...)
    template TemplateOf (
    alias T : Base!Args
    alias Base
    Args...
    ) {}
  2. template TemplateOf(T : Base!Args, alias Base, Args...)
  3. template TemplateOf(T)

Examples

struct Foo(T, U) {}
static assert(__traits(isSame, TemplateOf!(Foo!(int, real)), Foo));

Meta

Suggestion Box / Bug Report