This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: seek bug in stringstream?
- To: Benjamin Kosnik <bkoz at cygnus dot com>
- Subject: Re: seek bug in stringstream?
- From: larsbj at lyx dot org (Lars Gullik Bjønnes)
- Date: 14 Apr 2000 19:51:02 +0200
- Cc: libstdc++ at sourceware dot cygnus dot com
- References: <200003251915.LAA00945@haight.constant.com>
Benjamin Kosnik <bkoz@cygnus.com> writes:
| ostringstream ost;
| cout << ost.tellp() << endl;
|
|
| Take a look at 27.7.1.3, in particular the bits about seekoff.
I am still wondering about this issue, and the issue does not seem any
clearer since my first question.
I belive that:
ostringstream ost;
cout << ost.tellp() << endl;
ofstream ofs("tmp");
cout << ost.tellp() << endl;
FILE * fil = fopen("tmp2", ...);
cout << ftell(file) << endl;
should all yield the same value. I also believe that this value should
be 0. And have so far not heard any good reason to the contrary.
Isn't there any definite ruling on this issue? In the standard, POSIX
whatever? Or is this completely implementation defined?
Lgb