]> code.bitgloo.com Git - clyne/entityx.git/commitdiff
Hack for VS internal error. Fixes #23 (again).
authorAlec Thomas <alec@swapoff.org>
Fri, 31 Oct 2014 05:24:40 +0000 (16:24 +1100)
committerAlec Thomas <alec@swapoff.org>
Fri, 31 Oct 2014 05:24:40 +0000 (16:24 +1100)
entityx/Event.h

index 9919eb825ec49d3ced39281ab6d18baf5e0bd13b..6e6757db7eec791a4f680843cd8d7b8d82da6519 100644 (file)
@@ -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);