Title
Format alignment specifiers vs. text direction
Status
c++20
Section
[format.string.std]
Submitter
Great Britain

Created on 2019-11-07.00:00:00 last changed 46 months ago

Messages

Date: 2019-11-08.12:06:23

Proposed resolution:

This wording is relative to N4835.

  1. 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 withinaligned to the start of the 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 withinaligned to the end of the available space. This is the default for arithmetic types other than charT and bool or when an integer presentation type is specified.
    […]
Date: 2019-11-08.12:06:23

[ 2019-11 Moved to Ready on Friday AM in Belfast ]

Date: 2019-11-07.00:00:00

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:

In [tab:format.align]: Forces the field to be left-aligned within aligned to the start of the available space and Forces the field to be right-aligned within aligned to the end of the available space

Jeff Garland:

Wiki notes from Belfast Wed:

# GB225

JG: 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.

History
Date User Action Args
2021-02-25 10:48:01adminsetstatus: wp -> c++20
2020-02-24 16:02:59adminsetstatus: voting -> wp
2020-01-17 04:54:50adminsetstatus: ready -> voting
2019-11-08 12:06:23adminsetmessages: + msg10804
2019-11-08 12:06:23adminsetstatus: new -> ready
2019-11-07 18:51:16adminsetmessages: + msg10795
2019-11-07 00:00:00admincreate