From c01f15ca950be8b4ba72c363ce9e9a548908db0d Mon Sep 17 00:00:00 2001 From: ThePhD Date: Wed, 2 Mar 2016 09:51:40 -0500 Subject: [PATCH] g++ makes me sad --- sol/function_types_member.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sol/function_types_member.hpp b/sol/function_types_member.hpp index 7c0dec3f..ffc59f79 100644 --- a/sol/function_types_member.hpp +++ b/sol/function_types_member.hpp @@ -36,8 +36,12 @@ struct functor_function : public base_function { template functor_function(Args&&... args): fx(std::forward(args)...) {} + int call(lua_State* L) { + return stack::call_into_lua(meta::tuple_types(), args_types(), fx, L, 1); + } + virtual int operator()(lua_State* L) override { - auto f = [&](lua_State* L) -> int { return stack::call_into_lua(meta::tuple_types(), args_types(), fx, L, 1);}; + auto f = [&](lua_State* L) -> int { return this->call(L);}; return detail::trampoline(L, f); } }; @@ -64,8 +68,12 @@ struct member_function : public base_function { template member_function(Tm&& m, Args&&... args): fx(std::forward(m), std::forward(args)...) {} + int call(lua_State* L) { + return stack::call_into_lua(meta::tuple_types(), args_types(), fx, L, 1); + } + virtual int operator()(lua_State* L) override { - auto f = [&](lua_State* L) -> int { return stack::call_into_lua(meta::tuple_types(), args_types(), fx, L, 1);}; + auto f = [&](lua_State* L) -> int { return this->call(L);}; return detail::trampoline(L, f); } };