From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15623 invoked by alias); 3 Apr 2003 16:16:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 15567 invoked by uid 71); 3 Apr 2003 16:16:01 -0000 Date: Thu, 03 Apr 2003 16:16:00 -0000 Message-ID: <20030403161601.15562.qmail@sources.redhat.com> To: jlquinn@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Benjamin Kosnik Subject: Re: libstdc++/9828: Regression: Segmentation fault in num_put::put Reply-To: Benjamin Kosnik X-SW-Source: 2003-04/txt/msg00098.txt.bz2 List-Id: The following reply was made to PR libstdc++/9828; it has been noted by GNATS. From: Benjamin Kosnik To: =?ISO-8859-1?Q?P=E9tur_Run=F3lfsson?= Cc: jlquinn@optonline.net, paolo@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: libstdc++/9828: Regression: Segmentation fault in num_put::put Date: Thu, 3 Apr 2003 10:13:13 -0600 >> 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