stringstreams and stringbuf in gcc 3.2.x

Peter Hrenka p.hrenka@science-computing.de
Tue Feb 18 12:21:00 GMT 2003


I am using stringstreams and was trying to manipulate the contents of 
the stream via the associated stringbuf (via the 'sputn' method).

As far as I leared by looking at the implementation in <sstream> the 
stream uses a string as buffer. But if one enlarges the buffer the 
(implicit?) assertion that the buffer size and the string size match 
seems to break.

I have attached an example that produces the expected result with IRIX's 
  CC and HP's aCC but displays a shortend version of the stream with gcc 
3.2.


Peter


-- 

   Peter Hrenka                                Tel. +49 (0)7071-9457-263
   science + computing ag
   Hagellocher Weg 71-75           mailto: P.Hrenka@science-computing.de
   D-72070 Tübingen                WWW: http://www.science-computing.de/

**********************************************************************
***     Events/Aktivitäten                                         ***
***                                                                ***
***     CeBIT 2003, Hannover                                       ***
***     12.-19.03.2003                                             ***
***     LinuxPark, Halle 6, Stand A52-265                          ***
***                                                                ***
**********************************************************************
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stringstream_buffer_bug.cc
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030218/4f7e7e13/attachment.cc>


More information about the Libstdc++ mailing list