I'm toying around with integrating ChaiScript into my Qt applications. When I have a function (in C++) that has Qt's quint64 data type which is just a unsigned long long int, ChaiScript::eval() will throw an error with the message "bad any cast." But if I try to access a method that returns a quint32/64, the result is just fine. e.g.:
void Class::yolo(quint64 i) {
cout << (i * i) << endl;
}
quint64 Class::swag() {
return 14;
}
//...
Class c;
chai.add(var(&c), "c");
> c.yolo(20)
bad any cast
> print(c.swag())
14
Now let's saw I replace the parameter i's type with int, it works just fine and c.yolo(20) would return 400. Even replacing quint64 with unsigned long long int gives me the bad any cast.
I'm toying around with integrating ChaiScript into my Qt applications. When I have a function (in C++) that has Qt's
quint64data type which is just aunsigned long long int,ChaiScript::eval()will throw an error with the message "bad any cast." But if I try to access a method that returns aquint32/64, the result is just fine. e.g.:Now let's saw I replace the parameter
i's type withint, it works just fine andc.yolo(20)would return400. Even replacingquint64withunsigned long long intgives me thebad any cast.