-
-
Notifications
You must be signed in to change notification settings - Fork 980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug any_cast for iOS clang compiler #2907
Conversation
iOS clang just only check literal value, it will be failed on some case
#else | ||
(operand->type() == typeid(ValueType)) | ||
#endif | ||
((operandTypeInfo == valueTypeInfo) || (std::strcmp(operandTypeInfo.name(), valueTypeInfo.name()) == 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we certainly dont need both comparisons. We should clearly identify which is needed on which platform.
Also this might be just an issue with your code. I fixed a similar issue in e2d1380
So please also provide an example where the == comparison fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't debug more detail on xcode like android studio (it will jump to std header to compare too, but xcode doesn't)
but when i debug to ValueType
and operand
has same `char* type_name = "P5WX11ProxyObjectN;", it failed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, pointer comparison may fail when the typeinfo is duplicated in different dynlibs. See the stackoverflow thread above.
However, this can be caused by missing dllexport on your ProxyObject and is not necessarily a bug in Ogre.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paroj no, i'm build for ios on STATIC lib all, so i think it not about dllexport?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is an even stronger hint that something is off with your build. Ogre uses any_cast internally too, so if those work but your own does not it means you are somehow violating the ODR.
superceded by #2988 |
iOS clang just only check literal value, it will be failed on some case