isHandlerAddable

Judge traits of Handler for operation of adding

enum bool isHandlerAddable(Handler, Func);

Examples

1 static struct CallableStruct { void opCall(){} }
2 static class CallableClass { void opCall(){} }
3 
4 static assert(isHandlerAddable!(void function()[], void function()));
5 static assert(isHandlerAddable!(void delegate()[], void delegate()));
6 static assert(isHandlerAddable!(CallableStruct[],  CallableStruct));
7 static assert(isHandlerAddable!(CallableClass[],   CallableClass));
8 static assert(isHandlerAddable!(void delegate()[], void function()));
9 static assert(isHandlerAddable!(void delegate()[], CallableStruct));
10 static assert(isHandlerAddable!(void delegate()[], CallableClass));

Meta