A symbol.
$(D_KEYWORD true) if F is a delegate, $(D_KEYWORD false) delegate.
static assert(isDelegate!(void delegate())); static assert(!isDelegate!(void function())); static assert(!isDelegate!(() {})); void func() { } static void staticFunc() { } interface I { @property int prop(); } static assert(!isDelegate!func); static assert(!isDelegate!staticFunc); auto functionPointer = &staticFunc; auto dg = &func; static assert(!isDelegate!functionPointer); static assert(isDelegate!dg); static assert(!isDelegate!(I.prop));
Delegate stores the function pointer and function context.