Created on 2016-04-12.00:00:00 last changed 104 months ago
Proposed resolution:
This wording is relative to N4582.
Change [locale.moneypunct] paragraph 2 as indicated:
-2- Where none or space appears, white space is permitted in the format, except where none appears at the end, in which case no white space is permitted. For input, the value space indicates that at least one space is required at that position. For output, the value space indicates one instance of the fill character ([locale.money.put.virtuals]).
The value space indicates that at least one space is required at that position. Where symbol appears, the sequence of characters returned by curr_symbol() is permitted, and can be required. Where sign appears, the first (if any) of the sequence of characters returned by positive_sign() or negative_sign() (respectively as the monetary value is non-negative or negative) is required. Any remaining characters of the sign sequence are required after all other format components. Where value appears, the absolute numeric monetary value is required.
The description of money_base::space is that "at least one space is required at that position." (N4582 subclause 22.4.6.3 [locale.moneypunct] paragraph 2)
When formatting for output ([locale.money.put.virtuals]), it is not clear that"the number of characters generated for the specified format" (excluding fill padding) includes exactly one character for money_base::space (if present), and
all characters corresponding to money_base::space (excluding fill padding) are copies of fill.
In particular, there is implementation divergence over point (b) as to whether U+0020 or fill should be used. Further, should a character other than fill be used, it is unclear when "the fill characters are placed where none or space appears in the formatting pattern", whether the fill characters are placed at the beginning or the end of the "space field".
I believe that a strict interpretation of the current wording supports U+0020; however, fill is more likely to be the pragmatic choice.History | |||
---|---|---|---|
Date | User | Action | Args |
2016-05-06 18:12:17 | admin | set | messages: + msg8083 |
2016-04-12 00:00:00 | admin | create |