From ecb44462af3f72246865d8b283d16ba713d9a962 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 26 Nov 2013 01:21:53 -0500 Subject: [PATCH] Revert "Allow push to work with types that inherit from reference" This reverts commit f2d72f7bb23c2c2d0e9b9d8b924e574907e5fd52. --- sol/stack.hpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) 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) {