This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/9828: Regression: Segmentation fault in num_put::put
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Pétur Runólfsson <peturr02 at ru dot is>
- Cc: jlquinn at optonline dot net, paolo at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Thu, 3 Apr 2003 10:13:13 -0600
- Subject: Re: libstdc++/9828: Regression: Segmentation fault in num_put::put
- References: <07D05A69A3D0C14FAEA60C3ACE8E5564028F5564@nike.hir.is>
>> Another is that locales carry the cache info to avoid this problem.
Yes. This is what I'd really prefer. That way the cache is available to
everybody, not just the io code.
>I think this might be the best solution; it is very common to
>create a stringstream just to format one number (see for
>example boost::lexical_cast or operator<<(ostream&, complex&)).
>Storing the cache in the locale would allow such code to take
>advantage of the caches.
>
>It should be easy to implement this using the same techniques
>as are used for storing facets in locales.
Yep. This is what I was talking about when this first went in, abit very
vaguely. If you could do something like has_cache/use_cache as analogues
to has_facet/has_cache I think we'll be better off.
-benjamin