diff --git a/sol/userdata.hpp b/sol/userdata.hpp index 0c1675e8..0d4e0bda 100644 --- a/sol/userdata.hpp +++ b/sol/userdata.hpp @@ -86,7 +86,7 @@ private: } }; - template + template struct destructor { static int destruct(lua_State* L) { userdata_t udata = stack::get(L, 1); @@ -97,16 +97,16 @@ private: } }; - template + template void build_function_tables() {} - template - void build_function_tables(std::string name,Ret T::* func, Args&&... args) { - typedef typename std::decay::type fx_t; + template + void build_function_tables(std::string name, Ret T::* func, Args&&... args) { + typedef typename std::decay::type function_type; functionnames.push_back(std::move(name)); - functions.emplace_back(detail::make_unique>(std::move(func))); - functiontable.push_back({ functionnames.back().c_str(), &base_function::userdata::call }); - build_function_tables(std::forward(args)...); + functions.emplace_back(detail::make_unique>(std::move(func))); + functiontable.push_back({ functionnames.back().c_str(), &base_function::userdata::call }); + build_function_tables(std::forward(args)...); } public: