isHandler
enum bool isHandler(Handler);
1 static struct CallableStruct { void opCall(){} }
2 static class CallableClass { void opCall(){} }
3
4 static assert(isHandler!(void function()));
5 static assert(isHandler!(void delegate()));
6 static assert(isHandler!(CallableClass));
7 static assert(isHandler!(CallableStruct));
8 static assert(isHandler!(void function()[]));
9 static assert(isHandler!(void delegate()[]));
10 static assert(isHandler!(CallableStruct[]));
11 static assert(isHandler!(CallableClass[]));
12 void delegate(Exception)[] handler = void;
13 static assert(isHandler!(void delegate(Exception)[]));
Judge traits of Handler