mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Remove reference when creating new reference types on the stack
This commit is contained in:
parent
2f84be5c5e
commit
54f030873f
|
@ -68,9 +68,9 @@ inline T& get(types<userdata<T>>, lua_State* L, int index = -1) {
|
|||
return *obj;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T get(types<T>, lua_State* L, int index = -1) {
|
||||
return T(L, index);
|
||||
template <typename T, typename U = typename std::remove_reference<T>::type>
|
||||
inline U get(types<T>, lua_State* L, int index = -1) {
|
||||
return U(L, index);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
|
Loading…
Reference in New Issue
Block a user