It would be nice if luabridge::newFunction and addFunction would support the return value of std::bind, std::bind_front or a lambda with forwarded arguments, eg.:
luabridge::newFunction(L, std::bind_front(lua_draw_string, canvas));
ns["draw_string"] = luabridge::newFunction(
L, [&canvas](auto&& ... args) {
lua_draw_string(canvas, std::forward<decltype(args)>(args)...);
});
I might be completely wrong here and something like this is not possible with C++ (17+).
It would be nice if
luabridge::newFunctionandaddFunctionwould support the return value ofstd::bind,std::bind_frontor a lambda with forwarded arguments, eg.:I might be completely wrong here and something like this is not possible with C++ (17+).