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
Hi, I just tried to update fmtlib in a project and one test failed because the output of fmt::format changed for format strings like {:>06x}.
As soon as I add an alignment specifier, the 0 is ignored and the output filled with whitespace instead.
See the comparison between some versions of fmt here: https://godbolt.org/z/KfGjz9TG4
As I understand it, the combination of < and 0 doesn't make much sense, so it's ignored. For symmetry, it's also ignored when any other alignment specifier is present.
I'd say this is desired behaviour, but I miss documentation about it. Probably a note could be added to the paragraph about the '0' specifier?
Preceding the width field by a zero ('0') character enables sign-aware zero-padding for numeric types. It forces the padding to be placed after the sign or base (if any) but before the digits. This is used for printing fields in the form ‘+000000120’. This option is only valid for numeric types and it has no effect on formatting of infinity and NaN. This option is ignored when any alignment specifier is present.
The text was updated successfully, but these errors were encountered:
Hi, I just tried to update fmtlib in a project and one test failed because the output of
fmt::format
changed for format strings like{:>06x}
.As soon as I add an alignment specifier, the
0
is ignored and the output filled with whitespace instead.See the comparison between some versions of fmt here: https://godbolt.org/z/KfGjz9TG4
As I understand it, the combination of
<
and0
doesn't make much sense, so it's ignored. For symmetry, it's also ignored when any other alignment specifier is present.I'd say this is desired behaviour, but I miss documentation about it. Probably a note could be added to the paragraph about the '0' specifier?
The text was updated successfully, but these errors were encountered: