std::numpunct<>::do_get() extracts too many optional whitespaces leaving none
for another fields like cukkency symbol or negative sign
--------------------------------------------------------------------------------------------------------------------------------------
Key: STDCXX-878
URL: https://issues.apache.org/jira/browse/STDCXX-878
Project: C++ Standard Library
Issue Type: Bug
Components: 22. Localization
Affects Versions: 4.2.0, 4.1.4, 4.1.3, 4.1.2
Environment: All
Reporter: Farid Zaripov
Priority: Minor
Fix For: 4.2.1
The 22.locale.money.get test fails with number of assertions.
The failed two checks:
Here the currency symbol contains space, but it's already extracted while
processing none pattern.
{noformat}
// all spaces extracted since currency symbol (last) is mandatory
// verify that the facet doesn't extract too many optional spaces
// leaving none for the final required currency symbol
TEST (T, 103.0, "103 ", 4, showbase, eofbit, 0, "[EMAIL PROTECTED]", " ");
{noformat}
Here the negative sign contains trailing space, but it's already extracted
while processing none pattern.
{noformat}
// { sign, value, none, symbol }
// negative_sign is "- ", (note the single trailing space)
// verify that the extraction suceeds, i.e., that the money_base::none
// specifier that's last in the pattern doesn't confuse the facet into
// extracting all the optional whitespace, leaving none to complete
// the negative_sign
TEST (T, -109.1, "-109 ", 6, 0, eofbit, 0, "[EMAIL PROTECTED]", "");
{noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.