Is there a non-hacky (i.e. no assembly, ...) way to use boost functions to create callbacks with non-static class methods?
Currently for static methods:
list<function<void (LuaState&)> > _callbacks;
I was thinking something along the lines of
list<tuple<function<void (void *, LuaState&)>, void*> _callbacks;
but boost functions doesn't like those void*s.
function<void (LuaState&)> on_whatever
= bind(&my_class::my_method, &my_object_of_type_my_class, _1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With