Re: Stream extraction failing
On Sep 10, 7:18 pm, utab <umut.ta...@gmail.com> wrote:
On Wed, 10 Sep 2008 00:59:15 -0700, James Kanze wrote:
I don't think that this is right, although interpreting the
standard literally... It looks like there's an error in the
standard. This is certainly not what one would want or
expect; a stream should never silently drop a non white
space character. (Most implementations do the right thing,
and set fail in this case.)
It was also strange for me, but I could not get the conclusion
from your explanation, I got the previous results with g++,
intel compiler reads another character into(unrecognizable on
cout output, but there is sth) 'fit()' which is given in the
original code.
See my follow-up to my own posting. This is clearly an error in
the standard; g++ simply implements exactly what was written,
even though it was obviously wrong, and inconsistent with
existing practice. All of the other compilers I have access to
(VC++, Sun CC, both with the RogueWave library and with STLPort)
behave "correctly"; that is, they do what one would expect, and
what the proposed resolution to the DR requires, and set
failbit.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34