[RFC] moneypunct::frac_digits < 0 ?!?
Paolo Carlini
pcarlini@suse.de
Wed Mar 3 15:23: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.)
>
>
... thinking more about this: currently there is the requirement that:
"The number of digits required after the decimal point (if any) is exactly
the value returned by frac_digits()".
So, if frac_digits() is, say -2?
If I understand well your message, no digits are required after the
decimal_point and we discard the rightmost two digits of the integer part.
These details must really be written *from scratch* in the standard ;)
Paolo.
More information about the Libstdc++
mailing list