Skip to content

Commit d6af9e1

Browse files
committed
Add const-qualified variant of execute_on_all
1 parent f9e6537 commit d6af9e1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

connectivity/FEATURE_BLE/include/ble/common/ChainableEventHandler.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,15 @@ class ChainableEventHandler
102102
}
103103
}
104104

105+
template<typename... Args>
106+
void execute_on_all(void (T::*fn)(const Args&...), const Args&... args) {
107+
auto it = head;
108+
while(it) {
109+
(it->eh->*fn)(args...);
110+
it = it->next;
111+
}
112+
}
113+
105114
private:
106115

107116
struct node_t {

0 commit comments

Comments
 (0)