836. Effects of 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 space or none appears in the format pattern, except at the end, optional white space (as recognized by ct.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:

  1. where money_base::space appears in the format, at least one space is required, and
  2. where money_base::none appears in the format, space is allowed but not required.

The other is that:

where either money_base::space or money_base::none appears 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::space or money_base::none appears as the last element in the format pattern, except at the end, optional white space (as recognized by ct.is) is consumed after any required space. no white space is consumed. Otherwise, where money_base::space appears in any of the initial elements of the format pattern, at least one white space character is required. Where money_base::none appears in any of the initial elements of the format pattern, white space is allowed but not required. If (str.flags() & str.showbase) is false, ...