diff --git a/sol/stack.hpp b/sol/stack.hpp index 4f7d1afd..18339656 100644 --- a/sol/stack.hpp +++ b/sol/stack.hpp @@ -230,11 +230,11 @@ auto rtl_pop(lua_State*, F&& f, types, types<>, Vs&&... vs) -> decltype return f(std::forward(vs)...); } template -auto rtl_pop(lua_State* L, F&& f, types t, types, Vs&&... vs) -> decltype(f(std::forward(std::declval())...)) { +auto rtl_pop(lua_State* L, F&& f, types t, types, Vs&&... vs) -> decltype(f(std::declval()...)) { return rtl_pop(L, std::forward(f), t, types<>(), pop(L), std::forward(vs)...); } template -auto rtl_pop(lua_State* L, F&& f, types t, types, Vs&&... vs) -> decltype(f(std::forward(std::declval())...)) { +auto rtl_pop(lua_State* L, F&& f, types t, types, Vs&&... vs) -> decltype(f(std::declval()...)) { return rtl_pop(L, std::forward(f), t, types(), pop(L), std::forward(vs)...); } } // detail