diff options
-rw-r--r-- | entityx/Event.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/entityx/Event.h b/entityx/Event.h index 9919eb8..6e6757d 100644 --- a/entityx/Event.h +++ b/entityx/Event.h @@ -159,7 +159,8 @@ class EventManager : entityx::help::NonCopyable { */ template <typename E, typename ... Args> void emit(Args && ... args) { - E event(std::forward<Args>(args) ...); + // Using 'E event(std::forward...)' causes VS to fail with an internal error. Hack around it. + E event = E(std::forward<Args>(args) ...); auto sig = signal_for(std::size_t(E::family())); BaseEvent *base = &event; sig->emit(base); |