I recently incorporated toLua++ into my code and noticed that the +, - and * operators for b2Vec2 are not declared as members of the struct.
This sucks because tolua++ does not support the binding of non member operator binding.
I tried to replace them with equivalent operators as members of the struct, and this compiles fine but causes asserts when I run the code. Plus, I wanted to avoid modifying the box2d source.
I guess this isn't much of a problem since I can live with it (I can just write some metamethods in lua to fix this) but I was just wondering what significance there is in declaring these three operators in this way. Are class member operators incapable of being inlined?
This sucks because tolua++ does not support the binding of non member operator binding.
I tried to replace them with equivalent operators as members of the struct, and this compiles fine but causes asserts when I run the code. Plus, I wanted to avoid modifying the box2d source.
I guess this isn't much of a problem since I can live with it (I can just write some metamethods in lua to fix this) but I was just wondering what significance there is in declaring these three operators in this way. Are class member operators incapable of being inlined?