This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: seek bug in stringstream?
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: Re: seek bug in stringstream?
- From: Nathan Myers <ncm at cantrip dot org>
- Date: Fri, 14 Apr 2000 13:49:12 -0700
- References: <200003251915.LAA00945@haight.constant.com> <m3vh1ksha1.fsf@aussie.lyx.org>
- Reply-To: libstdc++ at sourceware dot cygnus dot com
On Fri, Apr 14, 2000 at 07:51:02PM +0200, Lars Gullik Bjønnes wrote:
> 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 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.
I agree with your assessment. Please send a patch.
Nathan Myers
ncm@cantrip.org