This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/5579: Problems with money_get
- From: Martin Sebor <sebor at roguewave dot com>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 3 Feb 2002 05:46:07 -0000
- Subject: Re: libstdc++/5579: Problems with money_get
- Reply-to: Martin Sebor <sebor at roguewave dot com>
The following reply was made to PR libstdc++/5579; it has been noted by GNATS.
From: Martin Sebor <sebor@roguewave.com>
To: gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: libstdc++/5579: Problems with money_get
Date: Sat, 02 Feb 2002 22:53:35 -0700
Peter Schmid wrote:
>
> >Number: 5579
> >Category: libstdc++
> >Synopsis: Problems with money_get
...
> According to Table 14.15 on page 714 from the book "The C++ Standard
> Library" by Josuttis when pattern is set to { symbol, none, sign,
> value } $1234.54 should be legal input. But the following test case tmon
> does not work. I apologize if I made a mistake.
The locale containing your punctuation facet needs to be imbued in
the stream passed to money_get<>::get () in order for the function
to find it. Otherwise the default moneypunct (with an empty curr_symbol)
is used.
Also, the name of the function is do_thousands_sep(). The one in your
facet is misspelled (it's missing an 's' at the end).
Finally, the program needs to #include <locale> to bring moneypunct
et al into the namespace. Other than that, it seems correct but I
can't tell you if it works with the latest libstdc++ or not. It does
produce similarly bogus output with the older version that comes with
gcc 3.0.1.
Regards
Martin