-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Member detector is not portable #166
Milestone
Comments
Doesn't the C++ standard guarantee |
Yes? A C++ implementation can make sizeof(char) == sizeof(int) == 1 where CHAR_BIT is 16. |
I see... (Even though this would be really odd...) |
Here's one possible fix:
Also, consider changing the next line to:
|
That's way more elegant. Thanks a lot for nitpicking on this. And Happy New Year! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your
has_mapped_type
definition may be dependent on the C++ implementation providingint
andchar
of different sizes. It is valid for an implementation to make them the same size.You can remedy this by changing the return types to types which will be different sizes.
The text was updated successfully, but these errors were encountered: