Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-878

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.1.2, 4.1.3, 4.1.4, 4.2.0
    • 4.2.2
    • 22. Localization
    • None
    • All

    • Incorrect Behavior

    Description

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            farid Farid Zaripov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified