Hello!
I am trying to register a vector class from the glm maths library. I am using the following line when I register the method which returns the x component of the vector:
r = engine->RegisterObjectMethod("Vec3", "float x()", asMETHOD(glm::vec3, x), asCALL_THISCALL); assert(r >= 0);
This however gives me a compilation error saying:
error: C-style cast from 'value_type glm::detail::tvec3<float>::*' to 'void (vec3::*)()' is not allowed
r = engine->RegisterObjectMethod("Vec3", "float x()", asMETHOD(glm::vec3, x), asCALL_THISCALL); assert(r >= 0);
^~~~~~~~~~~~~~~~~~~~~~
expanded from macro 'asMETHOD'
#define asMETHOD(c,m) asSMethodPtr<sizeof(void (c::*)())>::Convert((void (c::*)())(&c::m))
I am aware that this might be due to glm and not angelscript but I am just wondering if someone has any idea on how this could be solved.
Thanks!