@safe void handler() {}; @safe void handler2() {}; Signal!() onTest; assert(onTest.calculateLength() == 0); onTest.connect(&handler); assert(onTest.calculateLength() == 1); onTest.connect(&handler2); assert(onTest.calculateLength() == 2); onTest.clear(); assert(onTest.calculateLength() == 0); onTest();
Calculate the number of registered handlers
Complexity: O(n)