A symbol.
$(D_KEYWORD true) if F is a function pointer, $(D_KEYWORD false) otherwise.
static assert(isFunctionPointer!(void function())); static assert(!isFunctionPointer!(void delegate())); static assert(isFunctionPointer!(() {})); void func() { } static void staticFunc() { } interface I { @property int prop(); } static assert(!isFunctionPointer!func); static assert(!isFunctionPointer!staticFunc); auto functionPointer = &staticFunc; auto dg = &func; static assert(isFunctionPointer!functionPointer); static assert(!isFunctionPointer!dg); static assert(!isFunctionPointer!(I.prop));
Function pointer is a pointer to a function. So a simple function is not a function pointer, but getting the address of such function returns a function pointer.
A function pointer doesn't save the context pointer, thus cannot have access to its outer scope.