A symbol.
$(D_KEYWORD true) if F is a function, $(D_KEYWORD false) otherwise.
static assert(!isFunction!(void function())); static assert(!isFunction!(() {})); static assert(!isFunction!(void delegate())); void func() { } static void staticFunc() { } interface I { @property int prop(); } static assert(isFunction!func); static assert(isFunction!staticFunc); auto functionPointer = &staticFunc; auto dg = &func; static assert(!isFunction!functionPointer); static assert(!isFunction!dg); static assert(isFunction!(I.prop));
$(D_PSYMBOL isFunction) returns $(D_KEYWORD true) only for plain functions, not function pointers or delegates. Use $(D_PSYMBOL isFunctionPointer) or $(D_PSYMBOL isDelegate) to detect them or $(D_PSYMBOL isSomeFunction) for detecting a function of any type.