[Bug libstdc++/45628] std::fstream::tellg invalidates I/O buffer
potswa at mac dot com
gcc-bugzilla@gcc.gnu.org
Fri Sep 17 19:05:00 GMT 2010
------- 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
More information about the Gcc-bugs
mailing list