Ole пре 10 година
родитељ
комит
a25b1c8df4
1 измењених фајлова са 9 додато и 14 уклоњено
  1. 9 14
      lib/luwra/usertypes.hpp

+ 9 - 14
lib/luwra/usertypes.hpp

@@ -293,20 +293,6 @@ struct Value<U*> {
 	}
 };
 
-/**
- * Constructor function for a type `T`. Variadic arguments must be used to specify which parameters
- * to use during construction.
- */
-template <typename T, typename... A>
-constexpr CFunction wrap_constructor =
-	&internal::construct_user_type<internal::StripUserType<T>, A...>;
-
-/**
- * This macros has no additional use whatsoever, but I makes the style consistent.
- */
-#define LUWRA_WRAP_CONSTRUCTOR(type, ...) \
-	(luwra::wrap_constructor<type, __VA_ARGS__>)
-
 /**
  * Property accessor method
  *
@@ -381,6 +367,15 @@ void register_user_type(
 
 LUWRA_NS_END
 
+/**
+ * Generate a `lua_CFunction` wrapper for a constructor.
+ * \param type Type to instantiate
+ * \param ...  Constructor parameter types
+ * \return Wrapped function as `lua_CFunction`
+ */
+#define LUWRA_WRAP_CONSTRUCTOR(type, ...) \
+	(&luwra::internal::construct_user_type<luwra::internal::StripUserType<type>, __VA_ARGS__>)
+
 /**
  * Generate a `lua_CFunction` wrapper for a method.
  * \param fun Fully qualified method name (Do not supply a pointer)