The OpenD Programming Language

TemplateArgsOf

Returns a AliasSeq of the template arguments used to instantiate T.

  1. alias TemplateArgsOf(alias T : Base!Args, alias Base, Args...) = Args
    import std.traits;
    alias TemplateArgsOf(alias T : Base!Args, alias Base, Args...) = Args
  2. alias TemplateArgsOf(T : Base!Args, alias Base, Args...) = Args

Examples

import std.meta : AliasSeq;

struct Foo(T, U) {}
static assert(is(TemplateArgsOf!(Foo!(int, real)) == AliasSeq!(int, real)));

Meta