isHandlerAssignable

Judge traits of Handler for operation of assign

enum bool isHandlerAssignable(Handler, Func);

Examples

1 static assert(isHandlerAssignable!(void function(), void function()));
2 static assert(!isHandlerAssignable!(void function(), void delegate()));
3 static assert(isHandlerAssignable!(void function()[], void function()));
4 static assert(!isHandlerAssignable!(void function()[], void delegate()));
5 static assert(isHandlerAssignable!(void delegate(), void delegate()));
6 static assert(isHandlerAssignable!(void delegate(), void function()));
7 static assert(isHandlerAssignable!(void delegate()[], void delegate()));
8 static assert(isHandlerAssignable!(void delegate()[], void function()));
9 
10 static assert(!isHandlerAssignable!(void function(), int));
11 static assert(!isHandlerAssignable!(void function()[], int));
12 static assert(!isHandlerAssignable!(void delegate(), int));
13 static assert(!isHandlerAssignable!(void delegate()[], int));

Meta