Type of function to evaluate the parameters of.
Variadic list of types to compare Fun function parameters with.
void noParams(); bool boolParam(bool); string stringParam(string); float floatParam(float); alias N = typeof(noParams); alias B = typeof(boolParam); alias S = typeof(stringParam); alias F = typeof(floatParam); static assert(TakesParams!N); static assert(TakesParams!(B, bool)); static assert(TakesParams!(S, string)); static assert(TakesParams!(F, float));
void foo(); void foo1(string); void foo2(string, int); void foo3(bool, bool, bool); alias F = typeof(foo); alias F1 = typeof(foo1); alias F2 = typeof(foo2); alias F3 = typeof(foo3); static assert(TakesParams!F);//, AliasSeq!())); static assert(TakesParams!(F1, string)); static assert(TakesParams!(F2, string, int)); static assert(TakesParams!(F3, bool, bool, bool)); static assert(!TakesParams!(F, string)); static assert(!TakesParams!(F1, string, int)); static assert(!TakesParams!(F2, bool, bool, bool));
Given a function and a tuple of types, evaluates whether that function could be called with that tuple as parameters. Non-alias version (works on types).
Qualifiers like const and immutable are skipped, which may make it a poor choice if dealing with functions that require such arguments.
It is merely syntactic sugar, using std.meta and std.traits behind the scenes.