Replace Event Implementor's Guards with compile-time base gathering
Closed this issue · 0 comments
LB-- commented
Currently resplunk::event::Implementor
uses runtime guarding to ensure an event is not accidentally called multiple times for a base that was in the inheritance chain multiple times, resulting in atrocious code, not to mention runtime overhead from the repeated typeid
expressions. Instead, all the bases should be gathered at compile time via tuples as type vectors and then used to generate code that calls the bases in the proper order. It will take some effort to get the tuples to act as sets, but after that the runtime overhead will be gone.