diff --git a/sol/stack.hpp b/sol/stack.hpp index 5d4f67c5..be7907bd 100644 --- a/sol/stack.hpp +++ b/sol/stack.hpp @@ -84,18 +84,6 @@ inline void push_arithmetic(lua_State* L, T x, std::false_type) { // T is an floating point type lua_pushnumber(L, x); } - -template -inline void push_helper(lua_State* L, T& x, std::true_type) { - // T is a reference type - x.push(); -} - -template -inline void push_helper(lua_State* L, T& x, std::false_type) { - // T is a reference type - push_arithmetic(L, x, std::is_integral{}); -} } // detail template @@ -128,8 +116,8 @@ inline const char* pop(lua_State* L) { } template -inline void push(lua_State* L, T& t) { - detail::push_helper(L, t, std::is_base_of{}); +inline void push(lua_State* L, T arithmetic) { + detail::push_arithmetic(L, arithmetic, std::is_integral{}); } inline void push(lua_State* L, bool boolean) {