istream_iterator operator++( int );
Reads a value from the underlying stream (using its operator>>) and stores it into the iterator object. If the read fails (the underlying stream's fail() returns true), the iterator becomes the end-of-stream iterator.
The behavior is undefined if the iterator is end-of-stream iterator.
 Return value
istream_iteratorthat holds an unchanged value.
May throw implementation-defined exceptions.
 Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
|DR||Applied to||Behavior as published||Correct behavior|
|LWG 260||C++98||the return type of operator++(int) was
||corrected to |
|LWG 788||C++98||the underlying stream's operator void* was
used to determine whether the read fails, but it
was removed by the resolution of LWG issue 468
|uses fail() instead|
|LWG 838||C++98||it was unclear whether end-of-stream iterators can be incremented||the behavior is undefined|