This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/45628] std::fstream::tellg invalidates I/O buffer
- From: "don dot wakefield at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Sep 2010 14:54:07 -0000
- Subject: [Bug libstdc++/45628] std::fstream::tellg invalidates I/O buffer
- References: <bug-45628-18186@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from don dot wakefield at gmail dot com 2010-09-10 14:54 -------
Paolo, yes, _M_file.seekoff(0,cur) would return the current physical file
position, and then filebuf::seekoff would adjust the returned pos_type to
reflect the position within the *logical* file, framed by the buffer and
pointed to by gptr().
As for the mechanics of width*off, I confess that locale issues leave me
completely befuddled, so I won't try to address that.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45628