money_base::space and
money_base::none on money_get
Section: 28.3.4.7.2.3 [locale.money.get.virtuals] Status: C++11 Submitter: Martin Sebor Opened: 2008-05-17 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [locale.money.get.virtuals].
View all issues with C++11 status.
Duplicate of: 670
Discussion:
In paragraph 2, 28.3.4.7.2.3 [locale.money.get.virtuals] specifies the following:
Where
spaceornoneappears in the format pattern, except at the end, optional white space (as recognized byct.is) is consumed after any required space.
This requirement can be (and has been) interpreted two mutually exclusive ways by different readers. One possible interpretation is that:
- where
money_base::spaceappears in the format, at least one space is required, and- where
money_base::noneappears in the format, space is allowed but not required.
The other is that:
where either
money_base::spaceormoney_base::noneappears in the format, white space is optional.
[ San Francisco: ]
Martin will revise the proposed resolution.
[ 2009-07 Frankfurt: ]
There is a noun missing from the proposed resolution. It's not clear that the last sentence would be helpful, even if the word were not missing:
In either case, any required MISSINGWORD followed by all optional whitespace (as recognized by
ct.is()) is consumed.Strike this sentence and move to Review.
[ Howard: done. ]
[ 2009-10 Santa Cruz: ]
Move to Ready.
Proposed resolution:
I propose to change the text to make it clear that the first interpretation is intended, that is, to make following change to 28.3.4.7.2.3 [locale.money.get.virtuals], p. 2:
When
money_base::spaceormoney_base::noneappears as the last element in the format pattern,except at the end, optional white space (as recognized byno white space is consumed. Otherwise, wherect.is) is consumed after any required space.money_base::spaceappears in any of the initial elements of the format pattern, at least one white space character is required. Wheremoney_base::noneappears in any of the initial elements of the format pattern, white space is allowed but not required. If(str.flags() & str.showbase)isfalse, ...