This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


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

Re: seek bug in stringstream?


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


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