incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Brown <>
Subject another istream_iterator question
Date Sat, 03 Nov 2007 17:32:03 GMT
I have been looking at the istream_iterator class, mostly out of
curiosity than to try to fix a specific bug, to see if there are
any other discrepancies with the standard and operator++ caught
my attention. The standard says that the operator should return
*in_stream >> value but the stdcxx definition looks like this:

     istream_iterator& operator++ () {
         return _C_strm && !!*_C_strm && (*_C_strm >> _C_val), *this;

There are two extra checks that aren't required by the standard.
They are probably harmless but I wonder if they shouldn't be
removed for efficiency. Does anyone see a problem with such
a change?


View raw message