[RFC] moneypunct::frac_digits < 0 ?!?

Paolo Carlini pcarlini@suse.de
Wed Mar 3 15:05:00 GMT 2004


Nathan Myers wrote:

>A consistent interpretation of negative frac_digits() is that you
>append extra zeroes at the end.  I.e., if you get "3", and it says
>-2 digits, you print "300".  If you parse "300", discard the last 
>two digits.  (Probably the standard should be clarified to require
>this behavior.)
>
>This makes sense in dealing with massively inflated currencies, 
>when there is no information in the low digits.  (It might be
>invidious to suggest examples other than the Weimar mark.)
>
Thanks for your interesting (i.e., unexpected!) reply!

Actually, before some recent changes of mine, we consistently considered
< 0 identical to == 0, both in money_put and money_get! So, I was about
to post my excuses and fully restore the previous (3.3) behavior.

But now the perspective changes completely...

And, YES, the standard MUST be clarified! ;)

Paolo.



More information about the Libstdc++ mailing list