diff --git a/sol/function.hpp b/sol/function.hpp index db974b92..ea66b699 100644 --- a/sol/function.hpp +++ b/sol/function.hpp @@ -94,7 +94,7 @@ namespace sol { template static std::function get_std_func(types, types, lua_State* L, int index) { unsafe_function f(L, index); - auto fx = [f = std::move(f), L, index](FxArgs&&... args) -> void { + auto fx = [f = std::move(f)](FxArgs&&... args) -> void { f(std::forward(args)...); }; return std::move(fx);