isCallable

Members

Variables

isCallable
enum bool isCallable;
Undocumented in source.
isCallable
enum bool isCallable;
Undocumented in source.

Parameters

F

A symbol.

Return Value

$(D_KEYWORD true) if F is callable, $(D_KEYWORD false) otherwise.

Examples

static struct S
{
    void opCall()
    {
    }
}
class C
{
    static void opCall()
    {
    }
}
interface I
{
}
S s;

static assert(isCallable!s);
static assert(isCallable!C);
static assert(isCallable!S);
static assert(!isCallable!I);

Meta