You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your has_mapped_type definition may be dependent on the C++ implementation providing int and char 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.
Activity
nlohmann commentedon Jan 1, 2016
Doesn't the C++ standard guarantee
sizeof(char) == 1and anintto have a width of at least 16 bits?glenfe commentedon Jan 1, 2016
Yes? A C++ implementation can make sizeof(char) == sizeof(int) == 1 where CHAR_BIT is 16.
nlohmann commentedon Jan 1, 2016
I see... (Even though this would be really odd...)
glenfe commentedon Jan 1, 2016
Here's one possible fix:
Also, consider changing the next line to:
nlohmann commentedon Jan 1, 2016
That's way more elegant. Thanks a lot for nitpicking on this. And Happy New Year!
fix for #166