I am currently attempting to expose the Irrlicht engine to AngelScript. The first class I decided to implement was the 'dimension2d<T>' class.
Here is the line of code that is giving me problems:
u32 r;
//other registered functions snipped
r = engine->RegisterObjectMethod("dimension2f", "bool opEquals(const dimension2f &in) const", asFUNCTIONPR(operator==, (const dimension2df&), bool),asCALL_CDECL_OBJFIRST);
assert(r >= 0);
//snipped
Here is the output my compiler gives upon trying to build said code:
E:\pb\main.cpp|291|error: invalid static_cast from type '<unresolved overloaded function type>' to type 'bool (*)(const irr::core::dimension2df&)'|
And finally, here is the actual code from the dimension2d<T> class:
bool operator==(const dimension2d<T>& other) const
{
return core::equals(Width, other.Width) &&
core::equals(Height, other.Height);
}
The whole source file:
http://irrlicht.sour..._8h_source.html
It appears to be complaining about the actual class itself, but I do not know why. Is there anyone out there who can point me in the right direction? If you need more information let me know.
Thank you.