This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] more istream::ignore cleanups
Paolo Carlini <pcarlini@suse.de> writes:
| Benjamin Kosnik wrote:
|
| >it is my understanding that max(), not some modulo, was the imperfect
| >solution that multiple people thought made the most sense in the
| >(admittedly) corner case.
| >
| Are those discussions recorded somewhere? In the LWG reflector? I would be
| interested in the details: actually, strictly speaking, the whole LFS
| idea is not
| compatible with the C++ standard in the present form...
|
| > it's not great, but i think it at least
| >signals what is going on for people who care to look.
| >
| I'm not 100% sure, frankly: otherwise that would be a totally
| compelling argument!
well, the standard text does not contain only text based on compelling
arguments and you can have two opposite compelling arguments ;-/
| It looks like you can end up ignoring <streamsize>::max chars also on
| a non-LFS
| system, completely within the current standard. What's wrong with
| ignoring a whole
| 2G file till eof? (in principle, I mean, we are talking about
| corner-corner cases!)
or from an infinite stream, special character device : consider reading
from /dev/null.
It is known that the current IOStream framework does not accomodate
very well some notions of files (e.g. files with random
access iterators, memory mapped files, ...); consequently, some
"distorsions" are necessary. If you're interested in alterantive
notions of files, you might want to contact Matt Austern, but I'm
disgressing :-)
--
Gabriel Dos Reis
gdr@integrable-solutions.net