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
Just faced with the same issue trying to format GUID to its string representation. I use %02X to format the last bytes, but unexpectedly it was shown as non-US-ASCII character =(.
I don't think this is an enhancement. This just bit me and imho it's a plain bug: i specifically ask for some kind of numeric formatting and it simply doesnt. If I specify '%x' and the argument is a string it should just throw.
If I try to format a (u)int8 number, Boost.Format considers this as (unsigned) char, even if I use
%d
,%i
or%u
.This is a known and rather old issue.
The workaround is to cast the number to (u)int32, before formatting.
Nevertheless the current behavior leads to very subtle bugs, because the developer has to check the type of the number to be printed very carefully.
Plain
printf
handles (u)int8 numbers in combination with%d
,%i
or%u
correctly.Boost version: 1.68 (32bit)
Compiler: MSVC 15.8
The text was updated successfully, but these errors were encountered: