Describe the bug
This library doesn't work correctly when used across DLL boundaries.
It's likely related to the code used to generate the Event ids.
void Bus::listen(...) {
constexpr auto eventID = internal::event_id<Event>()
}
That eventID will be different between EXE and DLL
To Reproduce
Create a bus and listener in EXE.
Pass a pointer to bus/listener to DLL.
Use Listener::listen() on DLL to subscribe to an event
Use Listener::unlistenAll() in EXE during shutdown.
Program crashes.
Expected behavior
Not to crash.
Build:
compiler: MSVC
Version: 2022
Link type: merged source
Any specific flags: no
Additional context
This particular usecase is an EXE that dynamically loads DLLs. The EXE provides the DLLs pointers to the bus/listener so the DLLs can subscribe to and send events.
Describe the bug This library doesn't work correctly when used across DLL boundaries. It's likely related to the code used to generate the Event ids.
That eventID will be different between EXE and DLL
To Reproduce
Expected behavior Not to crash.
Build:
Additional context This particular usecase is an EXE that dynamically loads DLLs. The EXE provides the DLLs pointers to the bus/listener so the DLLs can subscribe to and send events.