Issue Details (XML | Word | Printable)

Key: STDCXX-878
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Farid Zaripov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

std::money_get::get() extracts too much whitespace

Created: 17/Apr/08 10:01 PM   Updated: 23/Apr/08 05:16 AM
Return to search
Component/s: 22. Localization
Affects Version/s: 4.1.2, 4.1.3, 4.1.4, 4.2.0
Fix Version/s: 4.2.2

Time Tracking:
Original Estimate: 4h
Original Estimate - 4h
Remaining Estimate: 4h
Remaining Estimate - 4h
Time Spent: Not Specified
Remaining Estimate - 4h

Environment: All

Severity: Incorrect Behavior


 Description  « Hide
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.

    // 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, "-1@$", " ");

Here the negative sign contains trailing space, but it's already extracted while processing none pattern.

    // { 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, "-1@$", "");


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Farid Zaripov added a comment - 17/Apr/08 10:03 PM
I'm afraid that is not so much time left for 4.2.1 release and possibly this issue should be deferred until 4.2.2 or even later.

Martin Sebor added a comment - 18/Apr/08 05:23 PM
Corrected/simplified Summary.

Martin Sebor added a comment - 23/Apr/08 05:16 AM
Deferred until 4.2.0 and estimated effort.