Browse Source

workaround for an issue of gcc7

Michele Caini 6 years ago
parent
commit
0d835e5014
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/entt/meta/factory.hpp

+ 2 - 1
src/entt/meta/factory.hpp

@@ -181,8 +181,9 @@ meta_any invoke([[maybe_unused]] meta_handle handle, meta_any *args, std::index_
     using helper_type = meta_function_helper_t<decltype(Candidate)>;
     using helper_type = meta_function_helper_t<decltype(Candidate)>;
     meta_any any{};
     meta_any any{};
 
 
-    [[maybe_unused]] const auto direct = std::make_tuple([any = args+Indexes](const auto index) {
+    [[maybe_unused]] const auto direct = std::make_tuple([args](const auto index) {
         using arg_type = std::tuple_element_t<index.value, typename helper_type::args_type>;
         using arg_type = std::tuple_element_t<index.value, typename helper_type::args_type>;
+        auto *any = args + index.value;
         auto *instance = any->template try_cast<arg_type>();
         auto *instance = any->template try_cast<arg_type>();
 
 
         if(!instance && any->template convert<arg_type>()) {
         if(!instance && any->template convert<arg_type>()) {