-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
I was just struggling with a weird logical error where my event handler simply wouldn't be called by the .trigger function of the dispatcher.
Finally, I figured out my error:
struct SomeEvent
{
};
entt::dispatcher dispatcher;
// connected some handler...
dispatcher.trigger<SomeEvent>({});
That's it...
The error is the curly braces. The function works properly if you either give it full 'SomeEvent{}' or nothing at all... Somehow the curly braces evaluate to a wrong type hash.
@skypjack - The docs already give the correct two ways to use the function, but this does compile and is hard to spot - maybe the docs should mention this as something NOT to do?
Metadata
Metadata
Assignees
Labels
No labels