>>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
Angus> Got it! The bug lies in the position counters of ostringstream. Angus> basic_stringbuf actually. Sometimes they ain't being set Angus> correctly. Did you find out when? We have plenty of uses of this stream which seem to work with you. It would be nice to find the style which work. Angus> Importantly, they are used by the basic_stringbuf::str() Angus> function. Angus> The code does some comparisons of position variables to Angus> ascertain what to print out. We can force things to behave as Angus> we expect by making an explicit Angus> ostringstream::seekp(std::ios::beg) call before calling Angus> ostringstream::str(). Funny... However, we won't be able to do that for each use of ostringstream. Are you able to trace the code and see at what place this happens? An alternative would be to define a getline(ostringstream, string&), or maybe tostr(ostringstring const &) which does the right thing. But I suspect lars will not like it :) JMarc