diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index ef7a1a312f4..ffc04bc0100 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2003-03-08 Jerry Quinn + + * include/bits/locale_facets.tcc (num_put::do_put(bool)): Use + locale cache for truename and falsename. + 2003-03-08 Jerry Quinn * src/ios.cc (ios_base::ios_base): Correct order of _M_word and diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index b5b1f5c2e1e..ab21bf34cfd 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -974,14 +974,14 @@ namespace std } else { - locale __loc = __io.getloc(); - const numpunct<_CharT>& __np = use_facet >(__loc); + typedef __locale_cache<_CharT> __cache_type; + __cache_type& __lc = static_cast<__cache_type&>(__io._M_cache()); typedef basic_string<_CharT> __string_type; __string_type __name; if (__v) - __name = __np.truename(); + __name = __lc.truename(); else - __name = __np.falsename(); + __name = __lc.falsename(); const _CharT* __cs = __name.c_str(); int __len = __name.size();