On Wednesday 30 January 2002 12:35 pm, Andre Poenitz wrote: > On Wed, Jan 30, 2002 at 12:19:53PM +0000, Angus Leeming wrote: > > I assumed that the true problem lies in my version of std::ostringstream, but > > if Kayvan experiences the same problem and it is cured in the same way, then > > perhaps the problem lies elsewhere. > > What does your library's std::ostringstream::str() return? > > 'string' or 'string const &'? > > Andre'
string. Here's the class definition. Angus template<class charT, class traits, class Allocator> class basic_ostringstream : public basic_ostream<charT, traits> { public: typedef basic_stringbuf<charT, traits, Allocator> sb_type; typedef basic_ios<charT, traits> ios_type; typedef basic_string<charT, traits, Allocator> string_type; typedef traits traits_type; typedef charT char_type; typedef _TYPENAME traits::int_type int_type; typedef _TYPENAME traits::pos_type pos_type; typedef _TYPENAME traits::off_type off_type; _EXPLICIT basic_ostringstream(ios_base::openmode which = ios_base::out); _EXPLICIT basic_ostringstream(const string_type& str, ios_base::openmode which = ios_base::out); virtual ~basic_ostringstream(); basic_stringbuf<charT, traits, Allocator> *rdbuf() const; string_type str() const; void str(const string_type& str); protected: private: sb_type sb_; };