diff --git a/sol/stack.hpp b/sol/stack.hpp index 4ecc0ede..e6dbfdde 100644 --- a/sol/stack.hpp +++ b/sol/stack.hpp @@ -188,6 +188,11 @@ struct pusher { lua_settable(L, -3); } } + + template> = 0> + static void push(lua_State*, T& ref) { + ref.push(); + } }; template<> @@ -197,13 +202,6 @@ struct pusher { } }; -template<> -struct pusher { - static void push(lua_State*, reference& r) { - r.push(); - } -}; - template<> struct pusher { static void push(lua_State* L, const nil_t&) {