Subject: Re: [Boost-bugs] [Boost C++ Libraries] #859: boost::format ignores a user defined locale
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-09-10 16:47:28
#859: boost::format ignores a user defined locale
---------------------+------------------------------------------------------
Reporter: nobody | Owner: samuel_krempp
Type: Bugs | Status: reopened
Milestone: | Component: format
Version: None | Severity: Problem
Resolution: | Keywords:
---------------------+------------------------------------------------------
Comment (by cnewbold):
We've applied the following patch locally, which appears to resolve the
issues described above:
{{{
==== boost/boost/format/internals.hpp#4 (text) ====
***************
*** 105,110 ****
--- 105,118 ----
void stream_format_state<Ch,Tr>:: apply_on (basic_ios & os,
boost::io::detail::locale_t * loc_default) const {
// set the state of this stream according to our params
+ #if !defined(BOOST_NO_STD_LOCALE)
+ if(loc_)
+ os.imbue(loc_.get());
+ else if(loc_default)
+ os.imbue(*loc_default);
+ #else
+ (void) loc_default; // keep compiler quiet if we don't support
locales
+ #endif
if(width_ != -1)
os.width(width_);
if(precision_ != -1)
***************
*** 114,127 ****
os.flags(flags_);
os.clear(rdstate_);
os.exceptions(exceptions_);
- #if !defined(BOOST_NO_STD_LOCALE)
- if(loc_)
- os.imbue(loc_.get());
- else if(loc_default)
- os.imbue(*loc_default);
- #else
- (void) loc_default; // keep compiler quiet if we don't support
locales
- #endif
}
template<class Ch, class Tr>
--- 122,127 ----
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/859#comment:7> 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:10 UTC