true if X is a function, false otherwise
static void func(){} static assert(isFunction!func); static assert(isFunction!(typeof(func))); auto fp = &func; // function pointer static assert(!isFunction!fp); int i; int f2() => i; // nested function static assert(isFunction!f2); struct S { void func(){} } static assert(isFunction!(S.func));
Use isFunctionPointer or isDelegate for detecting those types respectively.
Detect whether symbol or type X is a function. This is different from finding if a symbol is callable or satisfying is(X == return). It finds specifically if the symbol represents a normal function (or method) declaration, i.e. not a delegate or a function pointer.