Section: 22.214.171.124 [format.string.std] Status: C++20 Submitter: Great Britain Opened: 2019-11-07 Last modified: 2021-02-25 10:48:01 UTC
View other active issues in [format.string.std].
View all other issues in [format.string.std].
View all issues with C++20 status.
Addresses GB 225
std::format() alignment specifiers should be independent of text direction The align specifiers for formatting standard integer and string types are expressed in terms of "left" and "right". However, "left alignment" as currently defined in the format() specification might end up being right-aligned when the resulting string is displayed in a RTL or bidirectional locale. This ambiguity can be resolved by removing "left" and "right" and replacing with "start" and "end", without changing any existing implementation and without changing the intent of the feature.Proposed change:
Forces the field to be
the available space and Forces the field to be right-aligned within
the available space
Jeff Garland:Wiki notes from Belfast Wed:
# GB225JG: SG16 approved this. JG: If you scroll back up, you'll see see it's very tiny. Two line change. JG: I'm willing to submit an LWG issue to suggest we make a wording change to take it off our plate. CC: Is this the one that changes left/right to beginning/end? Some people: yes MC: Any problem with Jeff's proposed direction and this proposed fix? MC: I hear none.
[2019-11 Moved to Ready on Friday AM in Belfast]
This wording is relative to N4835.
Modify "Table 57 — Meaning of align options" [tab:format.align] as indicated:
Table 57 — Meaning of align options [tab:format.align] Option Meaning < Forces the field to be left-aligned withinthe available space. This is the default for non-arithmetic types, charT, and bool, unless an integer presentation type is specified. > Forces the field to be right-aligned withinthe available space. This is the default for arithmetic types other than charT and bool or when an integer presentation type is specified. […]