-
Notifications
You must be signed in to change notification settings - Fork 780
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
Compile error in traits.hpp on OSX #341
Comments
Ok thanks. Yes, setting Really odd naming choice for that C macro. |
@AzothAmmo : It seems that the XCode "check" macro is a function call macro, so only "check(" will cause a problem. It seems to me that we could very easily avert this issue by renaming the shared_from_this_wrapper functions to something else, even check_(...). Alternatively, we could change the usages of it to be surrounded with '('')', like we do with min/max (thanks to another stupid macro). Would you accept either of those patches Shane? @astrodroid, if I were to put said patch together, could you validate it on OSX? |
Either of those solutions is fine. Alternatively check could be renamed test, which would also work unless there's another macro out there with that name too. |
merged #342 |
Hi,
I am using cereal to load game scenario/map data from file. So far this was working very well. But a couple of days ago, I had to move the classes that cereal serialises away from the game project in a separate static library that is used to calculate the objects position etc..
However as soon as I reference the cereal headers within that static library I encounter a compile error on the traits.hpp file:
The problem is a bit confusing as this only happens when compiling for OSX and not for iOS. If I understood what is happening correctly, it is not that the static check that is failing, but the compiler appears to be calling a macro called check contained within "AssertMacros.h" :
At the same time the same piece of code that doesn't work within the staticlibrary works fine if called from the main game project, for both iOS and OSX.
For now I have worked-around this issue by renaming the check methods within traits.hpp to "check_" which resolves the issue for me.
This is the full error log:
http://pastebin.com/6GPH6D50
The text was updated successfully, but these errors were encountered: