> -----Original Message-----
> From: [EMAIL PROTECTED]
> Sent: Fri, 11 May 2007 16:54:37 -0600
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: money_get example output
> 
> Mark Brown wrote:
>> Hi all,
>> 
>> Out of curiosity I tried compiling and running the example from the
>> money_get page with stdcxx on Linux but the output is different than the
>> documentation shows. So I tried it with g++ and the output is different
>> still. Is the documentation incorrect or is there a bug in the library?
>> Can someone explain what the correct output should be?
>> 
>> $ ./money_get-stdcxx
>> $100.02 -->  --> 0e-2175
>> $ ./money_get-g++
>> $100.02 -->  --> 1.432e-3754
>> 
>> The example program is on this page:
>> http://incubator.apache.org/stdcxx/doc/stdlibref/money-get.html
> 
> I think the problem is that the example code on the documentation
> page doesn't set the locale. The real example (i.e., the actual
> program) does: it sets it to the English US locale. The code is
> here:
> http://svn.apache.org/repos/asf/incubator/stdcxx/trunk/examples/manual/moneyget.cpp
> 
> The reason why stdcxx and libstdc++ produce different output in
> the default "C" locale is in all likelihood because the facet
> fails to store a value in the uninitialized variable and the
> example ends up writing out bogus bits.
> 
> Can you please open a new Documentation issue for this?

Done! The issue is https://issues.apache.org/jira/browse/STDCXX-411

-- Mark

Reply via email to