This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]