From b224dfdfacbdf18d0ca91f45efb26c535ff005f1 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Fri, 11 May 2018 22:25:03 +0200 Subject: [PATCH] trying to work around msvc limitations --- src/entt/entity/prototype.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/entt/entity/prototype.hpp b/src/entt/entity/prototype.hpp index 3f47a6b5a..c968bdac2 100644 --- a/src/entt/entity/prototype.hpp +++ b/src/entt/entity/prototype.hpp @@ -107,7 +107,8 @@ public: handlers.erase(std::remove_if(handlers.begin(), handlers.end(), [](const auto &handler) { using accumulator_type = bool[]; bool match = false; - accumulator_type accumulator = { (match = match || handler.type == registry_type::template type())... }; + auto test = [&handler](bool match, component_type ctype) { return match || handler.type == ctype; }; + accumulator_type accumulator = { (match = test(match, registry_type::template type()))... }; (void)accumulator; return match; }), handlers.end());