Browse Source

workaround for an issue with clang 6

Michele Caini 6 years ago
parent
commit
4376bbe40b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/entt/meta/factory.hpp

+ 3 - 3
src/entt/meta/factory.hpp

@@ -712,9 +712,9 @@ class extended_meta_factory: public meta_factory<Type> {
     }
     }
 
 
     template<typename Func>
     template<typename Func>
-    auto unpack(choice_t<1>, Func func)
-    -> decltype(unpack(choice<3>, func())) {
-        unpack(choice<3>, func());
+    std::enable_if_t<std::is_invocable_v<Func>, void>
+    unpack(choice_t<1>, Func &&func) {
+        unpack(choice<3>, std::forward<Func>(func)());
     }
     }
 
 
     template<typename Key, typename... Value>
     template<typename Key, typename... Value>