Преглед изворни кода

meta: @Innokentiy-Alaytsev was right and I was not :)

Michele Caini пре 5 година
родитељ
комит
5e85068e35
1 измењених фајлова са 7 додато и 3 уклоњено
  1. 7 3
      src/entt/meta/meta.hpp

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

@@ -307,9 +307,7 @@ public:
      * @return A meta any containing the returned value, if any.
      */
     template<typename... Args>
-    meta_any invoke(const id_type id, Args &&... args) const {
-        return type().invoke(id, *this, std::forward<Args>(args)...);
-    }
+    meta_any invoke(const id_type id, Args &&... args) const;
 
     /**
      * @brief Sets the value of a given variable.
@@ -1519,6 +1517,12 @@ private:
 }
 
 
+template<typename... Args>
+meta_any meta_any::invoke(const id_type id, Args &&... args) const {
+    return type().invoke(id, *this, std::forward<Args>(args)...);
+}
+
+
 template<typename Type>
 bool meta_any::set(const id_type id, Type &&value) const {
     return type().set(id, *this, std::forward<Type>(value));