This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/10975] incorrect initial ostringstream::tellp()


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10975



------- Additional Comments From from-bugzilla at geek-central dot gen dot nz  2003-07-18 08:58 -------
brendan@zen.org wrote:

>As such, since there's no space yet for seekoff() to move inside the
>basic_stringbuf, it gives back the -1 value which tellp() relays to the call
>in the testcase.

That's an implementation issue. I don't see why such implementation 
issues should cause a difference in the semantics. Consider: the 
ostream object is fully initialized and ready for use. Nothing has been 
written to it yet. Therefore the output position should be 0. This is true if 
output is going to a file, why shouldn't it be true for output going to a 
string?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]