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

[LWG #836] LVS _222612Y41 errors on std::money_get extracting space

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.1.2, 4.1.3, 4.1.4, 4.2.0, 4.2.1
    • 4.3.0
    • 22. Localization
    • None
    • Incorrect Behavior

    Description

      The Plum Hall test lvs07a/conform/t228.dir/_222612Y41.cpp that exercises the std::money_get facet fails at runtime with the following errors:

      $ ./_222612Y41
      ***** Reached first test *****
      ERROR in _222612Y41.cpp at line 85: "" != "-12345678901234"
      ERROR in _222612Y41.cpp at line 88: (49) != (121)
      #FAILED:  _222612Y41 (><)
      ***** 4 individual successful items in _222612Y41 *****
      ***** 0 successful test cases in _222612Y41 *****
      ***** 1 error detected in _222612Y41 *****
      ***** 0 skipped sections in _222612Y41 *****
      

      The expects whitespace to be optional where the money_base::space specifier appears in the pattern format.

      According to [locale.money.get.virtuals] para. 2:

      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.

      We interpret this to mean that:

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

      but other interpretations may be plausible. Clearly Plum Hall must read it differently. Seems like an issue in the standard. I've posted a question to c++std-lib@accu.org to get a clarification.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebor Martin Sebor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

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