I'm having trouble binding pretty much any classes from CML (configurable math library) to Lua. Due to them being such a tangled mess of templates and macros, I can't seem to find the function signatures for the overloaded operator functions. I'm trying to use LuaBridge right now to register the cml::vector3f::operator+= function, and since there are so many overloads, I think I have to cast the address of the function to the function signature I want it to bind. Currently I'm trying:
.addFunction("__add", (Vector3& (*)(const Vector3&))&Vector3::operator+=)
(I have Vector3 typedef'ed to cml::vector3f) but that produces:
Address of overloaded function 'operator+=' does not match required type 'cml::vector<float, cml::fixed<3, -1> > &(const cml::vector<float, cml::fixed<3, -1> > &)'
I'm just about ready to punt on scripting altogether and just do everything in C++.