incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r650902 - /stdcxx/trunk/src/num_put.cpp
Date Thu, 24 Apr 2008 15:02:18 GMT
Farid Zaripov wrote:
>> -----Original Message-----
>> From: Martin Sebor [mailto:msebor@gmail.com] On Behalf Of Martin Sebor
>> Sent: Thursday, April 24, 2008 8:53 AM
>> To: dev@stdcxx.apache.org
>> Subject: Re: svn commit: r650902 - /stdcxx/trunk/src/num_put.cpp
>>
>> I guess I don't understand why the float overloads are all 
>> unconditionally hardcoded:
>> http://fisheye6.cenqua.com/browse/stdcxx/trunk/src/num_put.cpp
>> ?r=trunk#l184
> 
>   Because I thought that is too late to implement float overloads and
> check them on
> every supporting platforms. Anyway _C_float case branch is not used at
> the moment
> (__rw_put_num() used in num_put<>::_C_put(), and _C_put() used in
> num_put<>::do_put()
> but there is no float overload for do_put()).

Okay, that makes me feel a little better because num_put must
already convert floats to doubles. We should probably comment
out the float branch in __rw_put_num().

So let me try to summarize the new behavior:

                 Solaris   Windows   Other
   float            X         X        X
   double          fmt       fmt     printf
   long double    printf     fmt     printf

   X        converted to double by iostreams
   fmt      formatted using __rw_fmat_infinite(double)
   printf   formatted using sprintf()

Did I get it right?

Btw., is there a test for this other than 22.locale.num.put?

Martin

Mime
View raw message