|
Matthew Armstrong wrote:
I'm pretty sure the 'No such operator defined' error is coming from luabind,as the userdata I'm running this on comes from a luabind created object. If I temporarily remove the __tostring metamethod, the error goes away, so that solves my problem. Another thing luabind does is override the __eq metamethod, to what it thinks == should be, which is a somewhat complicated definition. What if I want to compare two userdata objects solely based on whether the references are equal?
Not sure whom you are asking, so just in case: I have no idea. Until 5 minutes ago I didn't know about luabind ;) (and I wouldn't touch C++ with a ten-foot pole). Good luck though.
- Peter OddingPS. As a quick hack you could consider debug.getmetatable(foo).__eq = nil, which should get you back to the default behavior.