Re: [Boost-bugs] [Boost C++ Libraries] #6627: nonfinite_num_put formatting of 0.0 is incorrect

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6627: nonfinite_num_put formatting of 0.0 is incorrect
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-03-01 23:05:50


#6627: nonfinite_num_put formatting of 0.0 is incorrect
------------------------------------------+---------------------------------
  Reporter: krwalker@… | Owner: pbristow
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: math
   Version: Boost 1.48.0 | Severity: Problem
Resolution: | Keywords:
------------------------------------------+---------------------------------

Comment (by krwalker@…):

 Do you have those reversed?

 {{{
 int main() {
   std::locale::global( std::locale( std::locale(),
     new boost::math::nonfinite_num_put< char >() ) );

   writeZero( std::cout );
   std::cout << std::endl; // 00.00

   std::stringstream astream;
   writeZero( astream );
   std::cout << astream.str() << std::endl; // 00000

   return 0;
 }
 }}}

 "Changing the global locale does not change the locales of pre-existing
 streams. If you want to imbue the new global locale on cout, you should
 call std::cout.imbue(locale()) after calling std::locale::global()." --
 http://stdcxx.apache.org/doc/stdlibug/24-3.html

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6627#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC