ソースを参照

Move base version of Value<T> to usertypes.hpp

Ole 9 年 前
コミット
a0c439b5a6
共有2 個のファイルを変更した5 個の追加2 個の削除を含む
  1. 1 1
      lib/luwra/types.hpp
  2. 4 1
      lib/luwra/usertypes.hpp

+ 1 - 1
lib/luwra/types.hpp

@@ -33,7 +33,7 @@ using CFunction = lua_CFunction;
  * User type
  */
 template <typename T>
-struct Value: Value<T&> {};
+struct Value;
 
 // Nil
 template <>

+ 4 - 1
lib/luwra/usertypes.hpp

@@ -123,7 +123,7 @@ internal::StripUserType<U>& construct(State* state, A&&... args) {
  * User type
  */
 template <typename U>
-struct Value<U&> {
+struct Value {
 	using T = internal::StripUserType<U>;
 
 	/**
@@ -154,6 +154,9 @@ struct Value<U&> {
 	}
 };
 
+template <typename U>
+struct Value<U&>: Value<U> {};
+
 /**
  * User type
  */