From c8417d65ded074955390e5d14a5b966d32e08957 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Sun, 15 Dec 2013 16:56:01 -0500 Subject: [PATCH] `decltype` with `types`. It seems unfair. --- sol/stack.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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