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: "potswa at mac dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Sep 2010 19:04:54 -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 #41 from potswa at mac dot com 2010-09-17 19:04 -------
Well, I'm happy if you'd like to merge the diffs. My code was written with the
intent of optimizing the output case, too, but I guess it's not too inefficient
or awkward from the perspective of input only.
I just filed a bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45708 about the
requirement to separate reads and writes. I suppose it will be a duplicate, but
maybe it is worded a little better than existing bugs. Although your current
users might know the restriction, I don't think it's really well-documented. I
personally observed this behavior when getting started with iostreams, and it
was quite discouraging. GNU having a large part of the iostreams marketshare, I
wouldn't be surprised if this were a minor stumbling block to iostreams
adoption overall.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45628