Function to evaluate the parameters of.
Variadic list of types to compare fun's function parameters with.
void noParams(); bool boolParam(bool); string stringParam(string); float floatParam(float); static assert(TakesParams!(noParams)); static assert(TakesParams!(boolParam, bool)); static assert(TakesParams!(stringParam, string)); static assert(TakesParams!(floatParam, float));
void foo(); void foo1(string); void foo2(string, int); void foo3(bool, bool, bool); static assert(TakesParams!(foo));//, AliasSeq!())); static assert(TakesParams!(foo1, string)); static assert(TakesParams!(foo2, string, int)); static assert(TakesParams!(foo3, bool, bool, bool)); static assert(!TakesParams!(foo, string)); static assert(!TakesParams!(foo1, string, int)); static assert(!TakesParams!(foo2, bool, bool, bool));
Given a function and a tuple of types, evaluates whether that function could be called with that tuple as parameters. Alias version (works on functions, not function types.)
Qualifiers like const andimmutable 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.