Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-05-17 12:54:40

At 05:34 PM 5/16/2001, Howard Hinnant wrote:

>On Wednesday, May 16, 2001, at 03:09 PM, Bill Seymour wrote:
>> I'm writing the I/O operators for the fixed-point decimal
>> classes; and it looks like I won't be able to take the easy
>> way out and use the money_put and money_get locale facets
>> after all because I might not want moneypunct::frac_digits()
>> digits to the right of the decimal point.
>> Somebody please tell me that there's something obvious
>> that I'm missing. 8-(
>I believe you are correct. frac_digits() is intended to represently
>*exactly* the number of digits after the decimal point. One could of
>course have frac_digits() return 0 if that is what one wants.
>To the best of knowledge, the std::money facets don't do the showpoint
>dance that you can do with the numeric facets.

If a standard library facility is totally hopeless for an application, then
sure, roll your own.

But if the standard library facility (in this case locales) works for the
majority of uses, maybe it would be better to go ahead and use it now, and
also file an enhancement request that it be extended to be able to handle
the need you couldn't meet. Always a possibility that someone not reading
this thread might be able to figure out a way to use the std lib, too.


Boost list run by bdawes at, gregod at, cpdaniel at, john at