-
Notifications
You must be signed in to change notification settings - Fork 78
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
Some mpl code does not work when char type is "unsigned char" by default (narrowing) #50
Comments
An easy solution would be to replace char by "signed char" in all the places where char appears:
But it does not work because the macros using AUX_WRAPPER_VALUE_TYPE are expecting a SINGLE word, like:
So more changes are required. Like:
But there are still compilation errors. Like:
I'm not an expert of this. Someone should have a look and provide a proposal so that "signed char" can be handled by this code. |
When fixing this issue please enable the bigendian CI job on GitHub Actions as part of the changes, as it fails because of this issue. |
When compiling libs/mpl/test/char.cpp on AIX with GCC 9.3, where "char" type is "unsigned char" by default, I have the following error:
Looking at details, the exact error is:
where -1 is used for creating a char, which is "unsigned char" on AIX (and on other systems). Thus, creating a char with value -1 is forbidden.
I've already seen this issue on other tests of Boost.
The possible solutions are:
Second solution seems to be the more appropriate solution, since it will work everywhere. Unless using negative values is required.
The text was updated successfully, but these errors were encountered: